Frame 1
stop();
Stage.showMenu = false;
Frame 2
stop();
Mouse.hide();
function addscore(strokes, hole) {
var _local1 = strokes;
if (_local1 > 10) {
_local1 = 10;
}
_root.scoreArray[hole - 1] = int(_local1);
_root.strokes = 0;
}
function setBall() {
ball.vx = (ball.vy = 0);
ball._x = startx._x;
ball._y = startx._y;
ball._visible = true;
}
_root.scoreArray = new Array();
setBall();
Instance of Symbol 26 MovieClip "holecounter" in Frame 2
onClipEvent (enterFrame) {
this.holecount = int((_root._currentframe + 1) / 2);
}
Instance of Symbol 34 MovieClip in Frame 2
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
if (_root.strokes < 10) {
this._visible = false;
} else {
this._visible = true;
}
}
Instance of Symbol 44 MovieClip "slider" in Frame 2
onClipEvent (load) {
bgSound = new Sound();
bgSound.attachSound("Music");
bgSound.start(0, 75);
_root.playB.enabled = false;
this.slideBar._y = -75;
this.slideBar.onEnterFrame = function () {
bgSound.setVolume(-this._y);
};
this.slideBar.onPress = function () {
var _local1 = this;
startDrag (_local1, false, _local1._x, -75, _local1._x, 0);
};
this.slideBar.onRelease = (slider.slideBar.onReleaseOutside = function () {
stopDrag();
});
_root.stopB.onRelease = function () {
bgSound.stop();
_root.playB.enabled = true;
_root.stopB.enabled = false;
};
_root.playB.onRelease = function () {
bgSound.start(0, 99);
_root.playB.enabled = false;
_root.stopB.enabled = true;
};
}
Instance of Symbol 54 MovieClip in Frame 2
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Instance of Symbol 58 MovieClip "ball" in Frame 2
onClipEvent (load) {
ballhit = new Sound();
ballhit.attachSound("ballhit");
friction = 0.02;
putt = false;
stopped = true;
_root.onMouseDown = function () {
if (stopped && (!toofar)) {
putt = true;
stopped = false;
_root.strokes++;
}
};
this.swapDepths(100000);
}
onClipEvent (enterFrame) {
disx = _x - _root._xmouse;
disy = _y - _root._ymouse;
if (Math.sqrt((disx * disx) + (disy * disy)) > 100) {
_root.putter.gotoAndStop(2);
toofar = true;
} else {
_root.putter.gotoAndStop(1);
toofar = false;
}
if (putt) {
_root.aimerLines.clear();
vx = disx / 7;
vy = disy / 7;
ballhit.start();
putt = false;
}
vx = vx - (vx * friction);
vy = vy - (vy * friction);
_x = (_x + vx);
_y = (_y + vy);
if ((((vx < 0.08) && (vx > -0.08)) && ((vy < 0.08) && (vy > -0.08))) && (!hill)) {
stopped = true;
vx = (vy = 0);
} else {
stopped = false;
}
oldx = this._x;
oldy = this._y;
}
Instance of Symbol 61 MovieClip "aimer" in Frame 2
onClipEvent (load) {
_root.aimerLines = _root.createEmptyMovieClip("aimerLines", 99999);
}
onClipEvent (mouseMove) {
this._x = _root.ball._x + _root.ball.disx;
this._y = _root.ball._y + _root.ball.disy;
dx = _root.ball._x - _root._xmouse;
dy = _root.ball._y - _root._ymouse;
var dist = Math.sqrt((dx * dx) + (dy * dy));
_root.aimerLines.clear();
if (_root.ball.stopped) {
if (dist > 100) {
this.gotoAndStop(2);
_root.aimerLines.lineStyle(3, 16711680, dist);
} else {
this.gotoAndStop(1);
_root.aimerLines.lineStyle(3, 65280, dist);
}
}
_root.aimerLines.moveTo(_root.ball._x, _root.ball._y);
_root.aimerLines.lineTo(this._x, this._y);
}
onClipEvent (enterFrame) {
this._x = _root.ball._x + _root.ball.disx;
this._y = _root.ball._y + _root.ball.disy;
dx = _root.ball._x - _root._xmouse;
dy = _root.ball._y - _root._ymouse;
angle = Math.atan2(-dx, dy) * 57.2957795130823;
_rotation = angle;
if (_root.putter._visible) {
_visible = true;
} else {
_visible = false;
}
}
Instance of Symbol 66 MovieClip "putter" in Frame 2
onClipEvent (load) {
this.swapDepths(10000000);
}
onClipEvent (enterFrame) {
if (_name == "putter") {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
if (((_root.ball.stopped && (_root.ball._visible)) && (!_root.ball.hill)) && (_name == "putter")) {
_visible = true;
} else {
_visible = false;
}
_root.ball.hill = false;
}
Frame 3
play();
addscore(strokes, 1);
Frame 4
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 4
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 5
play();
addscore(strokes, 2);
Frame 6
stop();
setBall();
Instance of Symbol 74 MovieClip in Frame 6
onClipEvent (load) {
slope = 10;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 54 MovieClip in Frame 6
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Instance of Symbol 74 MovieClip in Frame 6
onClipEvent (load) {
slope = 10;
direction = 181;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Frame 7
play();
addscore(strokes, 3);
Frame 8
stop();
setBall();
Instance of Symbol 74 MovieClip in Frame 8
onClipEvent (load) {
slope = 10;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 8
onClipEvent (load) {
slope = 10;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 8
onClipEvent (load) {
slope = 10;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 8
onClipEvent (load) {
slope = 10;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 49 MovieClip in Frame 8
/* no clip actions */
Instance of Symbol 54 MovieClip in Frame 8
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 9
play();
addscore(strokes, 4);
Frame 10
stop();
setBall();
Instance of Symbol 81 MovieClip in Frame 10
onClipEvent (load) {
function getRotation(fx, fy, sx, sy) {
disx = math.abs(fx - sx);
disy = math.abs(fy - sy);
obj_x = int(sx - fx);
obj_y = int(sy - fy);
if ((obj_x > 0) && (obj_y > 0)) {
quad = 4;
}
if ((obj_x < 0) && (obj_y > 0)) {
quad = 1;
}
if ((obj_x < 0) && (obj_y < 0)) {
quad = 2;
}
if ((obj_x > 0) && (obj_y < 0)) {
quad = 3;
}
abs_x = Math.abs(obj_x);
abs_y = Math.abs(obj_y);
tg = abs_y / abs_x;
maths = (Math.atan(tg) * Number(180)) / Math.PI;
if (quad == 1) {
angle = Number(90) - Number(maths);
}
if (quad == 2) {
angle = Number(90) + Number(maths);
}
if (quad == 3) {
angle = Number(270) - Number(maths);
}
if (quad == 4) {
angle = Number(270) + Number(maths);
}
return(angle);
}
slope = 20;
direction = -90;
obj = _root.ball;
startx = [_root.pipe1._x, _root.pipe2._x, _root.pipe3._x];
starty = [_root.pipe1._y, _root.pipe2._y, _root.pipe3._y];
restart = new Array(startx[random(3)], starty[random(3)]);
xdir = 0;
ydir = 3;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
r = getRotation(obj._x, obj._y, _x, _y);
obj.vx = obj.vx - (Math.sin(r * (Math.PI/180)) * (slope / 200));
obj.vy = obj.vy + (Math.cos(r * (Math.PI/180)) * (slope / 200));
}
if (this.conehole.hitTest(obj._x, obj._y)) {
obj._visible = false;
obj.vx = 0;
obj.vy = 0;
timer++;
if (timer > 50) {
obj._x = restart[0];
obj._y = restart[1];
obj._visible = true;
obj.vx = xdir;
obj.vy = ydir;
}
}
}
Instance of Symbol 54 MovieClip in Frame 10
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Instance of Symbol 83 MovieClip "pipe1" in Frame 10
onClipEvent (load) {
bounce = 1;
obj = _parent.ball;
ballradius = obj._width / 2;
edgeleft = this._x - (this._width / 2);
edgeright = this._x + (this._width / 2);
edgetop = this._y - (this._height / 2);
edgebottom = this._y + (this._height / 2);
}
onClipEvent (enterFrame) {
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy < edgetop)) {
side = "t";
}
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy > edgebottom)) {
side = "b";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx < edgeleft)) {
side = "l";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx > edgeright)) {
side = "r";
}
if (obj.hitTest(this)) {
if (side == "t") {
obj._y = edgetop - ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "b") {
obj._y = edgebottom + ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "l") {
obj._x = edgeleft - ballradius;
obj.vx = obj.vx * (-bounce);
}
if (side == "r") {
obj._x = edgeright + ballradius;
obj.vx = obj.vx * (-bounce);
}
}
}
Instance of Symbol 83 MovieClip "pipe2" in Frame 10
onClipEvent (load) {
bounce = 1;
obj = _parent.ball;
ballradius = obj._width / 2;
edgeleft = this._x - (this._width / 2);
edgeright = this._x + (this._width / 2);
edgetop = this._y - (this._height / 2);
edgebottom = this._y + (this._height / 2);
}
onClipEvent (enterFrame) {
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy < edgetop)) {
side = "t";
}
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy > edgebottom)) {
side = "b";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx < edgeleft)) {
side = "l";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx > edgeright)) {
side = "r";
}
if (obj.hitTest(this)) {
if (side == "t") {
obj._y = edgetop - ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "b") {
obj._y = edgebottom + ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "l") {
obj._x = edgeleft - ballradius;
obj.vx = obj.vx * (-bounce);
}
if (side == "r") {
obj._x = edgeright + ballradius;
obj.vx = obj.vx * (-bounce);
}
}
}
Instance of Symbol 83 MovieClip "pipe3" in Frame 10
onClipEvent (load) {
bounce = 1;
obj = _parent.ball;
ballradius = obj._width / 2;
edgeleft = this._x - (this._width / 2);
edgeright = this._x + (this._width / 2);
edgetop = this._y - (this._height / 2);
edgebottom = this._y + (this._height / 2);
}
onClipEvent (enterFrame) {
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy < edgetop)) {
side = "t";
}
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy > edgebottom)) {
side = "b";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx < edgeleft)) {
side = "l";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx > edgeright)) {
side = "r";
}
if (obj.hitTest(this)) {
if (side == "t") {
obj._y = edgetop - ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "b") {
obj._y = edgebottom + ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "l") {
obj._x = edgeleft - ballradius;
obj.vx = obj.vx * (-bounce);
}
if (side == "r") {
obj._x = edgeright + ballradius;
obj.vx = obj.vx * (-bounce);
}
}
}
Frame 11
play();
addscore(strokes, 5);
Frame 12
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 12
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Instance of Symbol 74 MovieClip in Frame 12
onClipEvent (load) {
slope = 15;
direction = -90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 12
onClipEvent (load) {
slope = 20;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 12
onClipEvent (load) {
slope = 20;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 12
onClipEvent (load) {
slope = 15;
direction = -90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 12
onClipEvent (load) {
slope = 20;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 12
onClipEvent (load) {
slope = 20;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Frame 13
play();
addscore(strokes, 6);
Frame 14
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 14
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Instance of Symbol 74 MovieClip in Frame 14
onClipEvent (load) {
slope = 20;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 14
onClipEvent (load) {
slope = 20;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 14
onClipEvent (load) {
slope = 20;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 14
onClipEvent (load) {
slope = 20;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Frame 15
play();
addscore(strokes, 7);
Frame 16
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 16
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 17
play();
addscore(strokes, 8);
Frame 18
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 18
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 19
play();
addscore(strokes, 9);
Frame 20
stop();
setBall();
Instance of Symbol 74 MovieClip in Frame 20
onClipEvent (load) {
slope = 10;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 20
onClipEvent (load) {
slope = 15;
direction = -90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 20
onClipEvent (load) {
slope = 4;
direction = 180.5;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 20
onClipEvent (load) {
slope = 20;
direction = 90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 20
onClipEvent (load) {
slope = 20;
direction = 179.5;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 20
onClipEvent (load) {
slope = 5;
direction = -90;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 54 MovieClip in Frame 20
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 21
play();
addscore(strokes, 10);
Frame 22
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 22
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 23
play();
addscore(strokes, 11);
Frame 24
stop();
setBall();
Instance of Symbol 94 MovieClip in Frame 24
onClipEvent (load) {
slope = 15;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 94 MovieClip in Frame 24
onClipEvent (load) {
slope = 15;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 54 MovieClip in Frame 24
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 25
play();
addscore(strokes, 12);
Frame 26
stop();
setBall();
Instance of Symbol 74 MovieClip in Frame 26
onClipEvent (load) {
slope = 7;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 26
onClipEvent (load) {
slope = 7;
direction = 179.5;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 54 MovieClip in Frame 26
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 27
play();
addscore(strokes, 13);
Frame 28
stop();
setBall();
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 28
onClipEvent (load) {
slope = 5;
direction = 180;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 54 MovieClip in Frame 28
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 29
play();
addscore(strokes, 14);
Frame 30
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 30
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 31
play();
addscore(strokes, 15);
Frame 32
stop();
setBall();
Instance of Symbol 54 MovieClip in Frame 32
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 33
play();
addscore(strokes, 16);
Frame 34
stop();
setBall();
Instance of Symbol 110 MovieClip in Frame 34
onClipEvent (load) {
this.gotoAndPlay(200);
obj = _root.ball;
restart = new Array(_root.startx._x, _root.startx._y);
}
onClipEvent (enterFrame) {
if (this.hitTest(obj) && ((this._currentframe > 0) && (this._currentframe < 425))) {
obj.vx = (obj.vy = 0);
obj._alpha = 0;
if (obj._alpha == 0) {
obj._x = restart[0];
obj._y = restart[1];
obj._alpha = 100;
}
}
}
Instance of Symbol 110 MovieClip in Frame 34
onClipEvent (load) {
obj = _root.ball;
restart = new Array(_root.startx._x, _root.startx._y);
}
onClipEvent (enterFrame) {
if (this.hitTest(obj) && ((this._currentframe > 0) && (this._currentframe < 425))) {
obj.vx = (obj.vy = 0);
obj._alpha = 0;
if (obj._alpha == 0) {
obj._x = restart[0];
obj._y = restart[1];
obj._alpha = 100;
}
}
}
Instance of Symbol 54 MovieClip in Frame 34
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Frame 35
play();
addscore(strokes, 17);
Frame 36
stop();
setBall();
Instance of Symbol 113 MovieClip in Frame 36
onClipEvent (load) {
obj = _root.ball;
restart = new Array(_root.startx._x, _root.startx._y);
}
onClipEvent (enterFrame) {
if ((this.hitTest(obj) && (!obj.hitTest(_root.island))) && (obj.vy < 5)) {
obj.vx = (obj.vy = 0);
obj._alpha = 0;
if (obj._alpha == 0) {
obj._x = restart[0];
obj._y = restart[1];
obj._alpha = 100;
}
}
}
Instance of Symbol 74 MovieClip in Frame 36
onClipEvent (load) {
slope = 5;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 36
onClipEvent (load) {
slope = 5;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 36
onClipEvent (load) {
slope = 5;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 74 MovieClip in Frame 36
onClipEvent (load) {
slope = 5;
direction = 0;
obj = _root.ball;
}
onClipEvent (enterFrame) {
if (this.hitTest(obj)) {
obj.vx = obj.vx - (Math.sin(direction * (Math.PI/180)) * (slope / 100));
obj.vy = obj.vy - (Math.cos(direction * (Math.PI/180)) * (slope / 100));
}
}
Instance of Symbol 115 MovieClip "island" in Frame 36
onClipEvent (load) {
obj = _root.ball;
flip = false;
}
onClipEvent (enterFrame) {
if (!flip) {
vx = -0.5;
}
if (_x <= 260) {
flip = true;
}
if (flip) {
vx = 0.5;
}
if (_x >= 340) {
flip = false;
}
this._x = this._x + vx;
if (this.hitTest(obj) && (obj.vy < 7)) {
obj.friction = 0.1;
obj._x = obj._x + this.vx;
} else {
obj.friction = 0.02;
}
}
Frame 37
_root.ball.removeMovieClip();
stopAllSounds();
_root.music_button.removeMovieClip();
play();
addscore(strokes, 18);
Frame 38
stop();
Mouse.show();
totalstrokes = 0;
i = 0;
while (i <= 17) {
totalstrokes = totalstrokes + _root.scoreArray[i];
i++;
}
if (totalstrokes >= 18) {
grade = "S";
}
if (totalstrokes >= 25) {
grade = "A";
}
if (totalstrokes >= 35) {
grade = "B";
}
if (totalstrokes >= 45) {
grade = "C";
}
if (totalstrokes >= 60) {
grade = "D";
}
if (totalstrokes >= 90) {
grade = "F";
}
hole1 = scoreArray[0];
hole2 = scoreArray[1];
hole3 = scoreArray[2];
hole4 = scoreArray[3];
hole5 = scoreArray[4];
hole6 = scoreArray[5];
hole7 = scoreArray[6];
hole8 = scoreArray[7];
hole9 = scoreArray[8];
hole10 = scoreArray[9];
hole11 = scoreArray[10];
hole12 = scoreArray[11];
hole13 = scoreArray[12];
hole14 = scoreArray[13];
hole15 = scoreArray[14];
hole16 = scoreArray[15];
hole17 = scoreArray[16];
hole18 = scoreArray[17];
Symbol 16 Button
on (release) {
_root.gotoAndPlay(1);
}
Symbol 17 MovieClip Frame 1
stop();
total = _root.getBytesTotal();
_root.onEnterFrame = function () {
loaded = _root.getBytesLoaded();
per = int((loaded / total) * 100);
this.loadbar.gotoAndStop(per);
if (per == 100) {
gotoAndStop (2);
}
};
Symbol 17 MovieClip Frame 2
stop();
Symbol 29 Button
on (release) {
_root.strokes = 10;
nextFrame();
}
Symbol 49 MovieClip Frame 1
wallhit = new Sound();
wallhit.attachSound("ballhit");
bounce = 1;
obj = _parent.ball;
ballradius = obj._width / 2;
edgeleft = this._x - (this._width / 2);
edgeright = this._x + (this._width / 2);
edgetop = this._y - (this._height / 2);
edgebottom = this._y + (this._height / 2);
this.onEnterFrame = function () {
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy < edgetop)) {
side = "t";
}
if (((obj.oldx > edgeleft) && (obj.oldx < edgeright)) && (obj.oldy > edgebottom)) {
side = "b";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx < edgeleft)) {
side = "l";
}
if (((obj.oldy > edgetop) && (obj.oldy < edgebottom)) && (obj.oldx > edgeright)) {
side = "r";
}
if (obj.hitTest(this)) {
if (side == "t") {
obj._y = edgetop - ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "b") {
obj._y = edgebottom + ballradius;
obj.vy = obj.vy * (-bounce);
}
if (side == "l") {
obj._x = edgeleft - ballradius;
obj.vx = obj.vx * (-bounce);
}
if (side == "r") {
obj._x = edgeright + ballradius;
obj.vx = obj.vx * (-bounce);
}
}
};
Instance of Symbol 48 MovieClip in Symbol 49 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.ball)) {
_parent.wallhit.start();
}
}
Symbol 54 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if (soundplay == true) {
this.gotoAndPlay(2);
}
};
Symbol 54 MovieClip Frame 2
stop();
Symbol 61 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 66 MovieClip Frame 3
stop();
Instance of Symbol 73 MovieClip in Symbol 74 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.ball)) {
_root.ball.hill = true;
}
}
Symbol 87 MovieClip Frame 1
obj = _root.ball;
restart = new Array(_root.startx._x, _root.startx._y);
this.onEnterFrame = function () {
if (this.hitTest(obj)) {
obj.vx = (obj.vy = 0);
obj._alpha = 0;
if (obj._alpha == 0) {
obj._x = restart[0];
obj._y = restart[1];
obj._alpha = 100;
}
}
};
Symbol 101 MovieClip Frame 1
friction = 0.9;
obj = _root.ball;
this.onEnterFrame = function () {
if (this.hitTest(obj)) {
obj.vx = obj.vx * friction;
obj.vy = obj.vy * friction;
}
};
Symbol 104 MovieClip Frame 1
obj = _root.ball;
orgfriction = obj.friction;
this.onEnterFrame = function () {
if (this.hitTest(obj)) {
obj.friction = 0.005;
} else {
obj.friction = orgfriction;
}
};
Instance of Symbol 54 MovieClip in Symbol 115 MovieClip Frame 1
onClipEvent (load) {
ballsink = new Sound();
ballsink.attachSound("ballsink");
obj = _root.ball;
timerstart = false;
}
onClipEvent (enterFrame) {
if (this.holehit.hitTest(obj)) {
if (((obj.vx > -3) && (obj.vx < 3)) && ((obj.vy > -3) && (obj.vy < 3))) {
if (!soundplay) {
ballsink.start();
soundplay = true;
}
obj._visible = false;
timerstart = true;
}
}
if (timerstart) {
timer++;
if (timer > 50) {
_root.startx.removeMovieClip();
_root.gotoAndPlay(_root._currentframe + 1);
}
}
}
Symbol 145 Button
on (release) {
gotoAndPlay (1);
}