Frame 1
function fCheckKeys2() {
var _local1 = [];
var _local2 = [];
if (Key.isDown(39)) {
_local1[0] = 1;
_local2 = [1, 0];
} else if (Key.isDown(37)) {
_local1[0] = -1;
_local2 = [-1, 0];
} else {
_local1[0] = 0;
}
if (Key.isDown(38)) {
_local1[1] = -1;
_local2 = [0, -1];
} else if (Key.isDown(40)) {
_local1[1] = 1;
_local2 = [0, 1];
} else {
_local1[1] = 0;
}
if ((_local1[0] != 0) and (_local1[1] != 0)) {
_local2 = _local1.slice();
}
return(_local1);
}
function fCheckEdge2(pPos, pDir, tPlayer) {
var _local2 = 0;
if (pPos[0] < _global.gEdge[tPlayer][0]) {
if (pDir[0] < 0) {
pDir[0] = 0;
}
_local2 = 1;
}
if (pPos[0] > _global.gEdge[tPlayer][1]) {
if (pDir[0] > 0) {
pDir[0] = 0;
}
_local2 = 1;
}
if (_local2 == 1) {
return(pDir);
}
return("none");
}
function fCheckEdgeBounce(pPos, pDir) {
var _local1 = 0;
tDir = [0, 0];
if ((pPos[0] < pEdgesBall[0]) and (pDir[0] < 0)) {
tDir[0] = 1;
_local1 = "off";
}
if ((pPos[0] > pEdgesBall[1]) and (pDir[0] > 0)) {
tDir[0] = -1;
_local1 = "off";
}
if ((pPos[1] < pEdgesBall[2]) and (pDir[1] < 0)) {
tDir[1] = 1;
_local1 = "off";
}
if ((pPos[1] > pEdgesBall[3]) and (pDir[1] > 0)) {
tDir[1] = -1;
_local1 = "off";
}
if (_local1 != 0) {
return({pType:_local1, pDir:tDir});
}
return("none");
}
_global.gActive = 0;
_global.gScore = 0;
_global.gScoreBest = 0;
_global.gHeadTurn = 0;
_global.gCountry = 1;
_global.gEdge = [[-20, 450], [-20, 460]];
_global.mAddHead = function (tPan) {
tPan = ((tPan + 150) / 3.5) - 100;
if (tPan > 100) {
tPan = 100;
} else if (tPan < -100) {
tPan = -100;
}
_global.sfHead(-tPan);
_global.gScore = _global.gScore + 1;
inScore.fUpdateScore();
};
_global.mReset = function () {
if (_global.gScore > _global.gScoreBest) {
_global.gScoreBest = _global.gScore;
_global.sfDing(3);
} else {
_global.sfDing(2);
}
_global.mLastScore();
_global.gScore = 0;
inScore.fUpdateScore();
inScoreBest.fUpdateScore();
};
pEdges = [50, 500, 150, 520];
_global.gEdgeCheckHit = function (tPos, tPlayer) {
if (tPos < _global.gEdge[tPlayer][0]) {
tPos = _global.gEdge[tPlayer][0];
} else if (tPos > _global.gEdge[tPlayer][1]) {
tPos = _global.gEdge[tPlayer][1];
}
return(tPos);
};
pEdgesBall = [-80, 620, 110, 600];
_global.mDtoR = function (tDegrees) {
return((tAngle * PI) / 180);
};
_global.mRtoD = function (tRadians) {
return(tRadians * 57.2957795130823);
};
_global.mVtoD = function (tVect) {
return((Math.atan2(tVect[0], tVect[1]) * 180) / Math.PI);
};
_global.mDtoV = function (tDegrees) {
var _local1 = Math.cos((Math.PI/180) * tDegrees);
var _local2 = Math.sin((Math.PI/180) * tDegrees);
return([_local1, _local2]);
};
_global.mReAngle = function (tDegrees) {
return((tDegrees + 360) % 360);
};
_global.mStartGame = function () {
_global.gActive = 1;
inGame.inBall.fRestart();
inGame.inPlayer.gotoAndStop("norm");
inGame.inAI.gotoAndStop("norm");
inGame.inPhone.gotoAndStop("on");
_global.sfStart(1);
};
_global.mMainMenu = function () {
gotoAndPlay ("menu2");
inTitle.fMove("down");
};
_global.mLastScore = function () {
inLastScore.fUpdateScore(_global.gScore);
};
_global.mGotoHS = function () {
_global.gHSmode = "chart";
gotoAndPlay ("scores");
};
_global.mSubmitScore = function () {
inTitle.gotoAndPlay(1);
inTitle.inT.gotoAndPlay(2);
_global.gHSmode = "enter";
gotoAndPlay ("enter");
};
sHead1 = new Sound(_root.inS1);
sHead1.attachSound("sHead1.wav");
sPhone = new Sound(_root.inS2);
sPhone.attachSound("sPhone.wav");
sDing1 = new Sound(_root.inS3);
sDing1.attachSound("sDing1.wav");
sDing2 = new Sound(_root.inS3);
sDing2.attachSound("sDing2.wav");
sDing3 = new Sound(_root.inS3);
sDing3.attachSound("sDing3.wav");
sWhistle = new Sound(_root.inS4);
sWhistle.attachSound("sWhistle.wav");
sWhoosh = new Sound(_root.inS4);
sWhoosh.attachSound("sWhoosh.wav");
_global.sfStart = function (tType) {
if (tType == 1) {
sWhistle.setVolume(70);
sWhistle.start(0, 0);
} else {
sWhoosh.setVolume(70);
sWhoosh.start(0, 0);
}
};
_global.sfHead = function (tPan) {
if (tPan == undefined) {
tPan = 0;
}
sHead1.setPan(tPan);
sHead1.setVolume(70);
var _local1 = (random(500) + 1) / 10000;
sHead1.start(_local1, 0);
};
_global.sfPhone = function () {
if (random(16) == 4) {
sPhone.setVolume(40);
sPhone.start(0, 0);
}
};
_global.sfDing = function (tVal) {
switch (tVal) {
case 1 :
sDing1.setVolume(50);
sDing1.start(0, 0);
break;
case 2 :
sDing2.setVolume(50);
sDing2.start(0, 0);
break;
case 3 :
sDing3.setVolume(50);
sDing3.start(0, 0);
}
};
Frame 5
stop();
Instance of Symbol 33 MovieClip "inLoader" in Frame 5
onClipEvent (load) {
function myTrace(tText) {
_root.txTrace.text = (_root.txTrace.text + tText) + "\r";
}
myTrace("Loader Total KBytes" + (_root.getBytesTotal() / 1000));
pTotal = _root.getBytesTotal();
pFrameOn = 0;
pFact = 100 / pTotal;
pActive = true;
_global.gLoaded = 0;
_global.gIntroDone = 0;
_global.mIntroFinish = function () {
_global.sfDing(3);
_root.gotoAndPlay("menu");
};
stop();
}
onClipEvent (enterFrame) {
if (pActive == true) {
var tFrame = Math.floor(pFact * _root.getBytesLoaded());
if (tFrame > pFrameOn) {
pFrameOn = pFrameOn + 2;
}
if (pFrameOn >= 100) {
if (_global.gLoaded == 1) {
_root.inFT.play();
}
pActive = false;
gotoAndStop ("blank");
_global.gLoaded = 1;
} else {
this.gotoAndStop(pFrameOn);
}
}
}
Frame 25
inBallBounce.fMove("in");
Frame 33
stop();
Frame 40
stop();
inTitle.fMove("up");
inBallBounce.fMove("out");
Frame 46
inTitle.fMove("up");
inBallBounce.fMove("in");
Instance of Symbol 236 MovieClip "inScores" in Frame 46
onClipEvent (load) {
}
Frame 47
_root.inScores.pingHS("skip");
stop();
Frame 52
inBallBounce.fMove("in");
Frame 53
stop();
Frame 58
inTitle.fMove("up");
Frame 63
stop();
Frame 64
inTitle.fMove("shrink");
inBallBounce.fMove("out");
Frame 137
_global.mStartGame();
Frame 143
stop();
Symbol 30 MovieClip Frame 97
if (_global.gLoaded != 1) {
_global.gLoaded = 1;
stop();
}
Symbol 30 MovieClip Frame 120
_global.mIntroFinish();
Symbol 33 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 49
stop();
Symbol 113 MovieClip Frame 31
gotoAndPlay ("spin1");
Instance of Symbol 113 MovieClip "inBallAnim" in Symbol 116 MovieClip Frame 1
onClipEvent (load) {
}
onClipEvent (enterFrame) {
this._rotation = this._rotation + _parent._parent.pSpin;
}
Symbol 117 MovieClip Frame 1
function fHit() {
inBallComp.inBallAnim.gotoAndPlay(random(58) + 1);
inBallComp.inBallAnim._rotation = random(359);
pSpin = random(20) - 10;
}
function fHead() {
gotoAndPlay ("hit");
}
pSpin = 0;
stop();
Symbol 117 MovieClip Frame 30
stop();
Symbol 118 MovieClip Frame 1
if (this._x > 100) {
_global.sfHead(-80);
} else {
_global.sfHead(80);
}
inBall.pSpin = random(8) - 4;
inBall.gotoAndPlay("squash");
Symbol 118 MovieClip Frame 49
gotoAndPlay ("loop2");
Symbol 119 MovieClip Frame 1
function fMove(tPos) {
if (tPos != pPos) {
switch (tPos) {
case "in" :
if (pPos != "in") {
gotoAndPlay(tPos);
}
break;
case "out" :
if (pPos != "out") {
gotoAndPlay(tPos);
}
break;
case "off" :
if (pPos == "off") {
break;
}
gotoAndPlay(tPos);
}
pPos = tPos;
}
}
pPos = "start";
fMove("in");
Instance of Symbol 118 MovieClip "inb1" in Symbol 119 MovieClip Frame 1
onClipEvent (load) {
}
Instance of Symbol 118 MovieClip "inB2" in Symbol 119 MovieClip Frame 26
onClipEvent (load) {
}
Symbol 119 MovieClip Frame 100
stop();
Symbol 119 MovieClip Frame 119
stop();
Symbol 148 MovieClip Frame 1
gotoAndPlay (45);
Symbol 148 MovieClip Frame 45
stop();
Symbol 149 MovieClip Frame 1
function fMove(tPos) {
if (tPos != pPos) {
switch (tPos) {
case "down" :
break;
case "up" :
break;
case "shrink" :
if (pPos == "down") {
tPos = "upshrink";
}
break;
case "menu" :
}
pPos = tPos;
gotoAndPlay(tPos);
}
}
pPos = "down";
Instance of Symbol 148 MovieClip "inT" in Symbol 149 MovieClip Frame 1
onClipEvent (enterFrame) {
if (random(600) == 5) {
gotoAndPlay ("mid");
}
}
Symbol 149 MovieClip Frame 8
gotoAndPlay (19);
inT.gotoAndPlay(1);
Symbol 149 MovieClip Frame 19
stop();
Instance of Symbol 148 MovieClip "inT" in Symbol 149 MovieClip Frame 19
onClipEvent (enterFrame) {
if (random(600) == 5) {
gotoAndPlay ("mid");
}
}
Symbol 149 MovieClip Frame 30
if (pPos != "upshrink") {
stop();
}
Instance of Symbol 148 MovieClip "inT" in Symbol 149 MovieClip Frame 30
onClipEvent (enterFrame) {
if (random(600) == 5) {
gotoAndPlay ("mid");
}
}
Symbol 149 MovieClip Frame 47
pPos = "shrink";
stop();
Symbol 149 MovieClip Frame 66
pPos = "up";
stop();
Symbol 152 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 157 Button
on (release) {
_global.sfDing(1);
_root.gotoAndPlay("team");
}
on (rollOver) {
inPG.gotoAndStop(2);
}
on (rollOut) {
inPG.gotoAndStop(1);
}
on (dragOver) {
inPG.gotoAndStop(2);
}
on (dragOut) {
inPG.gotoAndStop(1);
}
Symbol 160 MovieClip Frame 1
stop();
Symbol 161 Button
on (release) {
_global.sfDing(1);
_root.gotoAndPlay("instruct");
}
on (rollOver) {
inIn.gotoAndStop(2);
}
on (rollOut) {
inIn.gotoAndStop(1);
}
on (dragOver) {
inIn.gotoAndStop(2);
}
on (dragOut) {
inIn.gotoAndStop(1);
}
Symbol 162 Button
on (release) {
_global.sfDing(1);
_global.mGotoHS();
}
on (rollOver) {
inHS.gotoAndStop(2);
}
on (rollOut) {
inHS.gotoAndStop(1);
}
on (dragOver) {
inHS.gotoAndStop(2);
}
on (dragOut) {
inHS.gotoAndStop(1);
}
Symbol 163 MovieClip Frame 14
stop();
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 29
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 53
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 76
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 103
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 109
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 171 MovieClip in Symbol 175 MovieClip Frame 123
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 178 Button
on (release) {
_global.sfDing(1);
_global.mMainMenu();
}
on (rollOver) {
inHS.gotoAndStop(2);
}
on (rollOut) {
inHS.gotoAndStop(1);
}
on (dragOver) {
inHS.gotoAndStop(2);
}
on (dragOut) {
inHS.gotoAndStop(1);
}
Symbol 181 MovieClip Frame 1
pSpin = 5;
Symbol 181 MovieClip Frame 27
stop();
Symbol 187 MovieClip Frame 1
function fPingData(f, n, e, m, s) {
_parent.fOutput("<inDataIO> -----------------------------------------");
inPing.fPingData(f, n, e, m, s, pLow, pRange, pGID, pType);
}
function cs(n, e, s) {
var _local5 = s;
var _local4 = s;
var _local2 = 0;
while (_local2 < n.length) {
_local5 = _local5 + n.charCodeAt(_local2);
_local2++;
}
var _local3 = 0;
var _local1 = 0;
while (_local1 < e.length) {
if (_local3 == 0) {
_local4 = _local4 + e.charCodeAt(_local1);
_local3 = 1;
} else {
_local3 = 0;
}
_local1++;
}
return(_local5.toString() + _local4.toString());
}
function fResetData() {
gotoAndPlay ("initialise");
}
Instance of Symbol 186 MovieClip "inPing" in Symbol 187 MovieClip Frame 1
onClipEvent (load) {
function fPingData(f, n, e, m, s, l, r, i, t) {
inText.text = f;
tStr = (((((((("id=" + i) + "&f=") + f) + "&l=") + l) + "&r=") + r) + "&c=") + _global.gCountry;
if (f != "g0") {
tStr = (((((tStr + "&e=") + e) + "&n=") + n) + "&m=") + m;
if (f == "s") {
var _local5 = _parent.cs(n, e, s);
tStr = (((tStr + "&s=") + s) + "&chk=") + _local5;
}
}
_parent._parent.fOutput("<inDataIO> ping script: " + _parent.pPingURL);
_parent._parent.fOutput("<inDataIO> ping data: > " + tStr);
this.loadVariables(_parent.pPingURL + tStr, "POST");
}
}
onClipEvent (data) {
_parent._parent.fOutput("<inDataIO> data a: > " + a);
_parent._parent.fOutput("<inDataIO> data b: > " + b);
_parent._parent.fOutput("<inDataIO> data c: > " + c);
_parent._parent.fOutput("<inDataIO> data d: > " + d);
_parent._parent.fDataReturn([a, b, c, d]);
inText.text = "E";
_parent.fResetData();
}
Symbol 187 MovieClip Frame 2
if (_parent.pDB == 1) {
stop();
}
Symbol 187 MovieClip Frame 3
stop();
Symbol 189 Button
on (press) {
fSwitchMe();
}
Symbol 192 MovieClip Frame 1
function fSwitchMe() {
if (pSwitch == 0) {
pSwitch = 1;
gotoAndStop ("on");
} else {
pSwitch = 0;
gotoAndStop ("off");
}
}
pSwitch = 0;
stop();
Instance of Symbol 193 MovieClip in Symbol 201 MovieClip Frame 1
onClipEvent (load) {
pCleared = 0;
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, 0)) {
if (pCleared == 0) {
_parent.txname.text = "";
pCleared = 1;
}
}
}
Instance of Symbol 193 MovieClip in Symbol 201 MovieClip Frame 1
onClipEvent (load) {
pCleared = 0;
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, 0)) {
if (pCleared == 0) {
_parent.txmail.text = "";
pCleared = 1;
}
}
}
Symbol 201 MovieClip Frame 2
stop();
Symbol 203 MovieClip Frame 1
function fFV() {
var _local2 = fldMail.text;
var _local5 = fldName.text;
var _local3 = 1;
var _local7 = 0;
var _local6 = 0;
var _local8 = _local2.indexOf("@");
var _local4 = _local2.lastIndexOf(".");
if (((((_local2.length > 5) and (_local8 > 0)) and (_local4 != -1)) and (_local4 < (_local2.length - 1))) and (_local8 < _local4)) {
_local7 = _local2;
} else {
_local3 = 0;
}
if ((_local5.length > 2) and (_local5 != fldDefault.name)) {
_local6 = _local5;
} else {
_local3 = 0;
}
_parent.fOutput(((((((("<inFV> name: " + _local6) + " >mail: ") + _local7) + " >ok: ") + _local3) + " >opt: ") + chkBox.pSwitch) + "\r--------------------------------");
var _local9 = {ok:_local3, name:_local6, mail:_local7, opt:chkBox.pSwitch};
return(_local9);
}
function fSetUpFields(tDet) {
fldError.text = fldDefault.error;
if (tDet == 0) {
tDet = [fldDefault.name, fldDefault.mail, 0];
}
fldName.text = tDet[0];
fldMail.text = tDet[1];
if (tDet[2] == 1) {
chkBox.fSwitchMe();
}
}
function fFVError(tRet) {
_parent.fOutput("<inFV> fFVError: " + fldError);
if (fldError != undefined) {
if (tRet.ok == 0) {
pET = pETtime;
if (tRet.name == 0) {
var _local2 = "Please enter a valid name.";
} else if (tRet.mail == 0) {
var _local2 = "Please enter a valid email address.";
} else {
var _local2 = "THIS SHOULD NEVER HAPPEN.";
}
_parent.fOutput("<inFV> fFVError: " + _local2);
fldError.text = _local2;
}
}
}
function fErrorTextTimer() {
if (pET > 0) {
pET = pET - 1;
if (pET == 0) {
fldError.text = "";
_parent.fOutput("<inFV> fFVError: cleared");
}
}
}
function fFVInit() {
if (pDB != 1) {
stop();
} else {
this.gotoAndStop(2);
if (fldName == undefined) {
_parent.fOutput(("<inFV> " + fldName) + " field missing");
}
if (fldMail == undefined) {
_parent.fOutput(("<inFV> " + fldMail) + " field missing");
}
}
}
pET = 0;
this.onEnterFrame = function () {
fErrorTextTimer();
};
this.fFVInit();
if (_parent.DB == 1) {
stop();
}
Symbol 203 MovieClip Frame 2
stop();
Symbol 205 MovieClip Frame 1
function fSaveDetails(tName, tMail, tOpt) {
sO.data.name = tName;
sO.data.mail = tMail;
sO.data.opt = tOpt;
if (!sO.flush()) {
_parent.fOutput((((("<inPrefs> Failed to Save Details: " + tName) + ", ") + tMail) + ", ") + tOpt);
} else {
_parent.fOutput((((("<inPrefs> Saved Details: " + tName) + ", ") + tMail) + ", ") + tOpt);
}
}
if (pDataName == undefined) {
pDataName = "ftData";
}
sO = SharedObject.getLocal(pDataName);
if (sO.data.name != undefined) {
var tDet = [sO.data.name, sO.data.mail, sO.data.opt];
_parent.fOutput((((("<inPrefs> FOUND: " + tDet[0]) + ", ") + tDet[1]) + ", ") + tDet[2]);
} else {
var tDet = 0;
_parent.fOutput("<inPrefs> NOT found");
}
_parent.inFV.fSetUpFields(tDet);
if (_parent.DB == 1) {
stop();
}
Symbol 205 MovieClip Frame 2
stop();
Symbol 223 MovieClip Frame 1
stop();
Symbol 232 MovieClip Frame 1
function fBuildHigh(tName, tScore, tCountry, tPos) {
gotoAndPlay ("show");
tn = tName.split(",", 10);
ts = tScore.split(",", 10);
tc = tCountry.split(",", 10);
ty = tPos.split(",", 4);
if (ty[2] != 0) {
pPlayerhigh = 1;
}
}
function fBuildTenHigh() {
txpositions.text = "";
txnames.text = "";
txscores.text = "";
var _local2 = "";
var _local4 = "";
var _local3 = "";
i = 1;
while (i < 11) {
if (i < 10) {
_local2 = ((_local2 + "0") + i) + ".\r";
} else {
_local2 = (_local2 + i) + ".\r";
}
_local4 = (_local4 + tn[i - 1]) + "\r";
_local3 = (_local3 + ts[i - 1]) + "\r";
this["inF" + i].gotoAndStop(tc[i - 1]);
i++;
}
txpositions.text = _local2;
txnames.text = _local4;
txscores.text = _local3;
gotoAndPlay ("show");
}
function fBuildYouHigh() {
pPos = ty[0];
txpositions.text = ((txpositions.text + "\r") + ty[0]) + ".";
txnames.text = (txnames.text + "\r") + ty[2];
txscores.text = (txscores.text + "\r") + ty[1];
inFy.gotoAndStop(ty[3]);
}
pPos = 0;
pPlayerhigh = 0;
tn = 0;
ts = 0;
ty = 0;
tc = 0;
stop();
Symbol 232 MovieClip Frame 7
stop();
Symbol 232 MovieClip Frame 8
fBuildTenHigh();
if (pPlayerhigh == 0) {
stop();
}
Symbol 232 MovieClip Frame 39
fBuildYouHigh();
stop();
Symbol 236 MovieClip Frame 1
function fDataReturn(dt) {
_parent.fOutput("<inDataIO> -----------------------------------------");
var _local3 = dt[0];
var _local4 = dt[1];
var _local6 = dt[2];
var _local5 = dt[3];
gotoAndStop ("score");
_parent.gotoAndStop("score");
inHS.fBuildHigh(_local4, _local3, _local6, _local5);
}
function fOutput(tText) {
if (pDB == 1) {
if (txOutput != undefined) {
tOutText = txOutput.text;
txOutput.text = (tOutText + tText) + "\r";
}
}
}
function pingHS(tType) {
var _local3 = inFV.fFV();
fOutput((((((((("<inScores> pingHS >type: " + tType) + " >ok: ") + _local3.ok) + " >n: ") + _local3.name) + " >e: ") + _local3.mail) + " >m: ") + _local3.opt);
if (tType == "send") {
if (_local3.ok == 1) {
inPrefs.fSaveDetails(_local3.name, _local3.mail, _local3.opt);
pHSmode = "s";
inDataIO.fPingData(pHSmode, _local3.name, _local3.mail, _local3.opt, _global.gScoreBest);
gotoAndStop ("wait");
_parent.gotoAndStop("score");
} else {
inFV.fFVError(_local3);
}
} else if (tType == "skip") {
if (_local3.ok == 1) {
inPrefs.fSaveDetails(_local3.name, _local3.mail);
pHSmode = "g1";
inDataIO.fPingData(pHSmode, _local3.name, _local3.mail, _local3.opt);
} else {
pHSmode = "g0";
inDataIO.fPingData(pHSmode);
}
gotoAndStop ("wait");
_parent.gotoAndStop("score");
}
fOutput("<inScores> end -------------------------");
}
function fError() {
inDataIO.fResetData();
gotoAndStop ("error");
}
function fSendScoreXXX() {
var _local4 = this.fFV();
if (_local4.ok == 1) {
this.fSaveDetails();
_global.HSmode = "sent";
_global.gFVmc.fFVPing(_local4);
_root.gotoAndPlay("wait");
_root.inHS.fPendingHigh();
}
}
function fSkipScoreXXX() {
if (res.ok == 1) {
_global.HSmode = "sent";
_global.gFVmc.fFVPing(res);
_parent.gotoAndPlay("highscore");
_parent.inHS.fPendingHigh();
} else {
_global.HSmode = "get";
_parent.gotoAndPlay("highscore");
_parent.inHS.fPendingHigh();
inDataIO.fPingData("g0");
}
}
pDB = 1;
if (pDB == 0) {
txOutput.removeTextField();
}
pUrl = "../hiscore_headtohead.php?";
pGID = 16;
pHSmode = "none";
Instance of Symbol 187 MovieClip "inDataIO" in Symbol 236 MovieClip Frame 1
onClipEvent (load) {
pDB = _parent.pDB;
pPingURL = _parent.pUrl;
pGID = _parent.pGID;
pType = "f";
pLow = 1;
pRange = 10;
}
Instance of Symbol 203 MovieClip "inFV" in Symbol 236 MovieClip Frame 1
onClipEvent (load) {
pDB = _parent.pDB;
if (pDB == 1) {
fldScore.text = "2";
fldScore = _parent.inEntry.txscore;
}
fldName = _parent.inEntry.txname;
fldMail = _parent.inEntry.txmail;
fldError = _parent.inEntry.txerror;
chkBox = _parent.inEntry.inCheckBox;
fldDefault = {name:"< ENTER NAME >", mail:"< ENTER EMAIL ADDRESS >", error:""};
pETtime = 60;
}
Instance of Symbol 205 MovieClip "inPrefs" in Symbol 236 MovieClip Frame 1
onClipEvent (load) {
pDataName = "ftData";
}
Symbol 236 MovieClip Frame 5
stop();
Symbol 236 MovieClip Frame 6
stop();
Symbol 236 MovieClip Frame 11
_root.gotoAndStop("scores");
stop();
Instance of Symbol 234 MovieClip in Symbol 236 MovieClip Frame 11
onClipEvent (load) {
pCount = 0;
}
onClipEvent (enterFrame) {
pCount = pCount + 1;
if (pCount == 300) {
_parent.gotoAndStop("error");
}
}
Symbol 236 MovieClip Frame 16
stop();
Symbol 236 MovieClip Frame 21
stop();
Symbol 237 Button
on (release) {
_global.sfDing(1);
_global.mMainMenu();
}
on (rollOver) {
inHS.gotoAndStop(2);
}
on (rollOut) {
inHS.gotoAndStop(1);
}
on (dragOver) {
inHS.gotoAndStop(2);
}
on (dragOut) {
inHS.gotoAndStop(1);
}
Symbol 238 Button
on (release) {
_global.sfDing(1);
_root.inScores.pingHS("skip");
}
on (rollOver) {
inHS.gotoAndStop(2);
}
on (rollOut) {
inHS.gotoAndStop(1);
}
on (dragOver) {
inHS.gotoAndStop(2);
}
on (dragOut) {
inHS.gotoAndStop(1);
}
Symbol 239 Button
on (release) {
_global.sfDing(1);
_root.inScores.pingHS("send");
}
on (rollOver) {
inHS.gotoAndStop(2);
}
on (rollOut) {
inHS.gotoAndStop(1);
}
on (dragOver) {
inHS.gotoAndStop(2);
}
on (dragOut) {
inHS.gotoAndStop(1);
}
Symbol 265 MovieClip Frame 1
pNum = _parent.fGetNum();
this.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, 0)) {
_global.sfDing(1);
_parent.fSetNum(pNum);
}
};
gotoAndStop(pNum);
Symbol 266 MovieClip Frame 1
function fGetNum() {
pNumCount = pNumCount + 1;
return(pNumCount);
}
function fSetNum(tNum) {
_global.gCountry = tNum;
_root.play();
}
pNumCount = 0;
gotoAndPlay (2);
Symbol 266 MovieClip Frame 18
stop();
Symbol 282 MovieClip Frame 12
gotoAndStop (2);
Symbol 283 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 6
stop();
Instance of Symbol 282 MovieClip "inHead" in Symbol 283 MovieClip Frame 11
onClipEvent (load) {
gotoAndStop (5);
}
Symbol 283 MovieClip Frame 16
gotoAndStop ("norm");
Symbol 290 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 1
Symbol 294 MovieClip Frame 77
_global.sfPhone();
Symbol 294 MovieClip Frame 101
gotoAndPlay ("loop2");
Symbol 294 MovieClip Frame 176
_global.sfHead();
Symbol 301 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 1
stop();
Instance of Symbol 282 MovieClip "inHead" in Symbol 302 MovieClip Frame 15
onClipEvent (load) {
gotoAndPlay (7);
}
Symbol 302 MovieClip Frame 25
gotoAndStop ("norm");
Symbol 302 MovieClip Frame 43
gotoAndStop ("norm");
Symbol 302 MovieClip Frame 56
gotoAndStop ("norm");
Symbol 310 MovieClip Frame 1
stop();
Instance of Symbol 274 MovieClip in Symbol 310 MovieClip Frame 1
onClipEvent (load) {
_global.gTime = 1;
_global.gTimeDir = 1;
}
onClipEvent (enterFrame) {
gotoAndStop(Math.floor(_global.gTime));
_global.gTime = _global.gTime + (0.05 * _global.gTimeDir);
if (_global.gTimeDir == 1) {
if (_global.gTime > 99) {
_global.gTimeDir = -1;
}
} else if (_global.gTimeDir == -1) {
if (_global.gTime < 1) {
_global.gTimeDir = 1;
}
}
}
Instance of Symbol 223 MovieClip "inFlagComp" in Symbol 310 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_global.gCountry);
}
Instance of Symbol 294 MovieClip "inBall" in Symbol 310 MovieClip Frame 1
onClipEvent (load) {
function fMove() {
this._x = pPos[0];
this._y = pPos[1];
}
function fRestart() {
pActive = 0;
_global.gHeadTurn = 2;
pDir = pDirStart.slice();
pSpeed = pSpeedStart;
pPos = pStartPos.slice();
fMove();
_parent.inAIPaddle.fHeadedTo(230);
_global.sfStart(2);
gotoAndPlay ("start");
}
function fBounce(tDir, tPlayer) {
pActive = 1;
if (tDir.pType == "off") {
_global.mReset();
fRestart();
} else if (tDir.pType == "bounce") {
if (tDir.pDir[0] != 0) {
pDir[0] = -pDir[0];
} else {
pDir = [0, 1];
}
} else if (tDir.pType == "hit") {
inBall.fHit();
inBall.fHead();
_global.mAddHead(pPos[0]);
pDir = tDir.pDir.slice();
pFrame = 1;
pFramesToEdge = 200 / (Math.abs(pDir[1]) * pSpeed);
pFrameStep = 100 / pFramesToEdge;
if (pSpeed < pSpeedMax) {
pSpeed = pSpeed + Math.abs(pDir[1] / 10);
}
if (tPlayer == 1) {
var _local4 = pPos[0] + ((pDir[0] * pFramesToEdge) * 10);
_parent.inAIPaddle.fHeadedTo(_local4);
}
}
}
function fBounce2(tDir) {
if (tDir.pDir[0] != pDir[0]) {
pDir[0] = tDir.pDir[0];
inBall.fHit();
}
if (tDir.pDir[1] != pDir[1]) {
if (tDir.pType == 4) {
_global.mReset();
fRestart();
} else {
pDir[1] = tDir.pDir[1];
inBall.fHit();
inBall.fHead();
_global.mAddHead();
}
}
}
pShadow = inBallShadow;
pDirStart = [0, -1];
pSpeedStart = 9;
pSpeedMax = 16;
pStartPos = [this._x, this._y];
pFramesToEdge = 0;
pActive = 0;
pDir = [0, 0];
pSpeed = pSpeedStart;
pPos = pStartPos.slice();
pLastPos = pStartPos.slice();
pFrame = 1;
pActive = 0;
stop();
}
onClipEvent (enterFrame) {
if (_global.gActive == 1) {
pPos[0] = pPos[0] + (pDir[0] * pSpeed);
pPos[1] = pPos[1] + (pDir[1] * pSpeed);
fMove();
var tDir = _level0.fCheckEdgeBounce(pPos.slice(), pDir.slice());
if (tDir != "none") {
fBounce(tDir);
}
if (pActive == 1) {
pFrame = pFrame + pFrameStep;
if (pFrame < 150) {
gotoAndStop(Math.floor(pFrame));
}
}
}
}
Instance of Symbol 304 MovieClip "inPlayerPaddle" in Symbol 310 MovieClip Frame 1
onClipEvent (load) {
function fMoveChar() {
pPos[0] = pPos[0] + pSpeedEnergy[0];
this._x = pPos[0];
pPlayer._x = pPos[0];
pFaceDirCount = pFaceDirCount + 1;
if (pFaceDirCount > 8) {
pFaceDirCount = 0;
if (pSpeedEnergy[0] > 5) {
pPlayer.inBody.gotoAndStop(4);
} else if (pSpeedEnergy[0] < -5) {
pPlayer.inBody.gotoAndStop(5);
} else {
pPlayer.inBody.gotoAndStop(3);
}
}
}
function fCheckMouse() {
var _local2 = (_parent._xmouse - pPos[0]) / pMoveFactor;
if (_local2 > pSpeed[0]) {
_local2 = pSpeed[0];
} else if (_local2 < (-pSpeed[0])) {
_local2 = -pSpeed[0];
}
pSpeedEnergy[0] = _local2;
}
function fCheckEdge() {
var _local1 = 0;
if ((pPos[0] < pEdges[0]) and (pSpeedEnergy[0] < 0)) {
_local1 = 1;
}
if ((pPos[0] > pEdges[1]) and (pSpeedEnergy[0] > 0)) {
_local1 = 2;
}
return(_local1);
}
function fCheckhit() {
if (_global.gHeadTurn != 2) {
if (this.hitTest(_parent.inBall.inBallDetect)) {
_global.gHeadTurn = 2;
var _local6 = pBall._x - this._x;
if (_local6 < 0) {
var _local16 = -1;
} else {
var _local16 = 1;
}
pBall.inBall.gotoAndPlay("hit");
pPlayer.gotoAndPlay("straight");
pPlayer.inHead._rotation = 0 + (_local6 / 3);
var _local11 = pOtherPlayer._x - this._x;
var _local10 = pOtherPlayer._y - this._y;
var _local12 = (pBall.pSpeed * 3) - ((pBall.pSpeed * 3) / 2);
var _local5 = _global.mReAngle((90 - _global.mVtoD([_local11, _local10])) + _local12);
var _local9 = pBall._x - this._x;
var _local8 = (pBall._y - 10) - this._y;
var _local4 = _global.mReAngle(90 - _global.mVtoD([_local9, _local8]));
if (_local5 < _local4) {
tAngle3 = _local5 + ((_local4 - _local5) / 2);
} else {
tAngle3 = _local4 + ((_local5 - _local4) / 2);
}
var _local13 = _global.mDtoV(tAngle3);
var _local7 = {pType:"hit", pDir:_local13};
pBall.fBounce(_local7, 1);
}
}
}
pMoveFactor = 3;
pSpeed = [20, 3];
pSpeedEnergy = [0, 0];
pPos = [this._x, this._y];
pLastPos = [this._x, this._y];
pStartPos = [this._x, this._y];
pBallDetect = _parent.inBall.inBallDetect;
pBall = _parent.inBall;
pPlayer = _parent.inPlayer;
pOtherPlayer = _parent.inAI;
pFaceDirCount = 10;
pEdges = [50, 500, 150, 520];
}
onClipEvent (enterFrame) {
if (_global.gActive == 1) {
fCheckhit();
fCheckMouse();
var tDir = fCheckEdge();
if (tDir != 0) {
pSpeedEnergy[0] = 0;
}
fMoveChar();
}
}
Instance of Symbol 304 MovieClip "inAIPaddle" in Symbol 310 MovieClip Frame 1
onClipEvent (load) {
function fMoveChar() {
if (pTowardsMove != 1) {
pSpeedEnergy[0] = pSpeedEnergy[0] * 0.8;
} else {
pSpeedEnergy[0] = pDir[0] * pSpeed[0];
}
pPos[0] = pPos[0] + pSpeedEnergy[0];
this._x = pPos[0];
pPlayer._x = pPos[0];
}
function fCheckhit() {
if (_global.gHeadTurn != 1) {
if (this.hitTest(pBall.inBallDetect)) {
_global.gHeadTurn = 1;
var _local5 = pBall._x - this._x;
if (_local5 < 0) {
var _local14 = 1;
} else {
var _local14 = -1;
}
pBall.inBall.gotoAndPlay("hit");
pBall.pSpeed[0] = Math.abs(_local5 / 15);
pPlayer.gotoAndPlay("hit");
pPlayer.inHead._rotation = 0 + (_local5 / 2);
var _local10 = pOtherPlayer._x - this._x;
var _local9 = pOtherPlayer._y - this._y;
var _local4 = _global.mReAngle(90 - _global.mVtoD([_local10, _local9]));
var _local8 = pBall._x - this._x;
var _local7 = (pBall._y + 10) - this._y;
var _local3 = _global.mReAngle(90 - _global.mVtoD([_local8, _local7]));
if (_local4 < _local3) {
tAngle3 = _local4 + ((_local3 - _local4) / 2);
} else {
tAngle3 = _local3 + ((_local4 - _local3) / 2);
}
var _local11 = _global.mDtoV(tAngle3);
var _local6 = {pType:"hit", pDir:_local11};
pBall.fBounce(_local6);
}
}
}
function fHeadedTo(tXpos) {
var _local1 = tXpos + (random(20) - 10);
pGuide._x = _local1;
pTowards = _local1;
pTowardsMove = 1;
}
function fCheckEdge() {
var _local1 = 0;
if ((pPos[0] < pEdges[0]) and (pSpeedEnergy[0] < 0)) {
_local1 = 1;
}
if ((pPos[0] > pEdges[1]) and (pSpeedEnergy[0] > 0)) {
_local1 = 2;
}
return(_local1);
}
function fGetDirTowards() {
var _local2 = [0, 0];
if (pTowards < this._x) {
_local2[0] = -1;
if ((pTowards + 10) > this._x) {
pTowardsMove = 0;
_local2[0] = 0;
pCountCheck = 50;
}
} else {
_local2[0] = 1;
if ((pTowards - 10) < this._x) {
pTowardsMove = 0;
_local2[0] = 0;
pCountCheck = 50;
}
}
return(_local2);
}
pDir = [0, 0];
pDirLast = [0, 0];
pSpeed = [8, 3];
pSpeedEnergy = [0, 0];
pPos = [this._x, this._y];
pLastPos = [this._x, this._y];
pStartPos = [this._x, this._y];
pBallDetect = _parent.inBall.inBallDetect;
pBall = _parent.inBall;
pPlayer = _parent.inAI;
pOtherPlayer = _parent.inPlayer;
pGuide = _parent.inGuide;
pEdges = [50, 450, 150, 520];
pTowards = this._x;
pTowardsMove = 0;
pCount = 0;
pCountCheck = 15;
}
onClipEvent (enterFrame) {
if (_global.gActive == 1) {
var tDir = fCheckEdge();
if (tDir != 0) {
pSpeedEnergy[0] = 0;
pDir[0] = 0;
pTowardsMove = 0;
}
if (pTowardsMove == 1) {
var tDir = fGetDirTowards();
pDir = tDir.slice();
}
fMoveChar();
fCheckhit();
}
}
Symbol 311 Button
on (release) {
if (_global.gScoreBest > 0) {
_global.sfStart(1);
_global.mSubmitScore();
}
}
on (rollOver) {
inHS.gotoAndStop(2);
}
on (rollOut) {
inHS.gotoAndStop(1);
}
on (dragOver) {
inHS.gotoAndStop(2);
}
on (dragOut) {
inHS.gotoAndStop(1);
}
Symbol 325 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 1
function fUpdateScore(tScore) {
if (pLastScore <= tScore) {
tScore = tScore.toString();
if (tScore.length > 2) {
inHead1.gotoAndStop("p" + tScore.charAt(2));
inHead10.gotoAndStop("p" + tScore.charAt(1));
inHead100.gotoAndStop("p" + tScore.charAt(0));
} else if (tScore.length > 1) {
inHead1.gotoAndStop("p" + tScore.charAt(1));
inHead10.gotoAndStop("p" + tScore.charAt(0));
inHead100.gotoAndStop("p00");
} else {
inHead1.gotoAndStop("p" + tScore.charAt(0));
inHead10.gotoAndStop("p00");
inHead100.gotoAndStop("p00");
}
if (pActive == 0) {
pActive = 1;
gotoAndPlay ("start");
} else {
gotoAndPlay ("mid");
}
}
}
pActive = 0;
pLastScore = 2;
inHead1.gotoAndStop("p00");
inHead10.gotoAndStop("p00");
inHead100.gotoAndStop("p00");
stop();
Symbol 326 MovieClip Frame 67
pActive = 0;
pLastScore = 2;
gotoAndStop ("start");
Symbol 335 MovieClip Frame 1
function fUpdateScore() {
var _local2 = _global.gScore.toString();
if (_local2.length > 2) {
inHead1.gotoAndStop("p" + _local2.charAt(2));
inHead10.gotoAndStop("p" + _local2.charAt(1));
inHead100.gotoAndStop("p" + _local2.charAt(0));
} else if (_local2.length > 1) {
inHead1.gotoAndStop("p" + _local2.charAt(1));
inHead10.gotoAndStop("p" + _local2.charAt(0));
inHead100.gotoAndStop("p00");
} else {
inHead1.gotoAndStop("p" + _local2.charAt(0));
inHead10.gotoAndStop("p00");
inHead100.gotoAndStop("p00");
}
}
inHead1.gotoAndStop("p00");
inHead10.gotoAndStop("p00");
inHead100.gotoAndStop("p00");
Symbol 335 MovieClip Frame 20
stop();
Symbol 339 MovieClip Frame 1
function fUpdateScore() {
var _local2 = _global.gScoreBest.toString();
if (_local2.length > 2) {
inHead1.gotoAndStop("p" + _local2.charAt(2));
inHead10.gotoAndStop("p" + _local2.charAt(1));
inHead100.gotoAndStop("p" + _local2.charAt(0));
} else if (_local2.length > 1) {
inHead1.gotoAndStop("p" + _local2.charAt(1));
inHead10.gotoAndStop("p" + _local2.charAt(0));
inHead100.gotoAndStop("p00");
} else {
inHead1.gotoAndStop("p" + _local2.charAt(0));
inHead10.gotoAndStop("p00");
inHead100.gotoAndStop("p00");
}
}
inHead1.gotoAndStop("p00");
inHead10.gotoAndStop("p00");
inHead100.gotoAndStop("p00");
fUpdateScore();
Symbol 339 MovieClip Frame 20
stop();