Frame 2
function fVRBall() {
bX = ObjectLine4._x;
bY = ObjectLine4._y;
ball._x = bX;
ball._y = bY;
shadow._x = ObjectLine6._x;
shadow._y = ObjectLine6._y;
}
function fBallMove() {
ySpd = ySpd * friction;
ySpd = ySpd + gravity;
zSpd = zSpd * 0.95;
if (YCoords[5] >= 0) {
ySpd = -ySpd;
if (nBCount == 0) {
fWhereIsBall();
}
_root.nBCount++;
}
if (YCoords[5] < -50) {
ySpd = -ySpd;
}
i = 4;
while (i < 6) {
XCoords[i] = XCoords[i] + xSpd;
YCoords[i] = YCoords[i] + ySpd;
ZCoords[i] = ZCoords[i] + zSpd;
i++;
}
XCoords[8] = XCoords[4];
XCoords[9] = XCoords[5];
ZCoords[8] = ZCoords[4];
ZCoords[9] = ZCoords[5];
}
function fWhereIsBall() {
var _local1 = _root;
if ((_local1.XCoords[5] > (34 + ((_local1.ZCoords[5] - 150) * 0.016666667))) || (_local1.XCoords[5] < (-34 - ((_local1.ZCoords[5] - 150) * 0.016666667)))) {
_local1.strWhatGwan = "WIDE";
if (blnServe) {
_local1.strWhatGwan = "SERVEOUT";
}
} else if ((_local1.ZCoords[5] < -130) || (_local1.ZCoords[5] > 170)) {
_local1.strWhatGwan = "DEEP";
if (blnServe) {
_local1.strWhatGwan = "SERVEOUT";
}
} else if (_local1.strWhatGwan != "B4NET") {
_local1.strWhatGwan = "NICE";
}
if (_local1.nPTurn == 1) {
if ((_local1.blnServe == 1) && (_local1.blnForward == 1)) {
if (_local1.nServeSide == 1) {
if ((_local1.ZCoords[5] > 75) || (_local1.XCoords[5] > 0)) {
_local1.strWhatGwan = "SERVEOUT";
}
} else if ((_local1.ZCoords[5] > 75) || (_local1.XCoords[5] < 0)) {
_local1.strWhatGwan = "SERVEOUT";
}
}
if (_local1.blnForward == 1) {
if (_local1.ZCoords[5] < 0) {
_local1.strWhatGwan = "B4NET";
if (blnServe) {
_local1.strWhatGwan = "SERVEOUT";
}
}
} else if (_local1.ZCoords[5] > 0) {
_local1.strWhatGwan = "B4NET";
if (blnServe) {
_local1.strWhatGwan = "SERVEOUT";
}
}
} else {
if ((_local1.blnServe == 1) && (_local1.blnForward == 0)) {
if (_local1.nServeSide == 1) {
if ((_local1.ZCoords[5] < -70) || (_local1.XCoords[5] < 0)) {
_local1.strWhatGwan = "SERVEOUT";
}
} else if ((_local1.ZCoords[5] < -70) || (_local1.XCoords[5] > 0)) {
_local1.strWhatGwan = "SERVEOUT";
}
}
if (_local1.blnForward == 1) {
if (_local1.ZCoords[5] < 0) {
_local1.strWhatGwan = "B4NET";
if (blnServe) {
_local1.strWhatGwan = "SERVEOUT";
}
}
} else if (_local1.ZCoords[5] > 0) {
_local1.strWhatGwan = "B4NET";
if (blnServe) {
_local1.strWhatGwan = "SERVEOUT";
}
}
}
if (((_local1.strWhatGwan == "DEEP") || (_local1.strWhatGwan == "WIDE")) || ((_local1.strWhatGwan == "SERVEOUT") && (_local1.ZCoords[5] > -120))) {
sndOut.play();
}
}
function fPointOver() {
var _local1 = _root;
if (_local1.ball.nBallStatus != 2) {
if (nServeSide == 1) {
nServeSide = 0;
movP2.XTarg = 17;
} else if (nServeSide == 0) {
nServeSide = 1;
movP2.XTarg = -17;
}
}
nBCount = 0;
xSpd = 0;
ySpd = 0;
zSpd = 0;
if (_local1.ball.nBallStatus != 2) {
if (strWhatGwan == "NICE") {
if (blnForward == 1) {
p1Score++;
fDoScores(1);
} else {
p2Score++;
fDoScores(2);
}
nServeCount = 0;
} else if (((strWhatGwan == "WIDE") || (strWhatGwan == "DEEP")) || (strWhatGwan == "B4NET")) {
if (blnForward == 0) {
p1Score++;
fDoScores(1);
} else {
p2Score++;
fDoScores(2);
}
nServeCount = 0;
} else if (strWhatGwan == "SERVEOUT") {
if (nServeCount == 2) {
if (_local1.nPTurn == 1) {
p2Score++;
fDoScores(2);
} else {
p1Score++;
fDoScores(1);
}
} else if (nServeSide == 1) {
nServeSide = 0;
movP2.XTarg = 17;
} else if (nServeSide == 0) {
nServeSide = 1;
movP2.XTarg = -17;
}
}
}
fCreateComment();
blnServe = 0;
if (nServeCount == 2) {
nServeCount = 0;
}
if (_local1.nPTurn == 1) {
blnForward = 1;
if (_local1.nServeSide == 1) {
startDrag (_local1.movP1, true, 275, 305, 460, 305);
} else {
startDrag (_local1.movP1, true, 100, 305, 275, 305);
}
} else {
blnForward = 0;
if (_local1.nServeSide == 1) {
startDrag (_local1.movP1, true, 275, 175, 550, 400);
} else {
startDrag (_local1.movP1, true, 0, 175, 275, 400);
}
}
movP2.YTarg = -4;
movP2.ZTarg = 150 + movP2.myZTarg;
_local1.ball.nBallStatus = 0;
_local1.movP1.gotoAndStop(1);
_local1.movP2.gotoAndStop(1);
_local1.movP1.nPow = 0;
_local1.movP1.blnP = 0;
_local1.movMsgs.gotoAndPlay("POINT");
strWhatGwan = "NICE";
}
function fDoScores(nType) {
if (nType == 1) {
if (p1Score == 4) {
if (p2Score < 3) {
p1Games++;
p1Score = 0;
p2Score = 0;
fChangeOver();
} else if (p2Score == 4) {
p2Score--;
p1Score--;
}
}
if (p1Score == 5) {
p1Games++;
p1Score = 0;
p2Score = 0;
fChangeOver();
}
} else {
if (p2Score == 4) {
if (p1Score < 3) {
p2Games++;
p1Score = 0;
p2Score = 0;
fChangeOver();
} else if (p1Score == 4) {
p2Score--;
p1Score--;
}
}
if (p2Score == 5) {
p2Games++;
p1Score = 0;
p2Score = 0;
fChangeOver();
}
}
if ((p1Games == nTotalGames) || (p2Games == nTotalGames)) {
nPTurn = 0;
}
}
function fChangeOver() {
var _local1 = _root;
if (_local1.nPTurn == 1) {
_local1.nPTurn = 2;
_local1.blnForward = 0;
} else {
_local1.nPTurn = 1;
_local1.blnForward = 1;
}
_local1.nServeSide = 1;
_local1.movP2.XTarg = -17;
}
function fCreateComment() {
if ((((p1Score == 0) && (p2Score == 0)) && ((p1Games + p2Games) > 0)) && (ball.nBallStatus != 2)) {
if (p1Games == nTotalGames) {
strMsg = "YOU WIN !";
} else if (p2Games == nTotalGames) {
strMsg = "YOU LOSE !";
} else {
strMsg = "GAME !";
}
} else if (strWhatGwan == "NICE") {
if (blnForward == 1) {
strMsg = arrComments1[random(4)];
} else {
strMsg = arrComments2[random(4)];
}
} else if (strWhatGwan == "SERVEOUT") {
if (nServeCount < 2) {
strMsg = "FAULT";
} else {
strMsg = "DOUBLE FAULT";
}
} else if (strWhatGwan == "WIDE") {
if (blnForward == 1) {
strMsg = arrComments4[random(4)];
} else {
strMsg = arrComments5[random(4)];
}
} else if (strWhatGwan == "DEEP") {
if (blnForward == 1) {
strMsg = arrComments3[random(4)];
} else {
strMsg = arrComments5[random(4)];
}
} else if (strWhatGwan == "B4NET") {
if (blnForward == 1) {
if (_root.ball.nBallStatus != 2) {
strMsg = "GET IT OVER";
}
} else {
strMsg = "NET !";
}
}
}
function fCalcEndPos() {
var _local1 = _root;
var arrTempX = new Array();
var _local3 = new Array();
var arrTempZ = new Array();
arrTempX[0] = XCoords[4];
arrTempX[1] = XCoords[5];
arrTempX[2] = xSpd;
_local3[0] = YCoords[4];
_local3[1] = YCoords[5];
_local3[2] = ySpd;
arrTempZ[0] = ZCoords[4];
arrTempZ[1] = ZCoords[5];
arrTempZ[2] = zSpd;
var blnMov = 1;
var blnBounced = 0;
var _local2 = 1;
while (blnMov) {
ySpd = ySpd * friction;
ySpd = ySpd + gravity;
zSpd = zSpd * 0.95;
if (YCoords[5] >= 0) {
ySpd = -ySpd;
blnBounced = 1;
var nCPercent = Math.round(_local2 / 2);
if (_local1.nLevel == 3) {
_local1.movP2.XBouncePoint = XCoords[5];
_local1.movP2.ZBouncePoint = ZCoords[5];
} else {
_local1.movP2.XBouncePoint = 100;
_local1.movP2.ZBouncePoint = 100;
}
_local2 = 1;
}
if (YCoords[5] < -50) {
ySpd = -ySpd;
}
i = 4;
while (i < 6) {
XCoords[i] = XCoords[i] + xSpd;
YCoords[i] = YCoords[i] + ySpd;
ZCoords[i] = ZCoords[i] + zSpd;
i++;
}
_local2++;
if ((_local2 == nCPercent) && (blnBounced)) {
blnMov = 0;
_local1.movP2.XTarg = XCoords[5];
_local1.movP2.YTarg = YCoords[5];
_local1.movP2.ZTarg = ZCoords[5];
XCoords[4] = arrTempX[0];
XCoords[5] = arrTempX[1];
YCoords[4] = _local3[0];
YCoords[5] = _local3[1];
ZCoords[4] = arrTempZ[0];
ZCoords[5] = arrTempZ[1];
xSpd = arrTempX[2];
ySpd = _local3[2];
zSpd = arrTempZ[2];
}
}
}
Frame 3
function fTTPointOver() {
nBCount = 0;
blnServe = 0;
xSpd = 0;
ySpd = 0;
zSpd = 0;
ball.nBallStatus = 0;
movP1.gotoAndStop(1);
movP1.nPow = 0;
movP1.blnP = 0;
strWhatGwan = "NICE";
}
function fTTCreateAdvice() {
switch (_root.trainCount) {
case 0 :
movHelper.movHelp.txtHelp = "Click your left mouse button once to throw the ball up into the air. Then click again as the ball starts to drop downwards...";
return;
case 1 :
movHelper.movHelp.txtHelp = "Make sure you click the mouse just as the ball is moving down from the top of its flight.";
return;
case 2 :
movHelper.movHelp.txtHelp = "If you double click the mouse the ball will go out.";
return;
case 3 :
movHelper.movHelp.txtHelp = "Move around the baseline and your serve will change angle.";
return;
case 4 :
movHelper.movHelp.txtHelp = "Vary your angle of service to fox your opponents.";
return;
case 5 :
movHelper.movHelp.txtHelp = "Now click next to move onto returning the ball.";
}
}
function fTTCreateAdvice2() {
switch (_root.trainCount) {
case 0 :
movHelper.movHelp.txtHelp = "Stand in the correct place and click your mouse quickly to hit the ball.";
return;
case 1 :
movHelper.movHelp.txtHelp = "Try clicking a little early to make sure you hit the ball.";
return;
case 2 :
movHelper.movHelp.txtHelp = "If you're standing to the left of the ball when you hit it the ball will go to the right.";
return;
case 3 :
movHelper.movHelp.txtHelp = "If you're standing to the right of the ball when you hit it the ball will go to the left.";
return;
case 4 :
movHelper.movHelp.txtHelp = "Try holding down the mouse to build up power then let go to whack it across the court.";
return;
case 5 :
movHelper.movHelp.txtHelp = "Move into the net and go for some volley shots.";
return;
case 6 :
movHelper.movHelp.txtHelp = "OK. Time to get playing and see if you can beat the ladies !!";
}
}
Frame 4
function DrawLine(x, y, x1, y1, count) {
var _local1 = count;
duplicateMovieClip ("Line", "ObjectLine" + _local1, _local1);
setProperty("ObjectLine" + _local1, _x , x);
setProperty("ObjectLine" + _local1, _y , y);
setProperty("ObjectLine" + _local1, _xscale , x1 - x);
setProperty("ObjectLine" + _local1, _yscale , y1 - y);
}
function RotateX(angle) {
var _local1;
var _local2 = angle * Radian;
_local1 = 0;
while (_local1 < NumPoints) {
RotatedX[_local1] = XCoords[_local1];
RotatedY[_local1] = (Math.cos(_local2) * YCoords[_local1]) - (Math.sin(_local2) * ZCoords[_local1]);
RotatedZ[_local1] = (Math.sin(_local2) * YCoords[_local1]) + (Math.cos(_local2) * ZCoords[_local1]);
_local1++;
}
}
function RotateY(angle) {
var _local1;
var _local2 = angle * Radian;
_local1 = 0;
while (_local1 < NumPoints) {
RotatedX1[_local1] = (Math.cos(_local2) * RotatedX[_local1]) - (Math.sin(_local2) * RotatedZ[_local1]);
RotatedY1[_local1] = RotatedY[_local1];
RotatedZ1[_local1] = (Math.sin(_local2) * RotatedX[_local1]) + (Math.cos(_local2) * RotatedZ[_local1]);
_local1++;
}
}
function RotateZ(angle) {
var _local1;
var _local2 = angle * Radian;
_local1 = 0;
while (_local1 < NumPoints) {
RotatedX2[_local1] = (Math.cos(_local2) * RotatedX1[_local1]) - (Math.sin(_local2) * RotatedY1[_local1]);
RotatedY2[_local1] = (Math.sin(_local2) * RotatedX1[_local1]) + (Math.cos(_local2) * RotatedY1[_local1]);
RotatedZ2[_local1] = RotatedZ1[_local1];
_local1++;
}
}
function RotatedToScreen() {
var _local1;
_local1 = 0;
while (_local1 < NumPoints) {
ScreenX[_local1] = ((viewP * RotatedX2[_local1]) / (RotatedZ2[_local1] + 600)) + MovieXSize;
ScreenY[_local1] = ((viewP * RotatedY2[_local1]) / (RotatedZ2[_local1] + 600)) + MovieYSize;
_local1++;
}
}
function DrawObject() {
var _local2;
var _local1 = 0;
_local2 = 0;
while (_local2 < NumLines) {
DrawLine(ScreenX[Lines[_local1]], ScreenY[Lines[_local1]], ScreenX[Lines[_local1 + 1]], ScreenY[Lines[_local1 + 1]], _local2);
_local1 = _local1 + 2;
_local2++;
}
}
function fDo3D() {
RotateX(x);
RotateY(y);
RotateZ(z);
RotatedToScreen();
DrawObject();
}
Frame 6
Frame 8
nBytesTotal = _root.getBytesTotal();
nBytesLoaded = _root.getBytesLoaded();
nPercentLoaded = int((nBytesLoaded / nBytesTotal) * 100);
txtPercent = nPercentLoaded + "%";
if (nBytesLoaded >= nBytesTotal) {
gotoAndPlay ("LOADED");
var blnMusic = 1;
var blnFX = 1;
}
Frame 9
gotoAndPlay ("LOADING");
Frame 14
Frame 16
Frame 22
Frame 28
_quality = "high";
stop();
Frame 30
var nCourtType = 1;
stop();
Frame 31
_quality = "medium";
Instance of Symbol 158 MovieClip "movGrass" in Frame 31
onClipEvent (load) {
trace(_root.nCourtType);
if (_root.nCourtType == 1) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Instance of Symbol 180 MovieClip "movP2" in Frame 31
onClipEvent (load) {
switch (_root.nLevel) {
case 1 :
var p2XSpd = 0.8;
var p2ZSpd = 0.8;
var XCapable = 20;
var myZTarg = 0;
break;
case 2 :
var p2XSpd = 0.8;
var p2ZSpd = 0.8;
var XCapable = 30;
var myZTarg = 0;
break;
case 3 :
var p2XSpd = 2.4;
var p2ZSpd = 2.2;
var XCapable = 16;
var myZTarg = 40;
break;
default :
var p2XSpd = 0.8;
var p2ZSpd = 1.2;
var XCapable = 30;
var myZTarg = 40;
}
var XTarg = -17;
var YTarg = -4;
var ZTarg = (150 + myZTarg);
var XBouncePoint;
var YBouncePoint;
var ZBouncePoint;
var spdDiv = 1;
var nServeTime = 0;
}
onClipEvent (enterFrame) {
if (_root.nPTurn == 1) {
if (_root.blnForward == 1) {
XDiff = _root.XCoords[10] - XTarg;
YDiff = _root.YCoords[10] - YTarg;
ZDiff = _root.ZCoords[10] - ZTarg;
}
if ((_root.blnForward == 0) && (_root.ball.nBallStatus == 3)) {
XDiff = _root.XCoords[10] - 0;
YDiff = _root.YCoords[10] + 4;
ZDiff = (_root.ZCoords[10] - 150) - myZTarg;
}
} else {
if (_root.blnForward == 1) {
XDiff = _root.XCoords[10] - XTarg;
YDiff = _root.YCoords[10] - YTarg;
ZDiff = _root.ZCoords[10] - ZTarg;
}
if ((_root.blnForward == 0) && (_root.ball.nBallStatus == 3)) {
XDiff = _root.XCoords[10] - 0;
YDiff = _root.YCoords[10] + 4;
ZDiff = (_root.ZCoords[10] - 150) - myZTarg;
}
if ((_root.blnForward == 0) && (_root.ball.nBallStatus == 0)) {
XDiff = _root.XCoords[10] - XTarg;
YDiff = _root.YCoords[10] - YTarg;
ZDiff = _root.ZCoords[10] - ZTarg;
}
}
if (((_root.blnForward == 0) && (_root.ball.nBallStatus == 3)) && (_root.nLevel == 3)) {
spdDiv = 5;
} else {
spdDiv = 1;
}
if (XDiff > p2XSpd) {
_root.XCoords[10] = _root.XCoords[10] - (p2XSpd / spdDiv);
_root.XCoords[11] = _root.XCoords[11] - (p2XSpd / spdDiv);
} else if (XDiff < 0) {
_root.XCoords[10] = _root.XCoords[10] + (p2XSpd / spdDiv);
_root.XCoords[11] = _root.XCoords[11] + (p2XSpd / spdDiv);
}
if (ZDiff > p2ZSpd) {
_root.ZCoords[10] = _root.ZCoords[10] - (p2ZSpd / spdDiv);
_root.ZCoords[11] = _root.ZCoords[11] - (p2ZSpd / spdDiv);
} else if (ZDiff < 0) {
_root.ZCoords[10] = _root.ZCoords[10] + (p2ZSpd / spdDiv);
_root.ZCoords[11] = _root.ZCoords[11] + (p2ZSpd / spdDiv);
}
_x = _root.ObjectLine7._x;
_y = (_root.ObjectLine7._y - 18);
if (_root.nPTurn == 2) {
switch (_root.ball.nBallStatus) {
case 0 :
ZTarg = 185;
nServeTime++;
if (nServeTime >= 66) {
gotoAndStop (4);
}
if (nServeTime >= 70) {
_root.blnCanServe = 1;
nServeTime = 0;
}
if (_root.nBallDepth == 1) {
_root.nBallDepth = 0;
_root.ball.swapDepths(_root.movNet);
}
if (_root.blnCanServe) {
_root.ySpd = -6;
_root.gravity = 0.5;
_root.ball.nBallStatus = 1;
_root.blnCanServe = 0;
}
break;
case 1 :
if (_root.YCoords[4] < -5) {
_root.blnServe = 1;
_root.nServeCount++;
_root.ball.nBallStatus = 3;
blnP = 0;
if (_root.nLevel == 3) {
_root.ySpd = -3.3;
_root.zSpd = -24;
if (_root.nServeSide == 1) {
_root.xSpd = 1.5 + (random(10) / 10);
} else {
_root.xSpd = -1.5 - (random(10) / 10);
}
} else {
_root.ySpd = -3;
_root.zSpd = -24;
if (_root.nServeSide == 1) {
_root.xSpd = 1.5 + (random(10) / 10);
} else {
_root.xSpd = -1.5 - (random(10) / 10);
}
}
_root.blnForward = 0;
_root.blnNetCheck = 0;
_root.nBCount = 0;
_root.sndHit.play();
gotoAndStop (1);
} else {
_root.ball.nBallStatus = 2;
}
break;
case 2 :
break;
case 3 :
if (!((((_root.nBCount < 2) && (_root.strWhatgwan == "NICE")) && (_root.YCoords[4] < 0)) && (ZBouncePoint < 165))) {
break;
}
if (!((_root.ZCoords[5] >= (_root.ZCoords[10] - XCapable)) && (_root.ZCoords[5] <= (_root.ZCoords[10] + XCapable)))) {
break;
}
if (!((XDiff > -12) && (XDiff < 8))) {
break;
}
if (_root.nLevel == 3) {
if ((_root.XCoords[10] > -5) && (_root.XCoords[10] < 5)) {
if ((XDiff > -3) && (XDiff < 2)) {
_root.ySpd = -3;
_root.xSpd = 0;
} else if (XDiff < -3) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
} else if (XDiff > 2) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
}
} else if (_root.XCoords[10] >= 5) {
_root.ySpd = -3;
_root.xSpd = (-(random(9) + 1)) / 3;
} else if (_root.XCoords[10] <= -5) {
_root.ySpd = -3;
_root.xSpd = (random(9) + 1) / 3;
}
_root.zSpd = -13 - (_root.ZCoords[10] / 12);
_root.d1 = _root.XCoords[10];
} else {
if ((XDiff > -3) && (XDiff < 2)) {
_root.ySpd = -3;
_root.xSpd = 0;
} else if (XDiff < -3) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
} else if (XDiff > 2) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
}
_root.zSpd = -23.5;
}
_root.blnForward = 0;
_root.blnNetCheck = 0;
_root.nBCount = 0;
_root.sndHit.play();
if (XDiff > 0) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
if (_root.blnServe != 1) {
break;
}
_root.blnServe = 0;
}
}
if (_root.nPTurn == 1) {
if ((((_root.nBCount < 2) && (_root.strWhatgwan == "NICE")) && (_root.YCoords[4] < 0)) && (ZBouncePoint < 165)) {
if ((_root.ZCoords[5] >= (_root.ZCoords[10] - XCapable)) && (_root.ZCoords[5] <= (_root.ZCoords[10] + XCapable))) {
if ((XDiff > -12) && (XDiff < 8)) {
if (_root.nLevel == 3) {
if ((_root.XCoords[10] > -5) && (_root.XCoords[10] < 5)) {
if ((XDiff > -3) && (XDiff < 2)) {
_root.ySpd = -3;
_root.xSpd = 0;
} else if (XDiff < -3) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
} else if (XDiff > 2) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
}
} else if (_root.XCoords[10] >= 5) {
_root.ySpd = -3;
_root.xSpd = (-(random(9) + 1)) / 3;
} else if (_root.XCoords[10] <= -5) {
_root.ySpd = -3;
_root.xSpd = (random(9) + 1) / 3;
}
_root.zSpd = -13 - (_root.ZCoords[10] / 12);
_root.d1 = _root.XCoords[10];
} else {
if ((XDiff > -3) && (XDiff < 2)) {
_root.ySpd = -3;
_root.xSpd = 0;
} else if (XDiff < -3) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
} else if (XDiff > 2) {
_root.ySpd = -3;
_root.xSpd = (-XDiff) / 5;
}
_root.zSpd = -23.5;
}
_root.blnForward = 0;
_root.blnNetCheck = 0;
_root.nBCount = 0;
if (XDiff > 0) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
_root.sndHit.play();
if (_root.blnServe == 1) {
_root.blnServe = 0;
}
}
}
}
}
}
Instance of Symbol 232 MovieClip "movP1" in Frame 31
onClipEvent (load) {
var nPow = 0;
var blnP = 0;
var xDivider = 4;
var yPow = 3;
var Xdiff;
var Ydiff;
var Zdiff;
switch (_root.nLevel) {
case 1 :
var p1XCapable = 22;
var p1ZCapable = 45;
var p1Z2Capable = 90;
break;
case 2 :
var p1XCapable = 10;
var p1ZCapable = 40;
var p1Z2Capable = 60;
break;
case 3 :
var p1XCapable = 22;
var p1ZCapable = 40;
var p1Z2Capable = 60;
break;
default :
var p1XCapable = 22;
var p1ZCapable = 45;
var p1Z2Capable = 90;
}
}
onClipEvent (enterFrame) {
if (blnP) {
nPow = nPow + 1.5;
if (nPow > 4) {
powerbar._alpha = 100;
powerbar.gotoAndStop(int(nPow));
}
} else {
powerbar._alpha = 0;
}
if (nPow > 28) {
nPow = 28;
}
p1Xratio = 0.178 - ((_y - 305) * 0.00036);
p1Zratio = 1.1;
p1x = (_x - 280) * p1Xratio;
p1z = (-(_y - 170)) * p1Zratio;
if (blnP && (nPow > 4)) {
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
}
if (nBallStatus == 0) {
gotoAndStop (1);
}
if (_root.nPTurn == 0) {
stopDrag();
}
}
onClipEvent (mouseDown) {
if (_root.nPTurn == 1) {
switch (_root.ball.nBallStatus) {
case 0 :
_root.ball.nBallStatus = 1;
_root.ySpd = -6;
_root.gravity = 0.5;
if (_root.nBallDepth == 0) {
_root.nBallDepth = 1;
_root.ball.swapDepths(_root.movNet);
}
gotoAndStop (2);
break;
case 1 :
if ((((_root.YCoords[4] > -30) && (_root.YCoords[4] < -10)) && (_root.ball._x > (_x - 20))) && (_root.ball._x < (_x + 20))) {
_root.blnServe = 1;
_root.nServeCount++;
_root.ball.nBallStatus = 2.5;
blnP = 1;
} else {
_root.ball.nBallStatus = 2;
}
break;
case 2 :
break;
case 3 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
blnP = 1;
}
}
if (_root.nPTurn == 2) {
switch (_root.ball.nBallStatus) {
case 0 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 1 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 2 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 3 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
blnP = 1;
}
}
}
onClipEvent (mouseUp) {
if (_root.nPTurn >= 1) {
switch (_root.ball.nBallStatus) {
case 0 :
gotoAndStop (1);
break;
case 1 :
gotoAndStop (1);
break;
case 2 :
gotoAndStop (1);
break;
case 2.5 :
gotoAndStop (1);
startDrag (_this, true, 0, 175, 550, 400);
blnP = 0;
_root.ySpd = -1.5;
_root.xSpd = (-(_x - _root.MovieXSize)) / 50;
_root.zSpd = 24;
_root.blnForward = 1;
_root.blnNetCheck = 0;
_root.sndHit.play();
_root.nBCount = 0;
if ((_root.blnServe == 1) && (_root.nPTurn == 2)) {
_root.blnServe = 0;
}
nPow = 0;
_root.fCalcEndPos();
_root.ball.nBallStatus = 3;
_root.shadow._visible = 1;
break;
case 3 :
if (_root.blnForward != 0) {
break;
}
startDrag (_this, true, 0, 175, 550, 400);
blnP = 0;
XDiff = p1x - _root.XCoords[4];
YDiff = _root.YCoords[4];
ZDiff = p1z - _root.ZCoords[4];
if ((((((ZDiff > (-p1ZCapable)) && (ZDiff < p1Z2Capable)) && (_root.strWhatGwan == "NICE")) && (_root.ball.nBallStatus != 2)) && (_root.YCoords[4] < 0)) && (_root.nBCount < 2)) {
if ((XDiff > (-p1XCapable)) && (XDiff < p1XCapable)) {
if ((XDiff > -2) && (XDiff < 2)) {
_root.ySpd = -yPow;
_root.xSpd = 0;
} else if (XDiff < -2) {
_root.ySpd = -yPow;
_root.xSpd = (-XDiff) / xDivider;
} else if (XDiff > 2) {
_root.ySpd = -yPow;
_root.xSpd = (-XDiff) / xDivider;
}
_root.zSpd = 12 + nPow;
if (p1x > _root.XCoords[5]) {
gotoAndStop (5);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (4);
}
if (nPow < 5) {
swoosh.swish._visible = 0;
_root.zSpd = 13 + ((-p1z) / 11);
}
_root.sndHit.play();
_root.blnForward = 1;
_root.blnNetCheck = 0;
_root.nBCount = 0;
if ((_root.blnServe == 1) && (_root.nPTurn == 2)) {
_root.blnServe = 0;
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
}
nPow = 0;
if (xDivider == 2.5) {
xDivider = 4;
yPow = 3;
}
_root.fCalcEndPos();
}
}
}
Frame 34
sndMusic.gotoAndPlay(5);
movMOnOff.gotoAndStop(10);
_root.blnMusic = 0;
Frame 44
startDrag ("movP1", true, 275, 305, 450, 305);
viewP = 2600;
var Radian = 0.0174444444444444;
var x = 9;
var xSpd = 0;
var ySpd = 0;
var zSpd = 0;
var y;
var z;
var bx;
var by;
var bz;
if ((nCourtType == 2) || (nLevel == 3)) {
friction = 0.945;
} else {
friction = 0.96;
}
gravity = 0;
netcoeff = 0.1;
bouncecoeff = 0.5;
MovieXSize = 275;
MovieYSize = 194;
var NumLines = 8;
var Numpoints = 12;
var XCoords = [-29, -34, 34, 29, 29, 29, -48, 48, 29, 29, -17, -17];
var YCoords = [0, 0, 0, 0, -5, -4, -4, -4, 0, 0, 0, -10];
var ZCoords = [-150, 150, 150, -150, -150, -150, 0, 0, -150, -149, 150, 150];
var RotatedX = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedX1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedX2 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY2 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ2 = [0, 0, 0, 0, 0, 0, 0, 0];
var ScreenX = [0, 0, 0, 0, 0, 0, 0, 0];
var ScreenY = [0, 0, 0, 0, 0, 0, 0, 0];
var Lines = [0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11];
Instance of Symbol 259 MovieClip "ball" in Frame 44
onClipEvent (load) {
var nBallStatus = 0;
var nDir = 1;
}
onClipEvent (enterFrame) {
if (_root.nPTurn == 1) {
switch (nBallStatus) {
case 0 :
_root.XCoords[4] = _root.movP1.p1x;
_root.XCoords[5] = _root.movP1.p1x;
_root.ZCoords[4] = _root.movP1.p1z;
_root.ZCoords[5] = _root.movP1.p1z;
_root.YCoords[4] = -4;
_root.YCoords[5] = -5;
_root.XCoords[8] = _root.XCoords[4];
_root.XCoords[9] = _root.XCoords[5];
_root.ZCoords[8] = _root.ZCoords[4];
_root.ZCoords[9] = _root.ZCoords[5];
_x = _root.movP1._x;
_y = _root.movP1._y;
_root.fDo3D();
_root.shadow._visible = 0;
break;
case 1 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount == 1) {
nBallStatus = 2;
}
break;
case 2 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount >= 1) {
_root.fPointOver();
}
break;
case 2.5 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
break;
case 3 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if ((_root.ZCoords[5] >= 270) || (_root.ZCoords[5] <= -270)) {
_root.fPointOver();
}
if (_root.nBCount >= 3) {
_root.fPointOver();
}
if (((_root.ZCoords[5] > 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 1)) {
if (_root.YCoords[5] >= (_root.YCoords[6] - 1)) {
_root.zSpd = ((-_root.zSpd) / 25) - 3;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 0;
}
_root.blnNetCheck = 1;
}
if (!(((_root.ZCoords[5] < 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 0))) {
break;
}
if (_root.YCoords[5] >= (_root.YCoords[6] - 1)) {
_root.zSpd = (-_root.zSpd) / 5;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 1;
}
_root.blnNetCheck = 1;
}
}
if (_root.nPTurn == 2) {
switch (nBallStatus) {
case 0 :
_root.XCoords[4] = _root.XCoords[10];
_root.XCoords[5] = _root.XCoords[10];
_root.ZCoords[4] = _root.ZCoords[10];
_root.ZCoords[5] = _root.ZCoords[10];
_root.YCoords[4] = -4;
_root.YCoords[5] = -5;
_root.XCoords[8] = _root.XCoords[4];
_root.XCoords[9] = _root.XCoords[5];
_root.ZCoords[8] = _root.ZCoords[4];
_root.ZCoords[9] = _root.ZCoords[5];
_root.fVRBall();
_root.fDo3D();
break;
case 1 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount == 1) {
nBallStatus = 2;
}
break;
case 2 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount >= 1) {
_root.fPointOver();
}
break;
case 3 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if ((_root.ZCoords[5] >= 270) || (_root.ZCoords[5] <= -270)) {
_root.fPointOver();
}
if (_root.nBCount >= 3) {
_root.fPointOver();
}
if (((_root.ZCoords[5] > 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 1)) {
if (_root.YCoords[5] >= _root.YCoords[6]) {
_root.zSpd = -_root.zSpd;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 0;
}
_root.blnNetCheck = 1;
}
if (!(((_root.ZCoords[5] < 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 0))) {
break;
}
if (_root.YCoords[5] >= _root.YCoords[6]) {
_root.zSpd = -_root.zSpd;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 1;
}
_root.blnNetCheck = 1;
}
}
}
Frame 45
startDrag ("movP1", true, 275, 305, 450, 305);
var blnForward = 1;
var nBCount = 0;
var blnServe = 0;
var nServeSide = 1;
var nServeCount = 0;
var strWhatGwan = "NICE";
var strMsg = "GET READY!";
var nPTurn = 1;
var blnCanServe = 0;
var blnNetCheck = 0;
var nBallDepth = 1;
var nGame = 1;
var nSet = 1;
var nTotalGames = 3;
var p1Score = 0;
var p2Score = 0;
var p1Games = 0;
var p2Games = 0;
var p1Sets = 0;
var p2Sets = 0;
var arrComments1 = new Array();
var arrComments2 = new Array();
var arrComments3 = new Array();
var arrComments4 = new Array();
var arrComments5 = new Array();
arrComments1[0] = "PEACH";
arrComments1[1] = "SWEET SHOT";
arrComments1[2] = "BEAUT!";
arrComments1[3] = "NICE";
arrComments2[0] = "ERP!!!";
arrComments2[1] = "YOU MISSED IT";
arrComments2[2] = "SORT IT OUT";
arrComments2[3] = "OH DEAR!";
arrComments3[0] = "TAKE IT EASY";
arrComments3[1] = "IT'S LONG";
arrComments3[2] = "OUT";
arrComments3[3] = "TOO HARD";
arrComments4[0] = "POOR SHOT";
arrComments4[1] = "KEEP IT IN";
arrComments4[2] = "OUT";
arrComments4[3] = "WIDE!";
arrComments5[0] = "WELL LEFT";
arrComments5[1] = "THAT'LL DO YER";
arrComments5[2] = "WELL OUT!";
arrComments5[3] = "GONE OUT!";
movMsgs.gotoAndPlay("POINT");
stop();
Frame 47
_quality = "high";
Frame 48
function fTrainingBalls(g, s, t, u) {
var _local2 = s;
var _local3 = g;
var _local1 = 1;
i = 0;
while (i < _local3) {
_local1 = _local1 + _local2;
i++;
}
_local1 = _local1 * u.length;
_local1 = _local1 + t;
chickLeft = _local3;
chickRight = _local2;
chickFore = t;
chickBack = _local1;
chickName = u;
}
if (strMsg == "YOU WIN !") {
switch (nLevel) {
case 1 :
movCup.gotoAndStop(3);
_root.score = 3;
break;
case 2 :
movCup.gotoAndStop(2);
_root.score = 2;
break;
case 3 :
movCup.gotoAndStop(1);
_root.score = 1;
}
} else {
movCup.gotoAndStop(4);
}
Frame 49
if (strMsg == "YOU WIN !") {
fTrainingBalls(9, 1, nLevel, _url);
} else {
fTrainingBalls(9, 0, nLevel, _url);
}
Frame 50
stop();
Frame 51
stop();
Frame 60
stop();
Frame 67
stop();
Instance of Symbol 158 MovieClip "movGrass" in Frame 93
onClipEvent (load) {
trace(_root.nCourtType);
if (_root.nCourtType == 1) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Frame 109
stop();
Frame 119
gotoAndPlay ("TRAINSKIP");
Frame 130
_quality = "medium";
Frame 132
sndSwish.play();
Instance of Symbol 232 MovieClip "movP1" in Frame 132
onClipEvent (load) {
startDrag (_this, true, 275, 305, 450, 305);
var nPow = 0;
var blnP = 0;
var xDivider = 4;
var yPow = 3;
var Xdiff;
var Ydiff;
var Zdiff;
switch (_root.nLevel) {
case 1 :
var p1XCapable = 18;
break;
case 2 :
var p1XCapable = 10;
break;
case 3 :
var p1XCapable = 7;
break;
default :
var p1XCapable = 18;
}
}
onClipEvent (enterFrame) {
if (blnP) {
nPow = nPow + 1.5;
if (nPow > 4) {
powerbar._alpha = 100;
powerbar.gotoAndStop(int(nPow));
}
} else {
powerbar._alpha = 0;
}
if (nPow > 28) {
nPow = 28;
}
p1Xratio = 0.178 - ((_y - 305) * 0.00036);
p1Zratio = 1.1;
p1x = (_x - 280) * p1Xratio;
p1z = (-(_y - 170)) * p1Zratio;
if (blnP && (nPow > 4)) {
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
}
if (nBallStatus == 0) {
gotoAndStop (1);
}
}
onClipEvent (mouseDown) {
if (_root.nPTurn == 1) {
switch (_root.ball.nBallStatus) {
case 0 :
_root.ball.nBallStatus = 1;
_root.ySpd = -6;
_root.gravity = 0.5;
if (_root.nBallDepth == 0) {
_root.nBallDepth = 1;
_root.ball.swapDepths(_root.movNet);
}
gotoAndStop (2);
break;
case 1 :
if ((((_root.YCoords[4] > -30) && (_root.YCoords[4] < -10)) && (_root.ball._x > (_x - 20))) && (_root.ball._x < (_x + 20))) {
_root.blnServe = 1;
_root.nServeCount++;
_root.ball.nBallStatus = 2.5;
blnP = 1;
} else {
_root.ball.nBallStatus = 2;
}
break;
case 2 :
break;
case 3 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
blnP = 1;
}
}
if (_root.nPTurn == 2) {
switch (_root.ball.nBallStatus) {
case 0 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 1 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 2 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 3 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
blnP = 1;
}
}
}
onClipEvent (mouseUp) {
if (_root.nPTurn >= 1) {
switch (_root.ball.nBallStatus) {
case 0 :
gotoAndStop (1);
break;
case 1 :
gotoAndStop (1);
break;
case 2 :
gotoAndStop (1);
break;
case 2.5 :
gotoAndStop (1);
blnP = 0;
_root.ySpd = -1.5;
_root.xSpd = (-(_x - _root.MovieXSize)) / 50;
_root.zSpd = 24;
_root.blnForward = 1;
_root.blnNetCheck = 0;
_root.sndHit.play();
_root.nBCount = 0;
if ((_root.blnServe == 1) && (_root.nPTurn == 2)) {
_root.blnServe = 0;
}
nPow = 0;
_root.fCalcEndPos();
_root.ball.nBallStatus = 3;
_root.shadow._visible = 1;
break;
case 3 :
blnP = 0;
XDiff = p1x - _root.XCoords[4];
YDiff = _root.YCoords[4];
ZDiff = p1z - _root.ZCoords[4];
if ((((((ZDiff > -30) && (ZDiff < 30)) && (_root.strWhatGwan == "NICE")) && (nBallStatus != 2)) && (_root.YCoords[4] < 0)) && (_root.nBCount < 2)) {
if ((XDiff > (-p1XCapable)) && (XDiff < p1XCapable)) {
if ((XDiff > -2) && (XDiff < 2)) {
_root.ySpd = -yPow;
_root.xSpd = 0;
} else if (XDiff < -2) {
_root.ySpd = -yPow;
_root.xSpd = (-XDiff) / xDivider;
} else if (XDiff > 2) {
_root.ySpd = -yPow;
_root.xSpd = (-XDiff) / xDivider;
}
_root.zSpd = 12 + nPow;
if (p1x > _root.XCoords[5]) {
gotoAndStop (5);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (4);
}
if (nPow < 5) {
swoosh.swish._visible = 0;
_root.zSpd = 13 + ((-p1z) / 11);
}
_root.sndHit.play();
_root.blnForward = 1;
_root.blnNetCheck = 0;
_root.nBCount = 0;
if ((_root.blnServe == 1) && (_root.nPTurn == 2)) {
_root.blnServe = 0;
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
}
nPow = 0;
if (xDivider != 2.5) {
break;
}
xDivider = 4;
yPow = 3;
}
}
}
Frame 143
trainCount = 0;
Frame 146
viewP = 2600;
var Radian = 0.0174444444444444;
var x = 9;
var xSpd = 0;
var ySpd = 0;
var zSpd = 0;
var y;
var z;
var bx;
var by;
var bz;
friction = 0.96;
gravity = 0;
netcoeff = 0.1;
bouncecoeff = 0.5;
MovieXSize = 275;
MovieYSize = 194;
var NumLines = 8;
var Numpoints = 12;
var XCoords = [-29, -34, 34, 29, 29, 29, -48, 48, 29, 29, -17, -17];
var YCoords = [0, 0, 0, 0, -5, -4, -4, -4, 0, 0, 0, -10];
var ZCoords = [-150, 150, 150, -150, -150, -150, 0, 0, -150, -149, 150, 150];
var RotatedX = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedX1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedX2 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY2 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ2 = [0, 0, 0, 0, 0, 0, 0, 0];
var ScreenX = [0, 0, 0, 0, 0, 0, 0, 0];
var ScreenY = [0, 0, 0, 0, 0, 0, 0, 0];
var Lines = [0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11];
Frame 147
var blnForward = 1;
var nBCount = 0;
var blnServe = 0;
var nServeSide = 1;
var nServeCount = 0;
var nMissCount = 0;
var nHitCount = 0;
var strWhatGwan = "NICE";
var strMsg = "";
var nPTurn = 1;
var blnCanServe = 0;
var blnNetCheck = 0;
var nBallDepth = 1;
var nGame = 1;
var nSet = 1;
var nTotalGames = 5;
var p1Score = 0;
var p2Score = 0;
var p1Games = 0;
var p2Games = 0;
var p1Sets = 0;
var p2Sets = 0;
var arrComments1 = new Array();
var arrComments2 = new Array();
var arrComments3 = new Array();
var arrComments4 = new Array();
var arrComments5 = new Array();
arrComments1[0] = "PEACH";
arrComments1[1] = "SWEET SHOT";
arrComments1[2] = "BEAUT!";
arrComments1[3] = "NICE";
arrComments2[0] = "ERP!!!";
arrComments2[1] = "YOU MISSED IT";
arrComments2[2] = "SORT IT OUT";
arrComments2[3] = "OH DEAR!";
arrComments3[0] = "TAKE IT EASY";
arrComments3[1] = "IT'S LONG";
arrComments3[2] = "OUT";
arrComments3[3] = "TOO HARD";
arrComments4[0] = "POOR SHOT";
arrComments4[1] = "KEEP IT IN";
arrComments4[2] = "OUT";
arrComments4[3] = "WIDE!";
arrComments5[0] = "WELL LEFT";
arrComments5[1] = "THAT'LL DO YER";
arrComments5[2] = "WELL OUT!";
arrComments5[3] = "GONE OUT!";
movMsgs.gotoAndPlay("POINT");
stop();
Instance of Symbol 259 MovieClip "ball" in Frame 147
onClipEvent (load) {
var nBallStatus = 0;
var nDir = 1;
}
onClipEvent (enterFrame) {
if (_root.nPTurn == 1) {
switch (nBallStatus) {
case 0 :
_root.XCoords[4] = _root.movP1.p1x;
_root.XCoords[5] = _root.movP1.p1x;
_root.ZCoords[4] = _root.movP1.p1z;
_root.ZCoords[5] = _root.movP1.p1z;
_root.YCoords[4] = -4;
_root.YCoords[5] = -5;
_root.XCoords[8] = _root.XCoords[4];
_root.XCoords[9] = _root.XCoords[5];
_root.ZCoords[8] = _root.ZCoords[4];
_root.ZCoords[9] = _root.ZCoords[5];
_x = _root.movP1._x;
_y = _root.movP1._y;
_root.fDo3D();
_root.shadow._visible = 1;
break;
case 1 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount == 1) {
nBallStatus = 2;
}
break;
case 2 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount >= 1) {
_root.fTTPointOver();
}
break;
case 2.5 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
break;
case 3 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if ((_root.ZCoords[5] >= 270) || (_root.ZCoords[5] <= -270)) {
_root.fTTPointOver();
}
if (_root.nBCount >= 3) {
_root.fTTPointOver();
}
if (((_root.ZCoords[5] > 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 1)) {
if (_root.YCoords[5] >= (_root.YCoords[6] - 1)) {
_root.zSpd = (-_root.zSpd) / 5;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 0;
}
_root.blnNetCheck = 1;
}
if (!(((_root.ZCoords[5] < 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 0))) {
break;
}
if (_root.YCoords[5] >= (_root.YCoords[6] - 1)) {
_root.zSpd = (-_root.zSpd) / 5;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 1;
}
_root.blnNetCheck = 1;
}
}
if (_root.nPTurn == 2) {
switch (nBallStatus) {
case 0 :
_root.XCoords[4] = _root.XCoords[10];
_root.XCoords[5] = _root.XCoords[10];
_root.ZCoords[4] = _root.ZCoords[10];
_root.ZCoords[5] = _root.ZCoords[10];
_root.YCoords[4] = -4;
_root.YCoords[5] = -5;
_root.XCoords[8] = _root.XCoords[4];
_root.XCoords[9] = _root.XCoords[5];
_root.ZCoords[8] = _root.ZCoords[4];
_root.ZCoords[9] = _root.ZCoords[5];
_root.fVRBall();
_root.fDo3D();
break;
case 1 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount == 1) {
nBallStatus = 2;
}
break;
case 2 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount >= 1) {
_root.fTTPointOver();
}
break;
case 3 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if ((_root.ZCoords[5] >= 270) || (_root.ZCoords[5] <= -270)) {
_root.fTTPointOver();
}
if (_root.nBCount >= 3) {
_root.fTTPointOver();
}
if (((_root.ZCoords[5] > 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 1)) {
if (_root.YCoords[5] >= _root.YCoords[6]) {
_root.zSpd = -_root.zSpd;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 0;
}
_root.blnNetCheck = 1;
}
if (!(((_root.ZCoords[5] < 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 0))) {
break;
}
if (_root.YCoords[5] >= _root.YCoords[6]) {
_root.zSpd = -_root.zSpd;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 1;
}
_root.blnNetCheck = 1;
}
}
}
Frame 154
if (nBallDepth == 0) {
ball.swapDepths(movNet);
}
Frame 158
sndSwish.play();
Frame 166
if (blnTraining == 1) {
gotoAndPlay ("TRAIN");
} else if (blnTraining == 2) {
gotoAndPlay ("PRACTICE");
}
Frame 171
_quality = "medium";
Instance of Symbol 460 MovieClip "movRobot" in Frame 173
onClipEvent (load) {
var p2XSpd = 0;
var p2ZSpd = 0;
var XCapable = 30;
var myZTarg = 0;
var XTarg = 0;
var YTarg = -4;
var ZTarg = (150 + myZTarg);
var XBouncePoint;
var YBouncePoint;
var ZBouncePoint;
var nServeTime = 0;
var nDirection = 2;
}
onClipEvent (enterFrame) {
if (_root.nPTurn == 2) {
switch (_root.ball.nBallStatus) {
case 0 :
nServeTime++;
if (nServeTime >= 70) {
_root.blnCanServe = 1;
nServeTime = 0;
}
if (_root.nBallDepth == 1) {
_root.nBallDepth = 0;
_root.ball.swapDepths(_root.movNet);
}
if (_root.blnCanServe) {
_root.ySpd = -6;
_root.gravity = 0.5;
_root.ball.nBallStatus = 1;
_root.blnCanServe = 0;
}
break;
case 1 :
if (_root.YCoords[4] < -5) {
_root.blnServe = 1;
_root.nServeCount++;
_root.ball.nBallStatus = 3;
blnP = 0;
_root.ySpd = -3;
_root.zSpd = -18;
if (nDirection == 1) {
_root.xSpd = 0.8;
}
if (nDirection == 2) {
_root.xSpd = 0;
}
if (nDirection == 3) {
_root.xSpd = -0.8;
}
nDirection++;
if (nDirection == 4) {
nDirection = 1;
}
_root.blnForward = 0;
_root.blnNetCheck = 0;
_root.nBCount = 0;
_root.sndPop.play();
} else {
_root.ball.nBallStatus = 2;
}
break;
case 2 :
break;
case 3 :
}
}
}
Instance of Symbol 232 MovieClip "movP1" in Frame 173
onClipEvent (load) {
startDrag (_this, true, 0, 175, 550, 400);
var nPow = 0;
var blnP = 0;
var xDivider = 4;
var yPow = 3;
var Xdiff;
var Ydiff;
var Zdiff;
var p1XCapable = 22;
var p1ZCapable = 45;
var p1Z2Capable = 90;
}
onClipEvent (enterFrame) {
if (blnP) {
nPow = nPow + 1.5;
if (nPow > 4) {
powerbar._alpha = 100;
powerbar.gotoAndStop(int(nPow));
}
} else {
powerbar._alpha = 0;
}
if (nPow > 28) {
nPow = 28;
}
p1Xratio = 0.178 - ((_y - 305) * 0.00036);
p1Zratio = 1.1;
p1x = (_x - 280) * p1Xratio;
p1z = (-(_y - 170)) * p1Zratio;
if (blnP && (nPow > 4)) {
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
}
if (nBallStatus == 0) {
gotoAndStop (1);
}
}
onClipEvent (mouseDown) {
if (_root.nPTurn == 1) {
switch (_root.ball.nBallStatus) {
case 0 :
_root.ball.nBallStatus = 1;
_root.ySpd = -6;
_root.gravity = 0.5;
if (_root.nBallDepth == 0) {
_root.nBallDepth = 1;
_root.ball.swapDepths(_root.movNet);
}
gotoAndStop (2);
break;
case 1 :
if ((((_root.YCoords[4] > -30) && (_root.YCoords[4] < -10)) && (_root.ball._x > (_x - 20))) && (_root.ball._x < (_x + 20))) {
_root.blnServe = 1;
_root.nServeCount++;
_root.ball.nBallStatus = 2.5;
blnP = 1;
} else {
_root.ball.nBallStatus = 2;
}
break;
case 2 :
break;
case 3 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
blnP = 1;
}
}
if (_root.nPTurn == 2) {
switch (_root.ball.nBallStatus) {
case 0 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 1 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 2 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
break;
case 3 :
if (p1x > _root.XCoords[5]) {
gotoAndStop (6);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (3);
}
blnP = 1;
}
}
}
onClipEvent (mouseUp) {
if (_root.nPTurn >= 1) {
switch (_root.ball.nBallStatus) {
case 0 :
gotoAndStop (1);
break;
case 1 :
gotoAndStop (1);
break;
case 2 :
gotoAndStop (1);
break;
case 2.5 :
gotoAndStop (1);
startDrag (_this, true, 0, 175, 550, 400);
blnP = 0;
_root.ySpd = -1.5;
_root.xSpd = (-(_x - _root.MovieXSize)) / 50;
_root.zSpd = 24;
_root.blnForward = 1;
_root.blnNetCheck = 0;
_root.sndHit.play();
_root.nBCount = 0;
if ((_root.blnServe == 1) && (_root.nPTurn == 2)) {
_root.blnServe = 0;
}
nPow = 0;
_root.fCalcEndPos();
_root.ball.nBallStatus = 3;
_root.shadow._visible = 1;
break;
case 3 :
startDrag (_this, true, 0, 175, 550, 400);
blnP = 0;
XDiff = p1x - _root.XCoords[4];
YDiff = _root.YCoords[4];
ZDiff = p1z - _root.ZCoords[4];
if (((((ZDiff > (-p1ZCapable)) && (ZDiff < p1Z2Capable)) && (_root.ball.nBallStatus != 2)) && (_root.YCoords[4] < 0)) && (_root.nBCount < 2)) {
if ((XDiff > (-p1XCapable)) && (XDiff < p1XCapable)) {
if ((XDiff > -2) && (XDiff < 2)) {
_root.ySpd = -yPow;
_root.xSpd = 0;
} else if (XDiff < -2) {
_root.ySpd = -yPow;
_root.xSpd = (-XDiff) / xDivider;
} else if (XDiff > 2) {
_root.ySpd = -yPow;
_root.xSpd = (-XDiff) / xDivider;
}
_root.zSpd = 12 + nPow;
if (p1x > _root.XCoords[5]) {
gotoAndStop (5);
} else if (p1x <= _root.XCoords[5]) {
gotoAndStop (4);
}
if (nPow < 5) {
swoosh.swish._visible = 0;
_root.zSpd = 13 + ((-p1z) / 11);
}
_root.sndHit.play();
_root.blnForward = 1;
_root.blnNetCheck = 0;
if (_root.blnTraining == 2) {
_root.nHitCount++;
}
_root.nBCount = 0;
if ((_root.blnServe == 1) && (_root.nPTurn == 2)) {
_root.blnServe = 0;
}
} else {
gotoAndStop (1);
}
} else {
gotoAndStop (1);
}
nPow = 0;
if (xDivider == 2.5) {
xDivider = 4;
yPow = 3;
}
_root.fCalcEndPos();
}
}
}
Frame 186
viewP = 2600;
var Radian = 0.0174444444444444;
var x = 9;
var xSpd = 0;
var ySpd = 0;
var zSpd = 0;
var y;
var z;
var bx;
var by;
var bz;
friction = 0.96;
gravity = 0;
netcoeff = 0.1;
bouncecoeff = 0.5;
MovieXSize = 275;
MovieYSize = 194;
var NumLines = 8;
var Numpoints = 12;
var XCoords = [-29, -34, 34, 29, 0, 0, -48, 48, 29, 29, 0, 0];
var YCoords = [0, 0, 0, 0, -5, -4, -4, -4, 0, 0, 0, -10];
var ZCoords = [-150, 150, 150, -150, 150, 150, 0, 0, -150, -149, 100, 100];
var RotatedX = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedX1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ1 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedX2 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedY2 = [0, 0, 0, 0, 0, 0, 0, 0];
var RotatedZ2 = [0, 0, 0, 0, 0, 0, 0, 0];
var ScreenX = [0, 0, 0, 0, 0, 0, 0, 0];
var ScreenY = [0, 0, 0, 0, 0, 0, 0, 0];
var Lines = [0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 6, 7, 8, 9, 10, 11];
Frame 187
var blnForward = 1;
var nBCount = 0;
var blnServe = 0;
var nServeSide = 1;
var nServeCount = 0;
var nMissCount = 0;
var nHitCount = 0;
var strWhatGwan = "NICE";
var strMsg = "";
var nPTurn = 2;
var blnCanServe = 0;
var blnNetCheck = 0;
var nBallDepth = 1;
var nGame = 1;
var nSet = 1;
var nTotalGames = 5;
var p1Score = 0;
var p2Score = 0;
var p1Games = 0;
var p2Games = 0;
var p1Sets = 0;
var p2Sets = 0;
var arrComments1 = new Array();
var arrComments2 = new Array();
var arrComments3 = new Array();
var arrComments4 = new Array();
var arrComments5 = new Array();
arrComments1[0] = "PEACH";
arrComments1[1] = "SWEET SHOT";
arrComments1[2] = "BEAUT!";
arrComments1[3] = "NICE";
arrComments2[0] = "ERP!!!";
arrComments2[1] = "YOU MISSED IT";
arrComments2[2] = "SORT IT OUT";
arrComments2[3] = "OH DEAR!";
arrComments3[0] = "TAKE IT EASY";
arrComments3[1] = "IT'S LONG";
arrComments3[2] = "OUT";
arrComments3[3] = "TOO HARD";
arrComments4[0] = "POOR SHOT";
arrComments4[1] = "KEEP IT IN";
arrComments4[2] = "OUT";
arrComments4[3] = "WIDE!";
arrComments5[0] = "WELL LEFT";
arrComments5[1] = "THAT'LL DO YER";
arrComments5[2] = "WELL OUT!";
arrComments5[3] = "GONE OUT!";
movMsgs.gotoAndPlay("POINT");
stop();
Instance of Symbol 259 MovieClip "ball" in Frame 187
onClipEvent (load) {
var nBallStatus = 0;
var nDir = 1;
}
onClipEvent (enterFrame) {
if (_root.nPTurn == 1) {
switch (nBallStatus) {
case 0 :
_root.XCoords[4] = _root.movP1.p1x;
_root.XCoords[5] = _root.movP1.p1x;
_root.ZCoords[4] = _root.movP1.p1z;
_root.ZCoords[5] = _root.movP1.p1z;
_root.YCoords[4] = -4;
_root.YCoords[5] = -5;
_root.XCoords[8] = _root.XCoords[4];
_root.XCoords[9] = _root.XCoords[5];
_root.ZCoords[8] = _root.ZCoords[4];
_root.ZCoords[9] = _root.ZCoords[5];
_x = _root.movP1._x;
_y = _root.movP1._y;
_root.fDo3D();
_root.shadow._visible = 1;
break;
case 1 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount == 1) {
nBallStatus = 2;
}
break;
case 2 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount >= 1) {
_root.fTTPointOver();
}
break;
case 2.5 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
break;
case 3 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if ((_root.ZCoords[5] >= 270) || (_root.ZCoords[5] <= -270)) {
_root.fTTPointOver();
}
if (_root.nBCount >= 3) {
_root.fTTPointOver();
}
if (((_root.ZCoords[5] > 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 1)) {
if (_root.YCoords[5] >= (_root.YCoords[6] - 1)) {
_root.zSpd = (-_root.zSpd) / 5;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 0;
}
_root.blnNetCheck = 1;
}
if (!(((_root.ZCoords[5] < 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 0))) {
break;
}
if (_root.YCoords[5] >= (_root.YCoords[6] - 1)) {
_root.zSpd = (-_root.zSpd) / 5;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 1;
}
_root.blnNetCheck = 1;
}
}
if (_root.nPTurn == 2) {
switch (nBallStatus) {
case 0 :
_root.XCoords[4] = _root.XCoords[10];
_root.XCoords[5] = _root.XCoords[10];
_root.ZCoords[4] = _root.ZCoords[10];
_root.ZCoords[5] = _root.ZCoords[10];
_root.YCoords[4] = -4;
_root.YCoords[5] = -5;
_root.XCoords[8] = _root.XCoords[4];
_root.XCoords[9] = _root.XCoords[5];
_root.ZCoords[8] = _root.ZCoords[4];
_root.ZCoords[9] = _root.ZCoords[5];
_root.fVRBall();
_root.fDo3D();
break;
case 1 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount == 1) {
nBallStatus = 2;
}
break;
case 2 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if (_root.nBCount >= 1) {
_root.fTTPointOver();
}
break;
case 3 :
_root.fBallMove();
_root.fVRBall();
_root.fDo3D();
if ((_root.ZCoords[5] >= 270) || (_root.ZCoords[5] <= -270)) {
_root.fTTPointOver();
}
if (_root.nBCount >= 3) {
_root.fTTPointOver();
}
if (((_root.ZCoords[5] > 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 1)) {
if (_root.YCoords[5] >= _root.YCoords[6]) {
_root.zSpd = -_root.zSpd;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 0;
}
_root.blnNetCheck = 1;
}
if (!(((_root.ZCoords[5] < 0) && (_root.blnNetCheck == 0)) && (_root.blnForward == 0))) {
break;
}
if (_root.YCoords[5] >= _root.YCoords[6]) {
_root.zSpd = -_root.zSpd;
_root.ySpd = 0.05;
_root.xSpd = 0.05;
if (_root.blnServe) {
_root.strWhatGwan = "SERVEOUT";
} else {
_root.strWhatGwan = "B4NET";
}
} else {
_root.ball.swapDepths(_root.movNet);
_root.nBallDepth = 1;
}
_root.blnNetCheck = 1;
}
}
}
Frame 196
_quality = "high";
gotoAndStop ("LOGIN");
Frame 201
stop();
Frame 203
stop();
Symbol 28 Button
on (release) {
getURL ("http://www.gamesarcade.net");
}
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 37 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 37 MovieClip Frame 3
_root.movUmpire.play();
Symbol 38 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 38 MovieClip Frame 3
if (_root.nPTurn == 1) {
if (((_root.strMsg != "GAME !") && (_root.strMsg != "")) && (_root.strMsg != "GET READY!")) {
if (_root.movScoreBoard.movS.p1S == "D") {
_root.sndDeuce.play();
} else if (_root.movScoreBoard.movS.p1S == "0") {
_root.sndLove.play();
} else if (_root.movScoreBoard.movS.p1S == "15") {
_root.snd15.play();
} else if (_root.movScoreBoard.movS.p1S == "30") {
_root.snd30.play();
} else if ((_root.movScoreBoard.movS.p1S == "40") && (_root.movScoreBoard.movS.p2S != "ADV")) {
_root.snd40.play();
} else if ((_root.movScoreBoard.movS.p1S == "40") && (_root.movScoreBoard.movS.p2S == "ADV")) {
_root.sndAComp.play();
} else if ((_root.movScoreBoard.movS.p1S == "ADV") && (_root.movScoreBoard.movS.p2S == "40")) {
_root.sndAYou.play();
}
} else if (_root.strMsg == "GAME !") {
_root.sndGame.play();
}
} else if (((_root.strMsg != "GAME !") && (_root.strMsg != "")) && (_root.strMsg != "GET READY!")) {
if (_root.movScoreBoard.movS.p2S == "D") {
_root.sndDeuce.play();
} else if (_root.movScoreBoard.movS.p2S == "0") {
_root.sndLove.play();
} else if (_root.movScoreBoard.movS.p2S == "15") {
_root.snd15.play();
} else if (_root.movScoreBoard.movS.p2S == "30") {
_root.snd30.play();
} else if ((_root.movScoreBoard.movS.p2S == "40") && (_root.movScoreBoard.movS.p1S != "ADV")) {
_root.snd40.play();
} else if ((_root.movScoreBoard.movS.p2S == "40") && (_root.movScoreBoard.movS.p1S == "ADV")) {
_root.sndAYou.play();
} else if ((_root.movScoreBoard.movS.p2S == "ADV") && (_root.movScoreBoard.movS.p1S == "40")) {
_root.sndAComp.play();
}
} else if (_root.strMsg == "GAME !") {
_root.sndGame.play();
}
Symbol 38 MovieClip Frame 17
if (_root.nPTurn == 1) {
if (((_root.strMsg != "GAME !") && (_root.strMsg != "")) && (_root.strMsg != "GET READY!")) {
if (_root.movScoreBoard.movS.p2S == "0") {
_root.sndLove.play();
} else if (_root.movScoreBoard.movS.p2S == "15") {
if (_root.movScoreBoard.movS.p1S == "15") {
_root.sndAll.play();
} else {
_root.snd15.play();
}
} else if (_root.movScoreBoard.movS.p2S == "30") {
if (_root.movScoreBoard.movS.p1S == "30") {
_root.sndAll.play();
} else {
_root.snd30.play();
}
} else if ((_root.movScoreBoard.movS.p2S == "40") && (_root.movScoreBoard.movS.p1S != "ADV")) {
_root.snd40.play();
}
}
} else if (((_root.strMsg != "GAME !") && (_root.strMsg != "")) && (_root.strMsg != "GET READY!")) {
if (_root.movScoreBoard.movS.p1S == "0") {
_root.sndLove.play();
} else if (_root.movScoreBoard.movS.p1S == "15") {
if (_root.movScoreBoard.movS.p2S == "15") {
_root.sndAll.play();
} else {
_root.snd15.play();
}
} else if (_root.movScoreBoard.movS.p1S == "30") {
if (_root.movScoreBoard.movS.p2S == "30") {
_root.sndAll.play();
} else {
_root.snd30.play();
}
} else if ((_root.movScoreBoard.movS.p1S == "40") && (_root.movScoreBoard.movS.p2S != "ADV")) {
_root.snd40.play();
}
}
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 44 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 46 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 2
if (_root.blnFX == 0) {
gotoAndStop (1);
}
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 2
if (_root.blnMusic == 0) {
gotoAndStop (1);
}
Symbol 61 MovieClip Frame 3
stop();
Symbol 64 Button
on (rollOver) {
_root.sndPop.play();
}
on (release) {
gotoAndPlay ("rules");
var blnTraining = 1;
var nCourtType = 1;
}
Symbol 67 Button
on (release) {
gotoAndStop ("TABLES");
}
Symbol 71 Button
on (release) {
nextFrame();
var blnTraining = 0;
var nCourtType = 1;
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 74 Button
on (rollOver) {
_root.sndPop.play();
}
on (release) {
gotoAndPlay ("INSTRUCTIONS");
var blnTraining = 1;
var nCourtType = 1;
}
Symbol 75 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 83 Button
on (release, releaseOutside, keyPress "s") {
gotoAndPlay ("off");
_root.blnFX = 0;
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 86 Button
on (release, releaseOutside, keyPress "s") {
gotoAndPlay ("on");
_root.blnFX = 1;
}
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 10
stop();
Symbol 93 Button
on (release, releaseOutside, keyPress "m") {
gotoAndStop ("off");
_root.blnMusic = 0;
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 97 Button
on (release, releaseOutside, keyPress "m") {
_root.blnMusic = 1;
gotoAndStop ("on");
}
Symbol 98 MovieClip Frame 1
_root.sndMusic.gotoAndPlay(1);
stop();
Symbol 98 MovieClip Frame 10
_root.sndMusic.gotoAndPlay(5);
stop();
Symbol 109 Button
on (release) {
var nLevel = 1;
var strOppo = "MARTINA";
var tid = 1;
var gid = 9;
loadVariablesNum ("timesplayed.asp", 0, "POST");
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 115 Button
on (release) {
var nLevel = 2;
var strOppo = "JIMMY";
var tid = 2;
var gid = 9;
loadVariablesNum ("timesplayed.asp", 0, "POST");
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 122 Button
on (release) {
var nLevel = 3;
var strOppo = "ANDRE";
var tid = 3;
var gid = 9;
loadVariablesNum ("timesplayed.asp", 0, "POST");
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 126 Button
on (release) {
gotoAndStop ("LOGIN");
}
Symbol 130 Button
on (release) {
nextFrame();
var blnTraining = 0;
var nCourtType = 1;
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 135 Button
on (rollOver) {
_root.sndPop.play();
}
on (release) {
gotoAndPlay ("rules");
var blnTraining = 1;
var nCourtType = 1;
}
Symbol 141 Button
on (rollOver) {
_root.sndPop.play();
}
on (release) {
gotoAndPlay ("INSTRUCTIONS");
var blnTraining = 1;
var nCourtType = 1;
}
Symbol 147 Button
on (release) {
gotoAndStop ("LOGIN");
}
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 2
stop();
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 2
stop();
Symbol 169 MovieClip Frame 3
stop();
Instance of Symbol 169 MovieClip "head" in Symbol 174 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.nLevel);
}
Symbol 174 MovieClip Frame 4
_parent.gotoAndStop(1);
stop();
Instance of Symbol 169 MovieClip "head" in Symbol 178 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.nLevel);
}
Symbol 178 MovieClip Frame 4
_parent.gotoAndStop(1);
stop();
Symbol 180 MovieClip Frame 1
stop();
Instance of Symbol 169 MovieClip "head" in Symbol 180 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.nLevel);
}
Symbol 180 MovieClip Frame 2
stop();
Symbol 180 MovieClip Frame 3
stop();
Symbol 180 MovieClip Frame 4
stop();
Instance of Symbol 169 MovieClip "head" in Symbol 180 MovieClip Frame 4
onClipEvent (load) {
gotoAndStop(_root.nLevel);
}
Symbol 186 MovieClip Frame 1
stop();
Symbol 191 Button
on (keyPress "Q") {
gotoAndPlay ("QUIT");
}
on (keyPress "q") {
gotoAndPlay ("QUIT");
}
Symbol 214 MovieClip Frame 7
stop();
Symbol 222 MovieClip Frame 8
stop();
Symbol 232 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 2
stop();
Symbol 232 MovieClip Frame 3
stop();
Symbol 232 MovieClip Frame 4
stop();
Symbol 232 MovieClip Frame 5
stop();
Symbol 232 MovieClip Frame 6
stop();
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 4
if ((_root.strMsg == "GAME !") && (_root.nServeCount == 1)) {
msgs1.M1 = "";
msgs2.M2 = "";
} else {
msgs1.M1 = _root.strMsg;
msgs2.M2 = _root.strMsg;
}
if (((((((_root.strMsg != "GAME !") && (_root.strMsg != "YOU WIN !")) && (_root.strMsg != "YOU LOSE !")) && (_root.strMsg != "")) && (_root.strMsg != "GET READY!")) && (_root.blnTraining == 0)) && (_root.nServeCount != 1)) {
if (_root.movScoreBoard.movS.p1S == "D") {
msgs1.M1S = "DEUCE";
msgs2.M2S = "DEUCE";
} else if (_root.nPTurn == 1) {
msgs1.M1S = (_root.movScoreBoard.movS.p1S + " - ") + _root.movScoreBoard.movS.p2S;
msgs2.M2S = (_root.movScoreBoard.movS.p1S + " - ") + _root.movScoreBoard.movS.p2S;
} else {
msgs1.M1S = (_root.movScoreBoard.movS.p2S + " - ") + _root.movScoreBoard.movS.p1S;
msgs2.M2S = (_root.movScoreBoard.movS.p2S + " - ") + _root.movScoreBoard.movS.p1S;
}
} else if ((_root.strMsg == "GET READY!") && (_root.blnTraining == 0)) {
msgs1.M1S = "YOUR SERVE";
msgs2.M2S = "YOUR SERVE";
}
if (((_root.strMsg != "YOU WIN !") && (_root.strMsg != "YOU LOSE !")) && (_root.nServeCount != 1)) {
_root.sndUmpire.play();
}
Symbol 244 MovieClip Frame 27
msgs1.M1 = "";
msgs2.M2 = "";
msgs1.M1S = "";
msgs2.M2S = "";
if ((_root.strMsg == "YOU WIN !") || (_root.strMsg == "YOU LOSE !")) {
_root.gotoAndPlay("GAMEOVER");
} else {
_root.strMsg = "";
_root.strMsg = "";
}
Instance of Symbol 255 MovieClip "movS" in Symbol 257 MovieClip Frame 1
onClipEvent (load) {
txtPlaying = _root.strOppo;
}
onClipEvent (enterFrame) {
switch (_root.p1Score) {
case 0 :
p1S = 0;
break;
case 1 :
p1S = 15;
break;
case 2 :
p1S = 30;
break;
case 3 :
if (_root.p2Score == 3) {
p1S = "D";
} else {
p1S = 40;
}
break;
case 4 :
p1S = "ADV";
}
switch (_root.p2Score) {
case 0 :
p2S = 0;
break;
case 1 :
p2S = 15;
break;
case 2 :
p2S = 30;
break;
case 3 :
if (_root.p1Score == 3) {
p2S = "D";
} else {
p2S = 40;
}
break;
case 4 :
p2S = "ADV";
}
p1G = _root.p1Games;
p1Sets = _root.p1Sets;
p2G = _root.p2Games;
p2Sets = _root.p2Sets;
}
Symbol 272 Button
on (release) {
gotoAndPlay (1);
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 274 Button
on (release) {
_parent.play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 284 Button
on (release) {
_root.gotoAndPlay(1);
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 287 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 2
stop();
Symbol 287 MovieClip Frame 3
stop();
Symbol 287 MovieClip Frame 4
stop();
Symbol 296 Button
on (release) {
if ((my_name.length > 0) and emailValidator(my_email)) {
nextFrame();
} else {
validEmail.gotoAndPlay(2);
}
}
on (rollOver) {
_root.Sbleep.start();
}
Symbol 301 Button
on (release) {
nextFrame();
}
Symbol 303 Button
on (release) {
prevFrame();
}
Symbol 304 MovieClip Frame 1
_root.optin = false;
stop();
Symbol 304 MovieClip Frame 2
_root.optin = true;
Symbol 309 MovieClip Frame 1
stop();
Symbol 312 Button
on (press) {
_root.gotoAndPlay(1);
}
on (rollOver) {
_root.Sbleep.start();
}
Symbol 314 Button
on (release) {
nextFrame();
}
on (rollOver) {
_root.Sbleep.start();
}
Symbol 318 Button
on (press) {
offsetDo = "down";
}
on (release, releaseOutside) {
offsetDo = "none";
}
Symbol 319 Button
on (press) {
offsetDo = "up";
}
on (release, releaseOutside) {
offsetDo = "none";
}
Symbol 343 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 2
stop();
Symbol 343 MovieClip Frame 3
stop();
Symbol 343 MovieClip Frame 4
stop();
Symbol 344 Button
on (release) {
if ((mates_name1.length > 0) and (mates_email1.length > 3)) {
nextFrame();
}
}
on (rollOver) {
_root.Sbleep.start();
}
Symbol 378 Button
on (press) {
gotoAndStop ("gamestart");
}
on (rollOver) {
_root.Sbleep.start();
}
Symbol 381 MovieClip Frame 1
function emailValidator(emailInput) {
var _local1 = emailInput;
if ((((((((((_local1.length < 6) || (_local1.indexOf(",") >= 0)) || (_local1.indexOf(";") >= 0)) || (_local1.indexOf(":") >= 0)) || (_local1.indexOf("/") >= 0)) || (_local1.indexOf(" ") >= 0)) || (_local1.indexOf("@") <= 0)) || (_local1.indexOf("@") != _local1.lastIndexOf("@"))) || (_local1.lastIndexOf(".") < _local1.indexOf("@"))) || ((_local1.lastIndexOf(".") + 3) > _local1.length)) {
r = false;
} else {
r = true;
}
return(r);
}
function lTrim(str) {
var _local1 = str;
tstr = "";
i = 0;
while (i < _local1.length) {
((_local1.charCodeAt(i) > 10) ? ((tstr = tstr + _local1.charAt(i))) : 0);
i++;
}
return(tstr);
}
my_name = "";
my_email = "";
stop();
Symbol 381 MovieClip Frame 2
((_root.score == undefined) ? ((_root.score = 0)) : 0);
lv = new LoadVars();
lv.my_name = my_name;
lv.my_email = my_email;
lv.score = _root.score;
lv.optin = _root.optin;
lv.tablename = "wimbledon";
lv.sendAndLoad("http://www.thebiographychannel.co.uk/tennis_game/register_user.php", lv, "POST");
lv.onLoad = function (success) {
if (success) {
nextFrame();
} else {
trace("File not found!");
}
};
stop();
Symbol 381 MovieClip Frame 3
offset = 0;
lv = new LoadVars();
lv.tablename = "wimbledon";
lv.sendAndLoad("http://www.thebiographychannel.co.uk/tennis_game/highscores.php", lv, "POST");
lv.onLoad = function (success) {
if (success) {
tn = new Array();
ts = new Array();
for (i in lv) {
(((i != "tablename") and (i != "onLoad")) ? ((str = lTrim(i))) : 0);
}
spl = str.split(",");
i = 0;
while (i < 51) {
ns = spl[i].split(":");
tn[i] = ns[0];
ts[i] = ns[1];
i++;
}
}
};
this.onEnterFrame = function () {
var _local1 = this;
i = 0;
while (i < 11) {
ind = i + offset;
((tn[ind] != undefined) ? ((_local1["topname" + (i + 1)] = String(((ind + 1) add ". ") + tn[ind]))) : ((_local1["topname" + (i + 1)] = String(ind + 1))));
if (ts[ind] != undefined) {
if (((ts[ind] == 1) || (ts[ind] == 2)) || (ts[ind] == 3)) {
_local1["cup" + (i + 1)].gotoAndStop(ts[ind]);
} else {
_local1["cup" + (i + 1)].gotoAndStop(4);
}
} else {
_local1["cup" + (i + 1)].gotoAndStop(4);
}
i++;
}
if (offsetDo == "up") {
if (offset < 40) {
offset++;
}
}
if (offsetDo == "down") {
if (offset > 0) {
offset--;
}
}
};
stop();
Symbol 381 MovieClip Frame 4
mates_name1 = "";
mates_name2 = "";
mates_name3 = "";
mates_email1 = "";
mates_email2 = "";
mates_email3 = "";
Symbol 381 MovieClip Frame 5
this.loadVariables("http://www.thebiographychannel.co.uk/tennis_game/friendemail.php", "POST");
play();
Symbol 381 MovieClip Frame 30
_root.gotoAndPlay(1);
Symbol 382 Button
on (press) {
_root.gotoAndPlay(1);
}
on (rollOver) {
_root.Sbleep.start();
}
Symbol 424 MovieClip Frame 1
function lTrim(str) {
var _local1 = str;
tstr = "";
i = 0;
while (i < _local1.length) {
((_local1.charCodeAt(i) > 10) ? ((tstr = tstr + _local1.charAt(i))) : 0);
i++;
}
return(tstr);
}
offset = 0;
lv = new LoadVars();
lv.tablename = "wimbledon";
lv.sendAndLoad("http://www.thebiographychannel.co.uk/tennis_game/highscores.php", lv, "POST");
lv.onLoad = function (success) {
if (success) {
tn = new Array();
ts = new Array();
for (i in lv) {
(((i != "tablename") and (i != "onLoad")) ? ((str = lTrim(i))) : 0);
}
spl = str.split(",");
i = 0;
while (i < 51) {
ns = spl[i].split(":");
tn[i] = ns[0];
ts[i] = ns[1];
i++;
}
}
};
this.onEnterFrame = function () {
var _local1 = this;
i = 0;
while (i < 11) {
ind = i + offset;
((tn[ind] != undefined) ? ((_local1["topname" + (i + 1)] = String(((ind + 1) add ". ") + tn[ind]))) : ((_local1["topname" + (i + 1)] = String(ind + 1))));
if (ts[ind] != undefined) {
if (((ts[ind] == 1) || (ts[ind] == 2)) || (ts[ind] == 3)) {
_local1["cup" + (i + 1)].gotoAndStop(ts[ind]);
} else {
_local1["cup" + (i + 1)].gotoAndStop(4);
}
} else {
_local1["cup" + (i + 1)].gotoAndStop(4);
}
i++;
}
if (offsetDo == "up") {
if (offset < 40) {
offset++;
}
}
if (offsetDo == "down") {
if (offset > 0) {
offset--;
}
}
};
stop();
Symbol 424 MovieClip Frame 2
mates_name1 = "";
mates_name2 = "";
mates_name3 = "";
mates_email1 = "";
mates_email2 = "";
mates_email3 = "";
Symbol 424 MovieClip Frame 3
this.loadVariables("http://www.thebiographychannel.co.uk/tennis_game/friendemail.php", "POST");
play();
Symbol 424 MovieClip Frame 28
_root.gotoAndPlay(1);
Symbol 432 Button
on (release) {
_root.play();
}
Symbol 452 Button
on (keyPress "n") {
if (_root.blnTraining == 1) {
_root.trainCount++;
_root.fTTCreateAdvice();
if (_root.trainCount == 6) {
_root.trainCount = 0;
_root.blnTraining = 2;
_root.gotoAndPlay("NEXTTRAIN");
}
} else {
_root.trainCount++;
_root.fTTCreateAdvice2();
if (_root.trainCount == 6) {
_root.gotoAndPlay("QUIT");
_root.blnTraining = 2;
}
}
}
on (keyPress "N") {
if (_root.blnTraining == 1) {
_root.trainCount++;
_root.fTTCreateAdvice();
if (_root.trainCount == 6) {
_root.trainCount = 0;
_root.blnTraining = 2;
_root.gotoAndPlay("NEXTTRAIN");
}
} else {
_root.trainCount++;
_root.fTTCreateAdvice2();
if (_root.trainCount == 7) {
_root.gotoAndPlay("QUIT");
_root.blnTraining = 2;
}
}
}
Symbol 454 Button
on (keyPress "b") {
if (_root.blnTraining == 1) {
_root.trainCount--;
_root.fTTCreateAdvice();
if (_root.trainCount == -1) {
_root.gotoAndPlay("QUIT");
}
} else {
_root.trainCount--;
_root.fTTCreateAdvice2();
if (_root.trainCount == -1) {
_root.blnTraining = 1;
_root.trainCount = 0;
_root.gotoAndPlay("NEXTTRAIN");
}
}
}
on (keyPress "B") {
if (_root.blnTraining == 1) {
_root.trainCount--;
_root.fTTCreateAdvice();
if (_root.trainCount == -1) {
_root.gotoAndPlay("QUIT");
}
} else {
_root.trainCount--;
_root.fTTCreateAdvice2();
if (_root.trainCount == -1) {
_root.blnTraining = 1;
_root.trainCount = 0;
_root.gotoAndPlay("NEXTTRAIN");
}
}
}
Instance of Symbol 456 MovieClip "movHelp" in Symbol 457 MovieClip Frame 21
onClipEvent (load) {
if (_root.blnTraining == 1) {
txtHelpHead = "TRAINING SESSION - SERVING";
} else {
txtHelpHead = "TRAINING SESSION - IN PLAY";
}
}
Symbol 457 MovieClip Frame 30
stop();
Instance of Symbol 456 MovieClip "movHelp" in Symbol 457 MovieClip Frame 30
onClipEvent (load) {
if (_root.blnTraining == 1) {
txtHelpHead = "TRAINING SESSION - SERVING";
txtHelp = "Click your left mouse button once to throw the ball up into the air. Then click again as the ball starts to drop downwards...";
} else {
txtHelpHead = "TRAINING SESSION - IN PLAY";
txtHelp = "Stand in the correct place and click your mouse quickly to hit the ball.";
}
}
Symbol 461 Button
on (release) {
_parent.gotoAndPlay("LOGIN");
var blnTraining = 0;
var nCourtType = 1;
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 471 Button
on (release) {
gotoAndStop (2);
}
Symbol 477 Button
on (release) {
nextFrame();
var blnTraining = 0;
var nCourtType = 1;
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 479 Button
on (release) {
prevFrame();
var blnTraining = 0;
var nCourtType = 1;
play();
}
on (rollOver) {
_root.sndPop.play();
}
Symbol 482 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 2
stop();
Symbol 482 MovieClip Frame 3
stop();
Symbol 489 Button
on (release) {
getURL ("http://www.nextnm.com");
}
Symbol 492 Button
on (release) {
getURL ("http://www.advergamer.co.uk");
}