Frame 1
function moveClouds() {
i = 1;
while (i < 5) {
if (eval ("_root.c" + i)._x > 660) {
eval ("_root.c" + i)._x = -100;
} else {
eval ("_root.c" + i)._x = eval ("_root.c" + i)._x + 1;
}
i = i + 1;
}
}
function playGame() {
_root.playButton.play();
_root.instructionsButton.play();
_root.logo.play();
_root.swoosh.play();
}
function playInstr() {
trace("here");
gotoAndPlay (2);
}
function Pick_Player() {
gotoAndStop (28);
}
stop();
fscommand ("showmenu", "false");
fscommand ("allowscale", "false");
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
_root.introMusic = new Sound(sndMC);
_root.introMusic.attachSound("tickTockClock.mp3");
_root.introMusic.start(0, 999999);
_root.onEnterFrame = function () {
var _local4 = this.getBytesLoaded();
var _local5 = this.getBytesTotal();
var _local3 = Math.floor((_local4 / _local5) * 100);
if (_root.swoosh._currentframe < 100) {
_root.swoosh.gotoAndStop(_local3);
}
if (_root.been != "true") {
if (_local3 >= 100) {
_root.introMusic.stop();
_root.been = "true";
_root.WelcomeSound = new Sound(sndMCa);
_root.WelcomeSound.attachSound("WelcomeSound.mp3");
_root.WelcomeSound.start();
instructionsButton.gotoAndPlay(2);
playButton.gotoAndPlay(2);
}
}
};
Instance of Symbol 52 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.moveClouds();
}
Frame 2
_root.swoosh.gotoAndStop(100);
Frame 22
function backMenu() {
play();
}
stop();
Frame 27
_root.been = false;
gotoAndPlay (1);
Frame 28
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("6987c3c3", this, 10301, true);
function playerPicked(player) {
if ((_root.myName == "") || (_root.myName == "ENTER YOUR NAME")) {
_root.playerName = eval ("_root.player" + player);
} else {
_root.playerName = _root.myName;
}
trace("you are player:" + _root.playerName);
_root.playerNumber = player;
_root.playerPick.play();
}
function volumeUp() {
_root.crowdLoop.setVolume(_root.crowdLoop.getVolume() + 1);
if (_root.crowdLoop.getVolume() == 100) {
clearInterval(_root.stg);
}
}
function level1() {
gotoAndStop (29);
}
_root.player1 = "B. McBride";
_root.player2 = "V. Montella";
_root.player3 = "M. Brown";
_root.player4 = "C. Dempsey";
_root.crowdLoop = new Sound(sh3);
_root.crowdLoop.attachSound("FULHAM.aif");
_root.stg = setInterval(volumeUp, 10);
_root.crowdLoop.setVolume(0);
_root.crowdLoop.start(0, 999999);
Instance of Symbol 52 MovieClip in Frame 28
onClipEvent (enterFrame) {
_root.moveClouds();
}
Frame 29
function resetShot() {
if (_root.shot == 10) {
_root.theScreen.gotoAndPlay("round2");
} else {
_root.shot = _root.shot + 1;
_root.dragging = true;
_root.player.player.gotoAndStop(1);
_root.powerbar.gotoAndStop(1);
_root.moveNetBoo = true;
_root.ball._xscale = _root.pp;
_root.ball._rotation = _root.ppR;
_root.ball._yscale = _root.pp;
_root.ball._x = _root.ppX;
_root.ball._y = _root.ppY;
_root.shadow._x = _root.shadowStartX;
_root.shadow._xscale = _root.shadowStartScaleX;
_root.shadow._yscale = _root.shadowStartScaleY;
_root.shadow._y = _root.shadowStartY;
_root.shadow.gotoAndStop(1);
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
_root.ttarget.play();
Mouse.hide();
}
}
function moveClouds() {
i = 1;
while (i < 5) {
if (eval ("_root.c" + i)._x > 660) {
eval ("_root.c" + i)._x = -100;
} else {
eval ("_root.c" + i)._x = eval ("_root.c" + i)._x + 1;
}
i = i + 1;
}
}
function moveNet() {
i = 0;
if (_root.moveNetRight == true) {
while (i < 5) {
if (_root.g1._x > _root.netLeftMax) {
_root.moveNetRight = false;
} else {
eval ("_root.g" + i)._x = eval ("_root.g" + i)._x + _root.netSpeed;
}
i = i + 1;
}
} else {
while (i < 5) {
if (_root.g1._x < _root.netLeftMin) {
_root.moveNetRight = true;
} else {
eval ("_root.g" + i)._x = eval ("_root.g" + i)._x - _root.netSpeed;
}
i = i + 1;
}
}
}
function putBallBack() {
_root.ball.gotoAndPlay("backBall");
resetShot();
}
function gotoRound2() {
gotoAndStop (30);
}
fscommand ("allowscale", "false");
stop();
showplayerName.text = _root.playerName;
_root.player.gotoAndStop("player" + _root.playerNumber);
_root.theScreen.gotoAndPlay(2);
_root.netSpeed = 3;
_root.netLeftMax = 450;
_root.netLeftMin = 220;
_root.totalGoals = 0;
_root.powerbar.stop();
_root.resetShot();
_root.ball.gotoAndStop(1);
_root.ball.stop();
_root.onEnterFrame = function () {
var _local4 = this.getBytesLoaded();
var _local5 = this.getBytesTotal();
var _local3 = Math.floor((_local4 / _local5) * 100);
_root.swoosh.gotoAndStop(_local3);
if (been != "true") {
if (_local3 >= 100) {
been = "true";
instructionsButton.gotoAndPlay(2);
playButton.gotoAndPlay(2);
}
}
};
this.onMouseUp = function () {
if ((_root.dragging == true) && (_root.powerbar._currentframe > 1)) {
_root.powerbar.stop();
_root.dragging = false;
_root.ttarget.stopDrag();
_root.ttarget.stop();
_root.ttarget.ttarget.gotoAndStop(2);
var _local2 = {x:_root.ttarget.goThere._x, y:_root.ttarget.goThere._y};
_root.ttarget.localToGlobal(_local2);
_root.goThere._x = _local2.x;
_root.goThere._y = _local2.y;
_root.shadow._x = _root.shadowStartX;
_root.shadow._xscale = _root.shadowStartScaleX;
_root.shadow._yscale = _root.shadowStartScaleY;
_root.shadow._y = _root.shadowStartY;
_root.player.player.play();
_root.ballSpeed = 3;
if (_root.powerbar._currentframe < 22) {
_root.ballSpeed = _root.powerbar._currentframe / 8;
} else {
_root.ballSpeed = ((_root.powerbar._currentframe - 22) + 22) / 8;
}
if (_root.powerbar._currentframe < 6) {
_root.ball.gotoAndPlay("rollBall");
_root.shadow.gotoAndStop(2);
_root.moveNetBoo = false;
} else {
_root.makePath();
trace(_root.powerbar._currentframe);
}
}
};
this.onMouseDown = function () {
if (_root.dragging == true) {
_root.powerbar.play();
}
};
_root.GoalSound = new Sound(sh4);
_root.GoalSound.attachSound("Goal.mp3");
_root.GoalSound.setVolume(200);
_root.GoalHit = new Sound(sh5);
_root.GoalHit.attachSound("HitGoal.mp3");
_root.GoalSound.setVolume(200);
_root.playerHit1 = new Sound(sh6);
_root.playerHit1.attachSound("urr.mp3");
_root.GoalSound.setVolume(200);
_root.playerHit2 = new Sound(sh7);
_root.playerHit2.attachSound("um.mp3");
_root.GoalSound.setVolume(200);
_root.playerHit3 = new Sound(sh8);
_root.playerHit3.attachSound("oi.mp3");
_root.GoalSound.setVolume(200);
Path = function () {
this.init.apply(this, arguments);
};
Path.prototype.init = function (start_x, start_y) {
this._segments = [];
this._length = 0;
if (arguments.length) {
this.moveTo(start_x, start_y);
} else {
this.moveTo(0, 0);
}
};
Path.prototype.curveToAccuracy = 10;
Path.prototype.clear = function () {
this.init(0, 0);
};
Path.prototype.moveTo = function (start_x, start_y) {
this._segments[this._segments.length] = {d:0, start:{_x:this._position._x, _y:this._position._y}, end:{_x:start_x, _y:start_y}, type:"M"};
this._position = {_x:start_x, _y:start_y};
return(this);
};
Path.prototype.lineTo = function (end_x, end_y) {
var _local3 = end_x - this._position._x;
var _local2 = end_y - this._position._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
this._segments[this._segments.length] = {d:_local4, start:this._position, end:{_x:end_x, _y:end_y}, type:"L"};
this._length = this._length + _local4;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.circleTo = (Path.prototype.circleCWTo = function (end_x, end_y, arc, dir) {
if (dir == undefined) {
dir = "CW";
}
if (arc == undefined) {
arc = 0.5;
}
if (arc > 1) {
arc = 1;
} else if (arc <= 0) {
return(this.lineTo(end_x, end_y));
}
if (dir == "CCW") {
arc = 1 - arc;
}
var _local13 = {_x:(this._position._x + end_x) / 2, _y:(this._position._y + end_y) / 2};
var _local4 = end_x - this._position._x;
var _local3 = end_y - this._position._y;
var _local11 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = _local11 / 2;
var _local8 = _local7 / Math.tan(arc * Math.PI);
var _local10 = _local7 / Math.sin(arc * Math.PI);
var _local9 = Math.atan2(_local3, _local4) + (Math.PI/2);
_local13._x = _local13._x + (Math.cos(_local9) * _local8);
_local13._y = _local13._y + (Math.sin(_local9) * _local8);
var _local17 = Math.atan2(this._position._y - _local13._y, this._position._x - _local13._x);
var _local15 = Math.atan2(end_y - _local13._y, end_x - _local13._x);
if (dir == "CW") {
if (_local15 < _local17) {
_local15 = _local15 + (Math.PI*2);
}
} else if (_local17 < _local15) {
_local17 = _local17 + (Math.PI*2);
}
_local11 = _local10 * Math.abs(_local15 - _local17);
this._segments[this._segments.length] = {d:_local11, r:_local10, a1:_local17, a2:_local15, o:_local13, dir:dir, type:"C"};
this._length = this._length + _local11;
this._position = {_x:end_x, _y:end_y};
return(this);
});
Path.prototype.circleCCWTo = function (end_x, end_y, arc) {
return(this.circleTo.call(this, end_x, end_y, arc, "CCW"));
};
Path.prototype.curveTo = function (con_x, con_y, end_x, end_y) {
var _local3 = this.divideBezier(this._position._x, this._position._y, con_x, con_y, end_x, end_y);
this._segments[this._segments.length] = {d:_local3.d, start:this._position, con:{_x:con_x, _y:con_y}, end:{_x:end_x, _y:end_y}, segs:_local3, type:"B"};
this._length = this._length + _local3.d;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.divideBezier = function (x1, y1, x2, y2, x3, y3) {
var _local2;
var _local15;
var _local14;
var _local12;
var _local11;
var _local9;
var _local8;
var _local7;
var _local6;
var _local29;
var _local13 = [];
var _local5 = {_x:x1, _y:y1};
var _local22 = x2 - x1;
var _local20 = y2 - y1;
var _local21 = x3 - x2;
var _local19 = y3 - y2;
var _local16 = Math.atan2;
var _local18 = Math.sqrt;
var _local17 = 0;
var _local36;
var _local3;
var _local10;
var _local30 = _local16(_local20, _local22);
var _local4 = 1;
while (_local4 < this.curveToAccuracy) {
_local2 = _local4 / this.curveToAccuracy;
_local15 = x1 + (_local22 * _local2);
_local12 = (x2 + (_local21 * _local2)) - _local15;
_local14 = y1 + (_local20 * _local2);
_local11 = (y2 + (_local19 * _local2)) - _local14;
_local7 = _local15 + (_local12 * _local2);
_local6 = _local14 + (_local11 * _local2);
_local9 = _local7 - _local5._x;
_local8 = _local6 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local11, _local12);
_local3 = _local10 - _local30;
if (_local3 > Math.PI) {
_local3 = _local3 - (Math.PI*2);
} else if (_local3 < -3.14159265358979) {
_local3 = _local3 + (Math.PI*2);
}
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:_local7, _y:_local6}, a:{base:_local30, d:_local3}};
_local30 = _local10;
_local5 = {_x:_local7, _y:_local6};
_local4++;
}
_local9 = x3 - _local5._x;
_local8 = y3 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local19, _local21);
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:x3, _y:y3}, a:{base:_local30, d:_local10 - _local30}};
_local13.d = _local17;
return(_local13);
};
Path.prototype.setInBezier = function (obj, t, segments, orient, extra) {
if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
var _local2 = segments[0];
var _local8 = segments.d * t;
var _local3 = 0;
var _local7 = 0;
var _local4 = segments.length + 1;
var _local1 = 1;
while (_local1 < _local4) {
_local7 = _local1 - 1;
_local2 = segments[_local7];
if ((_local1 == _local4) || ((_local3 + _local2.d) >= _local8)) {
break;
}
_local3 = _local3 + _local2.d;
_local1++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local3) / _local2.d;
}
var _local11 = _local2.end._x - _local2.start._x;
var _local10 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local11 * t);
obj._y = _local2.start._y + (_local10 * t);
if (extra) {
obj.t = t;
obj.n = _local7;
obj.divs = segments.length;
}
if (orient) {
obj._rotation = ((_local2.a.base + (_local2.a.d * t)) * 180) / Math.PI;
}
};
Path.prototype.reverse = function () {
var _local3 = this._segments;
var _local2 = _local3.length;
var _local4 = new Path(_local3[_local2 - 1].end._x, _local3[_local2 - 1].end._y);
while (_local2--) {
if (_local3[_local2].type == "M") {
_local4._segments[_local4._segments.length] = {d:0, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"M"};
} else if (_local3[_local2].type == "L") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"L"};
} else if (_local3[_local2].type == "C") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, r:_local3[_local2].r, a1:_local3[_local2].a2, a2:_local3[_local2].a1, o:{_x:_local3[_local2].o._x, _y:_local3[_local2].o._y}, dir:((_local3[_local2].dir == "CW") ? "CCW" : "CW"), type:"C"};
} else if (_local3[_local2].type == "B") {
var _local9 = this.divideBezier(_local3[_local2].end._x, _local3[_local2].end._y, _local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].start._x, _local3[_local2].start._y);
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, con:{_x:_local3[_local2].con._x, _y:_local3[_local2].con._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, segs:_local9, type:"B"};
}
}
_local4._length = this._length;
if (this.hasOwnProperty("curveToAccuracy")) {
_local4.curveToAccuracy = this.curveToAccuracy;
}
return(_local4);
};
Path.prototype.traverse = function (obj, t, orient, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local8 = this._length * t;
var _local5 = 0;
var _local6 = 0;
var _local7 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local7) {
_local6 = _local3 - 1;
_local2 = this._segments[_local6];
if ((_local3 == _local7) || ((_local5 + _local2.d) >= _local8)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
while (_local2.type == "M") {
_local6++;
_local2 = this._segments[_local6];
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local5) / _local2.d;
}
if (_local2.type == "L") {
var _local12 = _local2.end._x - _local2.start._x;
var _local11 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local12 * t);
obj._y = _local2.start._y + (_local11 * t);
if (orient) {
obj._rotation = (Math.atan2(_local11, _local12) * 180) / Math.PI;
}
} else if (_local2.type == "C") {
var _local13 = _local2.a1;
var _local14 = _local2.a2;
var _local10 = _local13 + ((_local14 - _local13) * t);
obj._x = _local2.o._x + (Math.cos(_local10) * _local2.r);
obj._y = _local2.o._y + (Math.sin(_local10) * _local2.r);
if (orient) {
obj._rotation = ((_local2.dir == "CW") ? (((_local10 * 180) / Math.PI) + 90) : (((_local10 * 180) / Math.PI) - 90));
}
} else if (_local2.type == "B") {
this.setInBezier(obj, t, _local2.segs, orient);
}
return(this);
};
Path.prototype.mcCircleTo = function (cen_x, cen_y, a1, a2, r, dir) {
dir = ((dir == "CCW") ? -1 : 1);
var _local6 = Math.cos;
var _local7 = Math.sin;
var _local13 = Math.abs(a2 - a1);
var _local12 = Math.floor(_local13 / (Math.PI/4)) + 1;
var _local5 = (dir * _local13) / (2 * _local12);
var _local8 = r / _local6(_local5);
var _local4 = 0;
while (_local4 < _local12) {
a2 = a1 + _local5;
a1 = a2 + _local5;
this.curveTo(cen_x + (_local6(a2) * _local8), cen_y + (_local7(a2) * _local8), cen_x + (_local6(a1) * r), cen_y + (_local7(a1) * r));
_local4++;
}
return(this);
};
Path.prototype.draw = function (mc, n) {
var _local3 = this._segments;
if (n == undefined) {
n = _local3.length;
}
var _local2 = 0;
while (_local2 < n) {
if (_local3[_local2].type == "M") {
mc.moveTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "L") {
mc.lineTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "C") {
this.mcCircleTo.call(mc, _local3[_local2].o._x, _local3[_local2].o._y, _local3[_local2].a1, _local3[_local2].a2, _local3[_local2].r, _local3[_local2].dir);
} else if (_local3[_local2].type == "B") {
mc.curveTo(_local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].end._x, _local3[_local2].end._y);
}
_local2++;
}
return(this);
};
Path.prototype.drawUpTo = function (mc, t, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local9 = this._length * t;
var _local5 = 0;
var _local7 = 0;
var _local6 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local6) {
_local7 = _local3 - 1;
_local2 = this._segments[_local7];
if ((_local3 == _local6) || ((_local5 + _local2.d) >= _local9)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local9 - _local5) / _local2.d;
}
this.draw(mc, _local7);
if (_local2.type == "M") {
mc.moveTo(_local2.end._x, _local2.end._y);
} else if (_local2.type == "L") {
mc.lineTo(_local2.start._x + ((_local2.end._x - _local2.start._x) * t), _local2.start._y + ((_local2.end._y - _local2.start._y) * t));
} else if (_local2.type == "C") {
this.mcCircleTo.call(mc, _local2.o._x, _local2.o._y, _local2.a1, _local2.a1 + ((_local2.a2 - _local2.a1) * t), _local2.r, _local2.dir);
} else if (_local2.type == "B") {
var _local8 = {};
this.setInBezier(_local8, t, _local2.segs, false, true);
var _local11 = (_local8.n / _local8.divs) + (_local8.t / _local8.divs);
mc.curveTo(_local2.start._x + ((_local2.con._x - _local2.start._x) * _local11), _local2.start._y + ((_local2.con._y - _local2.start._y) * _local11), _local8._x, _local8._y);
}
return(this);
};
function makePath() {
_root.brain.gotoAndStop(1);
track = new Path(ball._x, ball._y).curveTo(_root.g2._x, _root.g2._y, _root.goThere._x, _root.goThere._y);
track.curveToAccuracy(30);
_root.initiate.call(ball);
}
windResist = 0.985;
gravity = 1;
_root.shot = 1;
_root.goalsShow.text = "";
_root.pp = _root.ball._xscale;
_root.ppX = _root.ball._x;
_root.ppY = _root.ball._y;
_root.ppR = _root.ball._rotation;
_root.ball._xscale = _root.pp;
_root.shadowStartX = _root.shadow._x;
_root.shadowStartY = _root.shadow._y;
_root.shadowStartScaleX = _root.shadow._xscale;
_root.shadowStartScaleY = _root.shadow._yscale;
_root.shadowStartY = _root.shadow._y;
this.createEmptyMovieClip("ramp_mc", 1).lineStyle(1, 11158528, 100);
onRamp = function () {
if (this.t < 1) {
this.old_rotation = this._rotation;
track.traverse(this, this.t, true);
this.velocity = this.velocity + (_root.ballSpeed / 350);
this.t = this.t + this.velocity;
_root.ball._xscale = _root.pp - ((this.t * 0.65) * 100);
_root.ball._yscale = _root.ball._xscale;
_root.shadow._yscale = _root.ball._yscale;
_root.shadow._xscale = _root.ball._xscale;
_root.shadow._x = _root.ball._x;
_root.shadow._y = _root.shadow._y - 0.8;
} else {
_root.shadow.gotoAndStop(2);
if (_root.ball.hitTest(_root.g3)) {
_root.totalGoals = _root.totalGoals + 1;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(2);
_root.GoalSound.start();
_root.goalsShow.text = int(_root.goalsShow.text) + 1;
_root.moveNetBoo = false;
_root.g0.play();
_root.ball._rotation = 0;
_root.ball.gotoAndPlay("ballFloor");
_root.player.player.gotoAndStop(random(2) + 17);
this.onEnterFrame = showOver;
} else if ((((((((_root.ball.hitTest(_root.stadHit) || (_root.ball.hitTest(_root.stadHit2))) || (_root.ball.hitTest(_root.stadHit3))) || (_root.ball.hitTest(_root.stadHit4))) || (_root.ball.hitTest(_root.stadHit5))) || (_root.ball.hitTest(_root.stadHit6))) || (_root.ball.hitTest(_root.stadHit7))) || (_root.ball.hitTest(_root.g4))) || (_root.ball.hitTest(_root.sBoardHit))) {
if (_root.ball.hitTest(_root.g4)) {
_root.GoalHit.start();
}
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.ball.stop();
if (random(2) == 1) {
_root.returnHit._y = random(300) + 200;
_root.returnHitmid._x = 479.2;
_root.returnHit._x = 700;
} else {
_root.returnHit._y = random(100) + 100;
_root.returnHitmid._x = 93.3;
_root.returnHit._x = -255;
}
track2 = new Path(ball._x, ball._y).curveTo(_root.returnHitmid._x, _root.returnHitmid._y, _root.returnHit._x, _root.returnHit._y);
_root.endpp = _root.ball._xscale;
this.t = (this.velocity = 0);
_root.nhp = false;
this.onEnterFrame = bounceBallBack;
} else if (_root.ball.hitTest(_root.stadcrowd)) {
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.net.stp;
_root.ball.gotoAndPlay("croudBall");
this.onEnterFrame = showOver;
} else if (_root.ball.hitTest(_root.skyHit)) {
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.net.stp;
_root.ball.gotoAndPlay("skyBall");
this.onEnterFrame = showOver;
}
}
};
bounceBallBack = function () {
if (this.t < 1) {
if (_root.ball.hitTest(_root.player)) {
randSound = random(3) + 1;
trace("play this sound:" + randSound);
eval ("_root.playerHit" + randSound).start();
_root.nhp = true;
_root.shadow.gotoAndStop(2);
_root.player.player.gotoAndPlay(14);
_root.ball.gotoAndStop("hideBall");
_root.bball._x = _root.ball._x;
_root.bball._y = _root.ball._y;
_root.bball.gotoAndPlay(2);
}
if (_root.nhp != true) {
_root.shadow.gotoAndStop(1);
}
track2.traverse(this, this.t, true);
this.velocity = this.velocity + ((_root.ballSpeed + 5) / 350);
this.t = this.t + this.velocity;
_root.ball._xscale = _root.endpp + ((this.t * 0.6) * 100);
_root.ball._yscale = _root.ball._xscale;
_root.shadow._yscale = _root.ball._yscale;
_root.shadow._xscale = _root.ball._xscale;
_root.shadow._x = _root.ball._x;
_root.shadow._y = _root.shadow._y + 2;
} else {
this.onEnterFrame = showOver;
}
};
showOver = function () {
Mouse.show();
if (_root.brain._currentframe == 1) {
trace("heere");
_root.brain.play();
}
};
inFlight = function () {
this._x = this._x + this.movement_x;
this._y = this._y + this.movement_y;
this._rotation = this._rotation + this.spin;
this.movement_x = this.movement_x * windResist;
this.movement_y = this.movement_y + gravity;
this.spin = this.spin * windResist;
if (this._y > 400) {
this.t = (this.velocity = 0);
_root.ballSpeed = 0;
}
};
initiate = function () {
this.t = (this.velocity = 0);
_root.ball._xscale = _root.pp;
_root.ball._yscale = _root.pp;
this.onEnterFrame = onRamp;
_root.ball.play();
};
Instance of Symbol 52 MovieClip "brain" in Frame 29
onClipEvent (enterFrame) {
_root.moveClouds();
Mouse.hide();
if (_root.moveNetBoo == true) {
_root.moveNet();
}
if (_root.dragging == true) {
Mouse.hide();
if (((_root.ttarget._y > 336) || (_root.ttarget.hitTest(_root.scoreboard.bhit))) || (_root.ttarget.hitTest(_root.scoreboard.bhit2))) {
Mouse.show();
_root.ttarget.ttarget.gotoAndStop(6);
_root.dragging = false;
_root.nset = true;
}
}
if (_root.nset == true) {
if (_root.ttarget.hitTest(_root.scoreboard.bhit) || (_root.ttarget.hitTest(_root.scoreboard.bhit2))) {
} else if (_root.ttarget._y < 336) {
_root.player.player.gotoAndStop(1);
_root.powerbar.gotoAndStop(1);
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
_root.ttarget.play();
Mouse.hide();
_root.nset = false;
_root.dragging = true;
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
Mouse.hide();
}
}
}
Frame 30
function resetShot() {
trace(_root.shot);
eval ("_root.tt" + _root.shot).gotoAndPlay(2);
if (_root.shot == 10) {
_root.theScreen.gotoAndPlay("round3");
} else {
_root.shot = _root.shot + 1;
_root.dragging = true;
_root.player.player.gotoAndStop(1);
_root.powerbar.gotoAndStop(1);
_root.moveNetBoo = true;
_root.ball._xscale = _root.pp;
_root.ball._rotation = _root.ppR;
_root.ball._yscale = _root.pp;
_root.ball._x = _root.ppX;
_root.ball._y = _root.ppY;
_root.shadow._x = _root.shadowStartX;
_root.shadow._xscale = _root.shadowStartScaleX;
_root.shadow._yscale = _root.shadowStartScaleY;
_root.shadow._y = _root.shadowStartY;
_root.shadow.gotoAndStop(1);
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
_root.ttarget.play();
Mouse.hide();
}
}
function moveClouds() {
i = 1;
while (i < 5) {
if (eval ("_root.c" + i)._x > 660) {
eval ("_root.c" + i)._x = -100;
} else {
eval ("_root.c" + i)._x = eval ("_root.c" + i)._x + 1;
}
i = i + 1;
}
}
function putBallBack() {
_root.ball.gotoAndPlay("backBall");
resetShot();
}
function gotoRound2() {
gotoAndStop (31);
}
fscommand ("allowscale", "false");
stop();
showplayerName.text = _root.playerName;
_root.player.gotoAndStop("player" + _root.playerNumber);
_root.theScreen.gotoAndPlay(2);
_root.shot = 0;
_root.netSpeed = 3;
_root.netLeftMax = 450;
_root.netLeftMin = 220;
_root.shot = 0;
_root.powerbar.stop();
_root.resetShot();
_root.ball.gotoAndStop(1);
_root.ball.stop();
_root.onEnterFrame = function () {
var _local4 = this.getBytesLoaded();
var _local5 = this.getBytesTotal();
var _local3 = Math.floor((_local4 / _local5) * 100);
_root.swoosh.gotoAndStop(_local3);
if (been != "true") {
if (_local3 >= 100) {
been = "true";
instructionsButton.gotoAndPlay(2);
playButton.gotoAndPlay(2);
}
}
};
this.onMouseUp = function () {
if ((_root.dragging == true) && (_root.powerbar._currentframe > 1)) {
_root.powerbar.stop();
_root.dragging = false;
_root.ttarget.stopDrag();
_root.ttarget.stop();
_root.ttarget.ttarget.gotoAndStop(2);
var _local2 = {x:_root.ttarget.goThere._x, y:_root.ttarget.goThere._y};
_root.ttarget.localToGlobal(_local2);
_root.goThere._x = _local2.x;
_root.goThere._y = _local2.y;
_root.shadow._x = _root.shadowStartX;
_root.shadow._xscale = _root.shadowStartScaleX;
_root.shadow._yscale = _root.shadowStartScaleY;
_root.shadow._y = _root.shadowStartY;
_root.player.player.play();
_root.ballSpeed = 3;
if (_root.powerbar._currentframe < 22) {
_root.ballSpeed = _root.powerbar._currentframe / 8;
} else {
_root.ballSpeed = ((_root.powerbar._currentframe - 22) + 22) / 8;
}
if (_root.powerbar._currentframe < 6) {
_root.ball.gotoAndPlay("rollBall");
_root.shadow.gotoAndStop(2);
_root.moveNetBoo = false;
} else {
_root.makePath();
trace(_root.powerbar._currentframe);
}
}
};
this.onMouseDown = function () {
if (_root.dragging == true) {
_root.powerbar.play();
}
};
Path = function () {
this.init.apply(this, arguments);
};
Path.prototype.init = function (start_x, start_y) {
this._segments = [];
this._length = 0;
if (arguments.length) {
this.moveTo(start_x, start_y);
} else {
this.moveTo(0, 0);
}
};
Path.prototype.curveToAccuracy = 10;
Path.prototype.clear = function () {
this.init(0, 0);
};
Path.prototype.moveTo = function (start_x, start_y) {
this._segments[this._segments.length] = {d:0, start:{_x:this._position._x, _y:this._position._y}, end:{_x:start_x, _y:start_y}, type:"M"};
this._position = {_x:start_x, _y:start_y};
return(this);
};
Path.prototype.lineTo = function (end_x, end_y) {
var _local3 = end_x - this._position._x;
var _local2 = end_y - this._position._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
this._segments[this._segments.length] = {d:_local4, start:this._position, end:{_x:end_x, _y:end_y}, type:"L"};
this._length = this._length + _local4;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.circleTo = (Path.prototype.circleCWTo = function (end_x, end_y, arc, dir) {
if (dir == undefined) {
dir = "CW";
}
if (arc == undefined) {
arc = 0.5;
}
if (arc > 1) {
arc = 1;
} else if (arc <= 0) {
return(this.lineTo(end_x, end_y));
}
if (dir == "CCW") {
arc = 1 - arc;
}
var _local13 = {_x:(this._position._x + end_x) / 2, _y:(this._position._y + end_y) / 2};
var _local4 = end_x - this._position._x;
var _local3 = end_y - this._position._y;
var _local11 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = _local11 / 2;
var _local8 = _local7 / Math.tan(arc * Math.PI);
var _local10 = _local7 / Math.sin(arc * Math.PI);
var _local9 = Math.atan2(_local3, _local4) + (Math.PI/2);
_local13._x = _local13._x + (Math.cos(_local9) * _local8);
_local13._y = _local13._y + (Math.sin(_local9) * _local8);
var _local17 = Math.atan2(this._position._y - _local13._y, this._position._x - _local13._x);
var _local15 = Math.atan2(end_y - _local13._y, end_x - _local13._x);
if (dir == "CW") {
if (_local15 < _local17) {
_local15 = _local15 + (Math.PI*2);
}
} else if (_local17 < _local15) {
_local17 = _local17 + (Math.PI*2);
}
_local11 = _local10 * Math.abs(_local15 - _local17);
this._segments[this._segments.length] = {d:_local11, r:_local10, a1:_local17, a2:_local15, o:_local13, dir:dir, type:"C"};
this._length = this._length + _local11;
this._position = {_x:end_x, _y:end_y};
return(this);
});
Path.prototype.circleCCWTo = function (end_x, end_y, arc) {
return(this.circleTo.call(this, end_x, end_y, arc, "CCW"));
};
Path.prototype.curveTo = function (con_x, con_y, end_x, end_y) {
var _local3 = this.divideBezier(this._position._x, this._position._y, con_x, con_y, end_x, end_y);
this._segments[this._segments.length] = {d:_local3.d, start:this._position, con:{_x:con_x, _y:con_y}, end:{_x:end_x, _y:end_y}, segs:_local3, type:"B"};
this._length = this._length + _local3.d;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.divideBezier = function (x1, y1, x2, y2, x3, y3) {
var _local2;
var _local15;
var _local14;
var _local12;
var _local11;
var _local9;
var _local8;
var _local7;
var _local6;
var _local29;
var _local13 = [];
var _local5 = {_x:x1, _y:y1};
var _local22 = x2 - x1;
var _local20 = y2 - y1;
var _local21 = x3 - x2;
var _local19 = y3 - y2;
var _local16 = Math.atan2;
var _local18 = Math.sqrt;
var _local17 = 0;
var _local36;
var _local3;
var _local10;
var _local30 = _local16(_local20, _local22);
var _local4 = 1;
while (_local4 < this.curveToAccuracy) {
_local2 = _local4 / this.curveToAccuracy;
_local15 = x1 + (_local22 * _local2);
_local12 = (x2 + (_local21 * _local2)) - _local15;
_local14 = y1 + (_local20 * _local2);
_local11 = (y2 + (_local19 * _local2)) - _local14;
_local7 = _local15 + (_local12 * _local2);
_local6 = _local14 + (_local11 * _local2);
_local9 = _local7 - _local5._x;
_local8 = _local6 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local11, _local12);
_local3 = _local10 - _local30;
if (_local3 > Math.PI) {
_local3 = _local3 - (Math.PI*2);
} else if (_local3 < -3.14159265358979) {
_local3 = _local3 + (Math.PI*2);
}
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:_local7, _y:_local6}, a:{base:_local30, d:_local3}};
_local30 = _local10;
_local5 = {_x:_local7, _y:_local6};
_local4++;
}
_local9 = x3 - _local5._x;
_local8 = y3 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local19, _local21);
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:x3, _y:y3}, a:{base:_local30, d:_local10 - _local30}};
_local13.d = _local17;
return(_local13);
};
Path.prototype.setInBezier = function (obj, t, segments, orient, extra) {
if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
var _local2 = segments[0];
var _local8 = segments.d * t;
var _local3 = 0;
var _local7 = 0;
var _local4 = segments.length + 1;
var _local1 = 1;
while (_local1 < _local4) {
_local7 = _local1 - 1;
_local2 = segments[_local7];
if ((_local1 == _local4) || ((_local3 + _local2.d) >= _local8)) {
break;
}
_local3 = _local3 + _local2.d;
_local1++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local3) / _local2.d;
}
var _local11 = _local2.end._x - _local2.start._x;
var _local10 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local11 * t);
obj._y = _local2.start._y + (_local10 * t);
if (extra) {
obj.t = t;
obj.n = _local7;
obj.divs = segments.length;
}
if (orient) {
obj._rotation = ((_local2.a.base + (_local2.a.d * t)) * 180) / Math.PI;
}
};
Path.prototype.reverse = function () {
var _local3 = this._segments;
var _local2 = _local3.length;
var _local4 = new Path(_local3[_local2 - 1].end._x, _local3[_local2 - 1].end._y);
while (_local2--) {
if (_local3[_local2].type == "M") {
_local4._segments[_local4._segments.length] = {d:0, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"M"};
} else if (_local3[_local2].type == "L") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"L"};
} else if (_local3[_local2].type == "C") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, r:_local3[_local2].r, a1:_local3[_local2].a2, a2:_local3[_local2].a1, o:{_x:_local3[_local2].o._x, _y:_local3[_local2].o._y}, dir:((_local3[_local2].dir == "CW") ? "CCW" : "CW"), type:"C"};
} else if (_local3[_local2].type == "B") {
var _local9 = this.divideBezier(_local3[_local2].end._x, _local3[_local2].end._y, _local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].start._x, _local3[_local2].start._y);
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, con:{_x:_local3[_local2].con._x, _y:_local3[_local2].con._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, segs:_local9, type:"B"};
}
}
_local4._length = this._length;
if (this.hasOwnProperty("curveToAccuracy")) {
_local4.curveToAccuracy = this.curveToAccuracy;
}
return(_local4);
};
Path.prototype.traverse = function (obj, t, orient, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local8 = this._length * t;
var _local5 = 0;
var _local6 = 0;
var _local7 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local7) {
_local6 = _local3 - 1;
_local2 = this._segments[_local6];
if ((_local3 == _local7) || ((_local5 + _local2.d) >= _local8)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
while (_local2.type == "M") {
_local6++;
_local2 = this._segments[_local6];
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local5) / _local2.d;
}
if (_local2.type == "L") {
var _local12 = _local2.end._x - _local2.start._x;
var _local11 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local12 * t);
obj._y = _local2.start._y + (_local11 * t);
if (orient) {
obj._rotation = (Math.atan2(_local11, _local12) * 180) / Math.PI;
}
} else if (_local2.type == "C") {
var _local13 = _local2.a1;
var _local14 = _local2.a2;
var _local10 = _local13 + ((_local14 - _local13) * t);
obj._x = _local2.o._x + (Math.cos(_local10) * _local2.r);
obj._y = _local2.o._y + (Math.sin(_local10) * _local2.r);
if (orient) {
obj._rotation = ((_local2.dir == "CW") ? (((_local10 * 180) / Math.PI) + 90) : (((_local10 * 180) / Math.PI) - 90));
}
} else if (_local2.type == "B") {
this.setInBezier(obj, t, _local2.segs, orient);
}
return(this);
};
Path.prototype.mcCircleTo = function (cen_x, cen_y, a1, a2, r, dir) {
dir = ((dir == "CCW") ? -1 : 1);
var _local6 = Math.cos;
var _local7 = Math.sin;
var _local13 = Math.abs(a2 - a1);
var _local12 = Math.floor(_local13 / (Math.PI/4)) + 1;
var _local5 = (dir * _local13) / (2 * _local12);
var _local8 = r / _local6(_local5);
var _local4 = 0;
while (_local4 < _local12) {
a2 = a1 + _local5;
a1 = a2 + _local5;
this.curveTo(cen_x + (_local6(a2) * _local8), cen_y + (_local7(a2) * _local8), cen_x + (_local6(a1) * r), cen_y + (_local7(a1) * r));
_local4++;
}
return(this);
};
Path.prototype.draw = function (mc, n) {
var _local3 = this._segments;
if (n == undefined) {
n = _local3.length;
}
var _local2 = 0;
while (_local2 < n) {
if (_local3[_local2].type == "M") {
mc.moveTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "L") {
mc.lineTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "C") {
this.mcCircleTo.call(mc, _local3[_local2].o._x, _local3[_local2].o._y, _local3[_local2].a1, _local3[_local2].a2, _local3[_local2].r, _local3[_local2].dir);
} else if (_local3[_local2].type == "B") {
mc.curveTo(_local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].end._x, _local3[_local2].end._y);
}
_local2++;
}
return(this);
};
Path.prototype.drawUpTo = function (mc, t, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local9 = this._length * t;
var _local5 = 0;
var _local7 = 0;
var _local6 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local6) {
_local7 = _local3 - 1;
_local2 = this._segments[_local7];
if ((_local3 == _local6) || ((_local5 + _local2.d) >= _local9)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local9 - _local5) / _local2.d;
}
this.draw(mc, _local7);
if (_local2.type == "M") {
mc.moveTo(_local2.end._x, _local2.end._y);
} else if (_local2.type == "L") {
mc.lineTo(_local2.start._x + ((_local2.end._x - _local2.start._x) * t), _local2.start._y + ((_local2.end._y - _local2.start._y) * t));
} else if (_local2.type == "C") {
this.mcCircleTo.call(mc, _local2.o._x, _local2.o._y, _local2.a1, _local2.a1 + ((_local2.a2 - _local2.a1) * t), _local2.r, _local2.dir);
} else if (_local2.type == "B") {
var _local8 = {};
this.setInBezier(_local8, t, _local2.segs, false, true);
var _local11 = (_local8.n / _local8.divs) + (_local8.t / _local8.divs);
mc.curveTo(_local2.start._x + ((_local2.con._x - _local2.start._x) * _local11), _local2.start._y + ((_local2.con._y - _local2.start._y) * _local11), _local8._x, _local8._y);
}
return(this);
};
function makePath() {
_root.brain.gotoAndStop(1);
track = new Path(ball._x, ball._y).curveTo(_root.g2._x, _root.g2._y, _root.goThere._x, _root.goThere._y);
track.curveToAccuracy(30);
_root.initiate.call(ball);
}
windResist = 0.985;
gravity = 1;
_root.shot = 1;
_root.goalsShow.text = "";
_root.pp = _root.ball._xscale;
_root.ppX = _root.ball._x;
_root.ppY = _root.ball._y;
_root.ppR = _root.ball._rotation;
_root.ball._xscale = _root.pp;
_root.shadowStartX = _root.shadow._x;
_root.shadowStartY = _root.shadow._y;
_root.shadowStartScaleX = _root.shadow._xscale;
_root.shadowStartScaleY = _root.shadow._yscale;
_root.shadowStartY = _root.shadow._y;
this.createEmptyMovieClip("ramp_mc", 1).lineStyle(1, 11158528, 100);
onRamp = function () {
if (this.t < 1) {
this.old_rotation = this._rotation;
track.traverse(this, this.t, true);
this.velocity = this.velocity + (_root.ballSpeed / 350);
this.t = this.t + this.velocity;
_root.ball._xscale = _root.pp - ((this.t * 0.65) * 100);
_root.ball._yscale = _root.ball._xscale;
_root.shadow._yscale = _root.ball._yscale;
_root.shadow._xscale = _root.ball._xscale;
_root.shadow._x = _root.ball._x;
_root.shadow._y = _root.shadow._y - 0.8;
} else {
_root.shadow.gotoAndStop(2);
if (_root.ball.hitTest(eval ("_root.tt" + (_root.shot - 1)).hit)) {
_root.totalGoals = _root.totalGoals + 1;
eval ("_root.tt" + (_root.shot - 1)).play();
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(2);
_root.GoalSound.start();
_root.goalsShow.text = int(_root.goalsShow.text) + 1;
_root.moveNetBoo = false;
_root.g0.play();
_root.ball._rotation = 0;
_root.ball.gotoAndPlay("ballFloor");
_root.player.player.gotoAndStop(random(2) + 17);
this.onEnterFrame = showOver;
} else {
eval ("_root.tt" + (_root.shot - 1)).gotoAndStop("missed");
if ((((((((_root.ball.hitTest(_root.stadHit) || (_root.ball.hitTest(_root.stadHit2))) || (_root.ball.hitTest(_root.stadHit3))) || (_root.ball.hitTest(_root.stadHit4))) || (_root.ball.hitTest(_root.stadHit5))) || (_root.ball.hitTest(_root.stadHit6))) || (_root.ball.hitTest(_root.stadHit7))) || (_root.ball.hitTest(_root.g4))) || (_root.ball.hitTest(_root.sBoardHit))) {
if (_root.ball.hitTest(_root.g4)) {
_root.GoalHit.start();
}
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.ball.stop();
if (random(2) == 1) {
_root.returnHit._y = random(300) + 200;
_root.returnHitmid._x = 479.2;
_root.returnHit._x = 700;
} else {
_root.returnHit._y = random(100) + 100;
_root.returnHitmid._x = 93.3;
_root.returnHit._x = -255;
}
track2 = new Path(ball._x, ball._y).curveTo(_root.returnHitmid._x, _root.returnHitmid._y, _root.returnHit._x, _root.returnHit._y);
_root.endpp = _root.ball._xscale;
this.t = (this.velocity = 0);
_root.nhp = false;
this.onEnterFrame = bounceBallBack;
} else if (_root.ball.hitTest(_root.stadcrowd)) {
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.net.stp;
_root.ball.gotoAndPlay("croudBall");
this.onEnterFrame = showOver;
} else if (_root.ball.hitTest(_root.skyHit)) {
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.net.stp;
_root.ball.gotoAndPlay("skyBall");
this.onEnterFrame = showOver;
}
}
}
};
bounceBallBack = function () {
if (this.t < 1) {
if (_root.ball.hitTest(_root.player)) {
randSound = random(3) + 1;
trace("play this sound:" + randSound);
eval ("_root.playerHit" + randSound).start();
_root.nhp = true;
_root.shadow.gotoAndStop(2);
_root.player.player.gotoAndPlay(14);
_root.ball.gotoAndStop("hideBall");
_root.bball._x = _root.ball._x;
_root.bball._y = _root.ball._y;
_root.bball.gotoAndPlay(2);
}
if (_root.nhp != true) {
_root.shadow.gotoAndStop(1);
}
track2.traverse(this, this.t, true);
this.velocity = this.velocity + ((_root.ballSpeed + 5) / 350);
this.t = this.t + this.velocity;
_root.ball._xscale = _root.endpp + ((this.t * 0.6) * 100);
_root.ball._yscale = _root.ball._xscale;
_root.shadow._yscale = _root.ball._yscale;
_root.shadow._xscale = _root.ball._xscale;
_root.shadow._x = _root.ball._x;
_root.shadow._y = _root.shadow._y + 2;
} else {
this.onEnterFrame = showOver;
}
};
showOver = function () {
Mouse.show();
if (_root.brain._currentframe == 1) {
trace("heere");
_root.brain.play();
}
};
inFlight = function () {
this._x = this._x + this.movement_x;
this._y = this._y + this.movement_y;
this._rotation = this._rotation + this.spin;
this.movement_x = this.movement_x * windResist;
this.movement_y = this.movement_y + gravity;
this.spin = this.spin * windResist;
if (this._y > 400) {
this.t = (this.velocity = 0);
_root.ballSpeed = 0;
}
};
initiate = function () {
this.t = (this.velocity = 0);
_root.ball._xscale = _root.pp;
_root.ball._yscale = _root.pp;
this.onEnterFrame = onRamp;
_root.ball.play();
};
Instance of Symbol 52 MovieClip "brain" in Frame 30
onClipEvent (enterFrame) {
_root.moveClouds();
Mouse.hide();
if (_root.moveNetBoo == true) {
}
if (_root.dragging == true) {
Mouse.hide();
if (((_root.ttarget._y > 336) || (_root.ttarget.hitTest(_root.scoreboard.bhit))) || (_root.ttarget.hitTest(_root.scoreboard.bhit2))) {
Mouse.show();
_root.ttarget.ttarget.gotoAndStop(6);
_root.dragging = false;
_root.nset = true;
}
}
if (_root.nset == true) {
if (_root.ttarget.hitTest(_root.scoreboard.bhit) || (_root.ttarget.hitTest(_root.scoreboard.bhit2))) {
} else if (_root.ttarget._y < 336) {
_root.player.player.gotoAndStop(1);
_root.powerbar.gotoAndStop(1);
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
_root.ttarget.play();
Mouse.hide();
_root.nset = false;
_root.dragging = true;
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
Mouse.hide();
}
}
}
Frame 31
function resetShot() {
if (_root.shot == 10) {
_root.theScreen.gotoAndPlay("end");
} else {
_root.shot = _root.shot + 1;
_root.dragging = true;
_root.player.player.gotoAndStop(1);
_root.powerbar.gotoAndStop(1);
_root.moveNetBoo = true;
_root.ball._xscale = _root.pp;
_root.ball._rotation = _root.ppR;
_root.ball._yscale = _root.pp;
_root.ball._x = _root.ppX;
_root.ball._y = _root.ppY;
_root.shadow._x = _root.shadowStartX;
_root.shadow._xscale = _root.shadowStartScaleX;
_root.shadow._yscale = _root.shadowStartScaleY;
_root.shadow._y = _root.shadowStartY;
_root.shadow.gotoAndStop(1);
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
_root.ttarget.play();
Mouse.hide();
}
}
function moveClouds() {
i = 1;
while (i < 5) {
if (eval ("_root.c" + i)._x > 660) {
eval ("_root.c" + i)._x = -100;
} else {
eval ("_root.c" + i)._x = eval ("_root.c" + i)._x + 1;
}
i = i + 1;
}
}
function moveNet() {
i = 0;
if (_root.moveNetRight == true) {
while (i < 8) {
if (_root.g1._x > _root.netLeftMax) {
_root.moveNetRight = false;
} else {
eval ("_root.g" + i)._x = eval ("_root.g" + i)._x + _root.netSpeed;
}
i = i + 1;
}
} else {
while (i < 8) {
if (_root.g1._x < _root.netLeftMin) {
_root.moveNetRight = true;
} else {
eval ("_root.g" + i)._x = eval ("_root.g" + i)._x - _root.netSpeed;
}
i = i + 1;
}
}
}
function putBallBack() {
_root.ball.gotoAndPlay("backBall");
resetShot();
}
function gotoRound2() {
gotoAndStop (32);
}
fscommand ("allowscale", "false");
stop();
showplayerName.text = _root.playerName;
_root.player.gotoAndStop("player" + _root.playerNumber);
_root.theScreen.gotoAndPlay(2);
_root.netSpeed = 3;
_root.netLeftMax = 450;
_root.netLeftMin = 220;
_root.shot = 0;
_root.powerbar.stop();
_root.resetShot();
_root.ball.gotoAndStop(1);
_root.ball.stop();
_root.onEnterFrame = function () {
var _local4 = this.getBytesLoaded();
var _local5 = this.getBytesTotal();
var _local3 = Math.floor((_local4 / _local5) * 100);
_root.swoosh.gotoAndStop(_local3);
if (been != "true") {
if (_local3 >= 100) {
been = "true";
instructionsButton.gotoAndPlay(2);
playButton.gotoAndPlay(2);
}
}
};
this.onMouseUp = function () {
if ((_root.dragging == true) && (_root.powerbar._currentframe > 1)) {
_root.powerbar.stop();
_root.dragging = false;
_root.ttarget.stopDrag();
_root.ttarget.stop();
_root.ttarget.ttarget.gotoAndStop(2);
var _local2 = {x:_root.ttarget.goThere._x, y:_root.ttarget.goThere._y};
_root.ttarget.localToGlobal(_local2);
_root.goThere._x = _local2.x;
_root.goThere._y = _local2.y;
_root.shadow._x = _root.shadowStartX;
_root.shadow._xscale = _root.shadowStartScaleX;
_root.shadow._yscale = _root.shadowStartScaleY;
_root.shadow._y = _root.shadowStartY;
_root.player.player.play();
_root.ballSpeed = 3;
if (_root.powerbar._currentframe < 22) {
_root.ballSpeed = _root.powerbar._currentframe / 8;
} else {
_root.ballSpeed = ((_root.powerbar._currentframe - 22) + 22) / 8;
}
if (_root.powerbar._currentframe < 6) {
_root.ball.gotoAndPlay("rollBall");
_root.shadow.gotoAndStop(2);
_root.moveNetBoo = false;
} else {
_root.makePath();
trace(_root.powerbar._currentframe);
}
}
};
this.onMouseDown = function () {
if (_root.dragging == true) {
_root.powerbar.play();
}
};
_root.GoalSound = new Sound(sh4);
_root.GoalSound.attachSound("Goal.mp3");
_root.GoalSound.setVolume(200);
_root.GoalHit = new Sound(sh5);
_root.GoalHit.attachSound("HitGoal.mp3");
_root.GoalSound.setVolume(200);
_root.playerHit1 = new Sound(sh6);
_root.playerHit1.attachSound("urr.mp3");
_root.GoalSound.setVolume(200);
_root.playerHit2 = new Sound(sh7);
_root.playerHit2.attachSound("um.mp3");
_root.GoalSound.setVolume(200);
_root.playerHit3 = new Sound(sh8);
_root.playerHit3.attachSound("oi.mp3");
_root.GoalSound.setVolume(200);
Path = function () {
this.init.apply(this, arguments);
};
Path.prototype.init = function (start_x, start_y) {
this._segments = [];
this._length = 0;
if (arguments.length) {
this.moveTo(start_x, start_y);
} else {
this.moveTo(0, 0);
}
};
Path.prototype.curveToAccuracy = 10;
Path.prototype.clear = function () {
this.init(0, 0);
};
Path.prototype.moveTo = function (start_x, start_y) {
this._segments[this._segments.length] = {d:0, start:{_x:this._position._x, _y:this._position._y}, end:{_x:start_x, _y:start_y}, type:"M"};
this._position = {_x:start_x, _y:start_y};
return(this);
};
Path.prototype.lineTo = function (end_x, end_y) {
var _local3 = end_x - this._position._x;
var _local2 = end_y - this._position._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
this._segments[this._segments.length] = {d:_local4, start:this._position, end:{_x:end_x, _y:end_y}, type:"L"};
this._length = this._length + _local4;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.circleTo = (Path.prototype.circleCWTo = function (end_x, end_y, arc, dir) {
if (dir == undefined) {
dir = "CW";
}
if (arc == undefined) {
arc = 0.5;
}
if (arc > 1) {
arc = 1;
} else if (arc <= 0) {
return(this.lineTo(end_x, end_y));
}
if (dir == "CCW") {
arc = 1 - arc;
}
var _local13 = {_x:(this._position._x + end_x) / 2, _y:(this._position._y + end_y) / 2};
var _local4 = end_x - this._position._x;
var _local3 = end_y - this._position._y;
var _local11 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local7 = _local11 / 2;
var _local8 = _local7 / Math.tan(arc * Math.PI);
var _local10 = _local7 / Math.sin(arc * Math.PI);
var _local9 = Math.atan2(_local3, _local4) + (Math.PI/2);
_local13._x = _local13._x + (Math.cos(_local9) * _local8);
_local13._y = _local13._y + (Math.sin(_local9) * _local8);
var _local17 = Math.atan2(this._position._y - _local13._y, this._position._x - _local13._x);
var _local15 = Math.atan2(end_y - _local13._y, end_x - _local13._x);
if (dir == "CW") {
if (_local15 < _local17) {
_local15 = _local15 + (Math.PI*2);
}
} else if (_local17 < _local15) {
_local17 = _local17 + (Math.PI*2);
}
_local11 = _local10 * Math.abs(_local15 - _local17);
this._segments[this._segments.length] = {d:_local11, r:_local10, a1:_local17, a2:_local15, o:_local13, dir:dir, type:"C"};
this._length = this._length + _local11;
this._position = {_x:end_x, _y:end_y};
return(this);
});
Path.prototype.circleCCWTo = function (end_x, end_y, arc) {
return(this.circleTo.call(this, end_x, end_y, arc, "CCW"));
};
Path.prototype.curveTo = function (con_x, con_y, end_x, end_y) {
var _local3 = this.divideBezier(this._position._x, this._position._y, con_x, con_y, end_x, end_y);
this._segments[this._segments.length] = {d:_local3.d, start:this._position, con:{_x:con_x, _y:con_y}, end:{_x:end_x, _y:end_y}, segs:_local3, type:"B"};
this._length = this._length + _local3.d;
this._position = {_x:end_x, _y:end_y};
return(this);
};
Path.prototype.divideBezier = function (x1, y1, x2, y2, x3, y3) {
var _local2;
var _local15;
var _local14;
var _local12;
var _local11;
var _local9;
var _local8;
var _local7;
var _local6;
var _local29;
var _local13 = [];
var _local5 = {_x:x1, _y:y1};
var _local22 = x2 - x1;
var _local20 = y2 - y1;
var _local21 = x3 - x2;
var _local19 = y3 - y2;
var _local16 = Math.atan2;
var _local18 = Math.sqrt;
var _local17 = 0;
var _local36;
var _local3;
var _local10;
var _local30 = _local16(_local20, _local22);
var _local4 = 1;
while (_local4 < this.curveToAccuracy) {
_local2 = _local4 / this.curveToAccuracy;
_local15 = x1 + (_local22 * _local2);
_local12 = (x2 + (_local21 * _local2)) - _local15;
_local14 = y1 + (_local20 * _local2);
_local11 = (y2 + (_local19 * _local2)) - _local14;
_local7 = _local15 + (_local12 * _local2);
_local6 = _local14 + (_local11 * _local2);
_local9 = _local7 - _local5._x;
_local8 = _local6 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local11, _local12);
_local3 = _local10 - _local30;
if (_local3 > Math.PI) {
_local3 = _local3 - (Math.PI*2);
} else if (_local3 < -3.14159265358979) {
_local3 = _local3 + (Math.PI*2);
}
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:_local7, _y:_local6}, a:{base:_local30, d:_local3}};
_local30 = _local10;
_local5 = {_x:_local7, _y:_local6};
_local4++;
}
_local9 = x3 - _local5._x;
_local8 = y3 - _local5._y;
_local29 = _local18((_local9 * _local9) + (_local8 * _local8));
_local17 = _local17 + _local29;
_local10 = _local16(_local19, _local21);
_local13[_local13.length] = {d:_local29, start:_local5, end:{_x:x3, _y:y3}, a:{base:_local30, d:_local10 - _local30}};
_local13.d = _local17;
return(_local13);
};
Path.prototype.setInBezier = function (obj, t, segments, orient, extra) {
if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
var _local2 = segments[0];
var _local8 = segments.d * t;
var _local3 = 0;
var _local7 = 0;
var _local4 = segments.length + 1;
var _local1 = 1;
while (_local1 < _local4) {
_local7 = _local1 - 1;
_local2 = segments[_local7];
if ((_local1 == _local4) || ((_local3 + _local2.d) >= _local8)) {
break;
}
_local3 = _local3 + _local2.d;
_local1++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local3) / _local2.d;
}
var _local11 = _local2.end._x - _local2.start._x;
var _local10 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local11 * t);
obj._y = _local2.start._y + (_local10 * t);
if (extra) {
obj.t = t;
obj.n = _local7;
obj.divs = segments.length;
}
if (orient) {
obj._rotation = ((_local2.a.base + (_local2.a.d * t)) * 180) / Math.PI;
}
};
Path.prototype.reverse = function () {
var _local3 = this._segments;
var _local2 = _local3.length;
var _local4 = new Path(_local3[_local2 - 1].end._x, _local3[_local2 - 1].end._y);
while (_local2--) {
if (_local3[_local2].type == "M") {
_local4._segments[_local4._segments.length] = {d:0, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"M"};
} else if (_local3[_local2].type == "L") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, type:"L"};
} else if (_local3[_local2].type == "C") {
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, r:_local3[_local2].r, a1:_local3[_local2].a2, a2:_local3[_local2].a1, o:{_x:_local3[_local2].o._x, _y:_local3[_local2].o._y}, dir:((_local3[_local2].dir == "CW") ? "CCW" : "CW"), type:"C"};
} else if (_local3[_local2].type == "B") {
var _local9 = this.divideBezier(_local3[_local2].end._x, _local3[_local2].end._y, _local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].start._x, _local3[_local2].start._y);
_local4._segments[_local4._segments.length] = {d:_local3[_local2].d, start:{_x:_local3[_local2].end._x, _y:_local3[_local2].end._y}, con:{_x:_local3[_local2].con._x, _y:_local3[_local2].con._y}, end:{_x:_local3[_local2].start._x, _y:_local3[_local2].start._y}, segs:_local9, type:"B"};
}
}
_local4._length = this._length;
if (this.hasOwnProperty("curveToAccuracy")) {
_local4.curveToAccuracy = this.curveToAccuracy;
}
return(_local4);
};
Path.prototype.traverse = function (obj, t, orient, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local8 = this._length * t;
var _local5 = 0;
var _local6 = 0;
var _local7 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local7) {
_local6 = _local3 - 1;
_local2 = this._segments[_local6];
if ((_local3 == _local7) || ((_local5 + _local2.d) >= _local8)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
while (_local2.type == "M") {
_local6++;
_local2 = this._segments[_local6];
}
if (!_local2.d) {
t = 0;
} else {
t = (_local8 - _local5) / _local2.d;
}
if (_local2.type == "L") {
var _local12 = _local2.end._x - _local2.start._x;
var _local11 = _local2.end._y - _local2.start._y;
obj._x = _local2.start._x + (_local12 * t);
obj._y = _local2.start._y + (_local11 * t);
if (orient) {
obj._rotation = (Math.atan2(_local11, _local12) * 180) / Math.PI;
}
} else if (_local2.type == "C") {
var _local13 = _local2.a1;
var _local14 = _local2.a2;
var _local10 = _local13 + ((_local14 - _local13) * t);
obj._x = _local2.o._x + (Math.cos(_local10) * _local2.r);
obj._y = _local2.o._y + (Math.sin(_local10) * _local2.r);
if (orient) {
obj._rotation = ((_local2.dir == "CW") ? (((_local10 * 180) / Math.PI) + 90) : (((_local10 * 180) / Math.PI) - 90));
}
} else if (_local2.type == "B") {
this.setInBezier(obj, t, _local2.segs, orient);
}
return(this);
};
Path.prototype.mcCircleTo = function (cen_x, cen_y, a1, a2, r, dir) {
dir = ((dir == "CCW") ? -1 : 1);
var _local6 = Math.cos;
var _local7 = Math.sin;
var _local13 = Math.abs(a2 - a1);
var _local12 = Math.floor(_local13 / (Math.PI/4)) + 1;
var _local5 = (dir * _local13) / (2 * _local12);
var _local8 = r / _local6(_local5);
var _local4 = 0;
while (_local4 < _local12) {
a2 = a1 + _local5;
a1 = a2 + _local5;
this.curveTo(cen_x + (_local6(a2) * _local8), cen_y + (_local7(a2) * _local8), cen_x + (_local6(a1) * r), cen_y + (_local7(a1) * r));
_local4++;
}
return(this);
};
Path.prototype.draw = function (mc, n) {
var _local3 = this._segments;
if (n == undefined) {
n = _local3.length;
}
var _local2 = 0;
while (_local2 < n) {
if (_local3[_local2].type == "M") {
mc.moveTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "L") {
mc.lineTo(_local3[_local2].end._x, _local3[_local2].end._y);
} else if (_local3[_local2].type == "C") {
this.mcCircleTo.call(mc, _local3[_local2].o._x, _local3[_local2].o._y, _local3[_local2].a1, _local3[_local2].a2, _local3[_local2].r, _local3[_local2].dir);
} else if (_local3[_local2].type == "B") {
mc.curveTo(_local3[_local2].con._x, _local3[_local2].con._y, _local3[_local2].end._x, _local3[_local2].end._y);
}
_local2++;
}
return(this);
};
Path.prototype.drawUpTo = function (mc, t, wrap) {
if ((wrap == undefined) || (wrap == true)) {
if ((t < 0) || (t > 1)) {
t = t - Math.floor(t);
} else if (t < 0) {
t = 0;
} else if (t > 1) {
t = 1;
}
}
var _local2 = this._segments[0];
var _local9 = this._length * t;
var _local5 = 0;
var _local7 = 0;
var _local6 = this._segments.length + 1;
var _local3 = 1;
while (_local3 < _local6) {
_local7 = _local3 - 1;
_local2 = this._segments[_local7];
if ((_local3 == _local6) || ((_local5 + _local2.d) >= _local9)) {
break;
}
_local5 = _local5 + _local2.d;
_local3++;
}
if (!_local2.d) {
t = 0;
} else {
t = (_local9 - _local5) / _local2.d;
}
this.draw(mc, _local7);
if (_local2.type == "M") {
mc.moveTo(_local2.end._x, _local2.end._y);
} else if (_local2.type == "L") {
mc.lineTo(_local2.start._x + ((_local2.end._x - _local2.start._x) * t), _local2.start._y + ((_local2.end._y - _local2.start._y) * t));
} else if (_local2.type == "C") {
this.mcCircleTo.call(mc, _local2.o._x, _local2.o._y, _local2.a1, _local2.a1 + ((_local2.a2 - _local2.a1) * t), _local2.r, _local2.dir);
} else if (_local2.type == "B") {
var _local8 = {};
this.setInBezier(_local8, t, _local2.segs, false, true);
var _local11 = (_local8.n / _local8.divs) + (_local8.t / _local8.divs);
mc.curveTo(_local2.start._x + ((_local2.con._x - _local2.start._x) * _local11), _local2.start._y + ((_local2.con._y - _local2.start._y) * _local11), _local8._x, _local8._y);
}
return(this);
};
function makePath() {
_root.brain.gotoAndStop(1);
track = new Path(ball._x, ball._y).curveTo(_root.g2._x, _root.g2._y, _root.goThere._x, _root.goThere._y);
track.curveToAccuracy(30);
_root.initiate.call(ball);
}
windResist = 0.985;
gravity = 1;
_root.shot = 1;
_root.goalsShow.text = "";
_root.pp = _root.ball._xscale;
_root.ppX = _root.ball._x;
_root.ppY = _root.ball._y;
_root.ppR = _root.ball._rotation;
_root.ball._xscale = _root.pp;
_root.shadowStartX = _root.shadow._x;
_root.shadowStartY = _root.shadow._y;
_root.shadowStartScaleX = _root.shadow._xscale;
_root.shadowStartScaleY = _root.shadow._yscale;
_root.shadowStartY = _root.shadow._y;
this.createEmptyMovieClip("ramp_mc", 1).lineStyle(1, 11158528, 100);
onRamp = function () {
if (this.t < 1) {
this.old_rotation = this._rotation;
track.traverse(this, this.t, true);
this.velocity = this.velocity + (_root.ballSpeed / 350);
this.t = this.t + this.velocity;
_root.ball._xscale = _root.pp - ((this.t * 0.65) * 100);
_root.ball._yscale = _root.ball._xscale;
_root.shadow._yscale = _root.ball._yscale;
_root.shadow._xscale = _root.ball._xscale;
_root.shadow._x = _root.ball._x;
_root.shadow._y = _root.shadow._y - 0.8;
} else {
_root.shadow.gotoAndStop(2);
if (_root.ball.hitTest(_root.g3) || (_root.ball.hitTest(_root.g7))) {
_root.totalGoals = _root.totalGoals + 1;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(2);
_root.GoalSound.start();
_root.goalsShow.text = int(_root.goalsShow.text) + 1;
_root.moveNetBoo = false;
_root.g0.play();
_root.ball._rotation = 0;
_root.ball.gotoAndPlay("ballFloor");
_root.player.player.gotoAndStop(random(2) + 17);
this.onEnterFrame = showOver;
} else if ((((((((_root.ball.hitTest(_root.stadHit) || (_root.ball.hitTest(_root.stadHit2))) || (_root.ball.hitTest(_root.stadHit3))) || (_root.ball.hitTest(_root.stadHit4))) || (_root.ball.hitTest(_root.stadHit5))) || (_root.ball.hitTest(_root.stadHit6))) || (_root.ball.hitTest(_root.stadHit7))) || (_root.ball.hitTest(_root.g4))) || (_root.ball.hitTest(_root.sBoardHit))) {
if (_root.ball.hitTest(_root.g4)) {
_root.GoalHit.start();
}
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.ball.stop();
if (random(2) == 1) {
_root.returnHit._y = random(300) + 200;
_root.returnHitmid._x = 479.2;
_root.returnHit._x = 700;
} else {
_root.returnHit._y = random(100) + 100;
_root.returnHitmid._x = 93.3;
_root.returnHit._x = -255;
}
track2 = new Path(ball._x, ball._y).curveTo(_root.returnHitmid._x, _root.returnHitmid._y, _root.returnHit._x, _root.returnHit._y);
_root.endpp = _root.ball._xscale;
this.t = (this.velocity = 0);
_root.nhp = false;
this.onEnterFrame = bounceBallBack;
} else if (_root.ball.hitTest(_root.stadcrowd)) {
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.net.stp;
_root.ball.gotoAndPlay("croudBall");
this.onEnterFrame = showOver;
} else if (_root.ball.hitTest(_root.skyHit)) {
_root.moveNetBoo = false;
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.net.stp;
_root.ball.gotoAndPlay("skyBall");
this.onEnterFrame = showOver;
}
}
};
bounceBallBack = function () {
if (this.t < 1) {
if (_root.ball.hitTest(_root.g7) || (_root.ball.hitTest(_root.g8))) {
trace("ERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR");
}
if (_root.ball.hitTest(_root.player)) {
randSound = random(3) + 1;
trace("play this sound:" + randSound);
eval ("_root.playerHit" + randSound).start();
_root.nhp = true;
_root.shadow.gotoAndStop(2);
_root.player.player.gotoAndPlay(14);
_root.ball.gotoAndStop("hideBall");
_root.bball._x = _root.ball._x;
_root.bball._y = _root.ball._y;
_root.bball.gotoAndPlay(2);
}
if (_root.nhp != true) {
_root.shadow.gotoAndStop(1);
}
track2.traverse(this, this.t, true);
this.velocity = this.velocity + ((_root.ballSpeed + 5) / 350);
this.t = this.t + this.velocity;
_root.ball._xscale = _root.endpp + ((this.t * 0.6) * 100);
_root.ball._yscale = _root.ball._xscale;
_root.shadow._yscale = _root.ball._yscale;
_root.shadow._xscale = _root.ball._xscale;
_root.shadow._x = _root.ball._x;
_root.shadow._y = _root.shadow._y + 2;
} else {
this.onEnterFrame = showOver;
}
};
showOver = function () {
Mouse.show();
if (_root.brain._currentframe == 1) {
trace("heere");
_root.brain.play();
}
};
inFlight = function () {
this._x = this._x + this.movement_x;
this._y = this._y + this.movement_y;
this._rotation = this._rotation + this.spin;
this.movement_x = this.movement_x * windResist;
this.movement_y = this.movement_y + gravity;
this.spin = this.spin * windResist;
if (this._y > 400) {
this.t = (this.velocity = 0);
_root.ballSpeed = 0;
}
};
initiate = function () {
this.t = (this.velocity = 0);
_root.ball._xscale = _root.pp;
_root.ball._yscale = _root.pp;
this.onEnterFrame = onRamp;
_root.ball.play();
};
Instance of Symbol 52 MovieClip "brain" in Frame 31
onClipEvent (enterFrame) {
_root.moveClouds();
Mouse.hide();
if (_root.moveNetBoo == true) {
_root.moveNet();
}
if (_root.dragging == true) {
Mouse.hide();
if (((_root.ttarget._y > 336) || (_root.ttarget.hitTest(_root.scoreboard.bhit))) || (_root.ttarget.hitTest(_root.scoreboard.bhit2))) {
Mouse.show();
_root.ttarget.ttarget.gotoAndStop(6);
_root.dragging = false;
_root.nset = true;
}
}
if (_root.nset == true) {
if (_root.ttarget.hitTest(_root.scoreboard.bhit) || (_root.ttarget.hitTest(_root.scoreboard.bhit2))) {
} else if (_root.ttarget._y < 336) {
_root.player.player.gotoAndStop(1);
_root.powerbar.gotoAndStop(1);
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
_root.ttarget.play();
Mouse.hide();
_root.nset = false;
_root.dragging = true;
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
_root.ttarget._x = _root._xmouse;
_root.ttarget._y = _root._ymouse;
startDrag ("_root.ttarget");
_root.ttarget.ttarget.gotoAndStop(1);
Mouse.hide();
}
}
}
Frame 32
function moveClouds() {
i = 1;
while (i < 5) {
if (eval ("_root.c" + i)._x > 660) {
eval ("_root.c" + i)._x = -100;
} else {
eval ("_root.c" + i)._x = eval ("_root.c" + i)._x + 1;
}
i = i + 1;
}
}
stop();
showplayerName.text = _root.playerName;
Mouse.show();
_root.goals.text = _root.totalGoals;
_root.GoalSound.start();
Instance of Symbol 52 MovieClip in Frame 32
onClipEvent (enterFrame) {
_root.moveClouds();
}
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 45
_root.putBallBack();
gotoAndStop (2);
Symbol 61 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 2
play();
Symbol 61 MovieClip Frame 10
stop();
Symbol 61 MovieClip Frame 11
stop();
Symbol 61 MovieClip Frame 47
stop();
_root.gotoRound2();
Symbol 61 MovieClip Frame 83
stop();
_root.gotoRound2();
Symbol 61 MovieClip Frame 107
stop();
_root.gotoRound2();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 100
stop();
Symbol 70 MovieClip Frame 123
stop();
_root.Pick_Player();
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 5
stop();
Symbol 80 Button
on (release) {
_root.playGame();
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 10
stop();
Symbol 82 MovieClip Frame 18
gotoAndStop (1);
Symbol 88 Button
on (release) {
_root.playInstr();
}
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 10
stop();
Symbol 90 MovieClip Frame 18
gotoAndStop (1);
Symbol 96 Button
on (release) {
getURL ("http://www.soccercaricatures.net/?link=getingoal", "_blank");
}
Symbol 101 Button
on (release) {
getURL ("http://www.letsdesign.co.uk/?link=getingoal", "_self");
}
Symbol 107 Button
on (release) {
_root.backMenu();
}
Symbol 115 Button
on (release) {
getURL ("http://www.fulhamusa.com/?link=game", "_blank");
}
Symbol 348 Button
on (release) {
_root.myName = myName.text;
_root.playerPicked(1);
}
Symbol 349 Button
on (release) {
_root.myName = myName.text;
_root.playerPicked(2);
}
Symbol 350 Button
on (release) {
_root.myName = myName.text;
_root.playerPicked(3);
}
Symbol 351 Button
on (release) {
_root.myName = myName.text;
_root.playerPicked(4);
}
Symbol 352 MovieClip Frame 1
myName.onSetFocus = function () {
myName.text = "";
};
Symbol 357 MovieClip Frame 9
stop();
Symbol 357 MovieClip Frame 61
stop();
_root.level1();
Symbol 360 MovieClip Frame 1
stop();
Symbol 373 Button
on (release) {
getURL ("http://www.soccercaricatures.net/?link=getingoal", "_blank");
}
Symbol 377 Button
on (release) {
getURL ("http://www.fulhamusa.com/?link=game", "_blank");
}
Symbol 384 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 9
gotoAndPlay (1);
Symbol 411 MovieClip Frame 10
play();
Symbol 411 MovieClip Frame 15
gotoAndPlay ("croudBall");
Symbol 411 MovieClip Frame 16
play();
Symbol 411 MovieClip Frame 22
stop();
Symbol 411 MovieClip Frame 57
stop();
fbal.fbal.stop();
eval ("_root.goals" + (_root.shot - 1)).gotoAndStop(3);
_root.brain.play();
Symbol 411 MovieClip Frame 90
gotoAndStop (1);
trace("end call");
Symbol 411 MovieClip Frame 100
stop();
Symbol 412 MovieClip Frame 1
gotoAndPlay (1);
Symbol 413 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 12
gotoAndStop (1);
Symbol 420 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 2
play();
Symbol 420 MovieClip Frame 5
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 2
gotoAndStop (1);
Symbol 422 MovieClip Frame 3
play();
Symbol 422 MovieClip Frame 88
gotoAndPlay (3);
Symbol 553 MovieClip Frame 1
stop();
Symbol 553 MovieClip Frame 13
gotoAndStop (1);
Symbol 553 MovieClip Frame 16
gotoAndStop (1);
Symbol 580 MovieClip Frame 1
stop();
Symbol 580 MovieClip Frame 13
stop();
Symbol 580 MovieClip Frame 16
gotoAndStop (1);
Symbol 613 MovieClip Frame 13
stop();
Symbol 613 MovieClip Frame 16
gotoAndStop (1);
Symbol 640 MovieClip Frame 13
stop();
Symbol 640 MovieClip Frame 16
gotoAndStop (1);
Symbol 641 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 2
play();
Symbol 659 MovieClip Frame 8
stop();
Symbol 659 MovieClip Frame 11
stop();
Symbol 659 MovieClip Frame 12
stop();
Symbol 683 Button
on (release) {
getURL ("http://www.fulhamusa.com/?link=game", "_blank");
}
Symbol 684 Button
on (release) {
getURL ("http://www.fulhamusa.com/?link=game", "_self");
}