Frame 3
start_time = getTimer();
i_want_a_newsletter = false;
logos_seen = 1;
Frame 4
Set("/:FlashVersion", getVersion());
if ("4" < (substring(/:FlashVersion, 5, 1))) {
if ((substring(/:FlashVersion, 1, 3)) eq "WIN") {
Set("/:Platform", "You are working on a Windows Machine");
} else if ((substring(/:FlashVersion, 1, 3)) eq "MAC") {
Set("/:Platform", "You are working on a Macintosh");
} else {
Set("/:Platform", "We were unable to determine your operating system.");
}
Set("/:PluginMessage", "You have the Flash 5 Plugin required for this game.");
gotoAndPlay (5);
} else {
Set("/:PluginMessage", "You do not have the Flash Plugin required for this game.");
Set("/:PluginMessage2", "Please download one for free from http://www.macromedia.com");
}
stop();
Frame 5
logos_seen++;
stop();
Frame 6
level = 0;
score = 0;
logos_seen++;
max_level = 5;
bonus_time = 0;
lookup = new Array();
time_limit = 90;
lookup[1] = 9;
lookup[2] = 15;
lookup[3] = 24;
lookup[4] = 36;
lookup[5] = 60;
blookup = new Array();
blookup[1] = 5;
blookup[2] = 10;
blookup[3] = 15;
blookup[4] = 20;
blookup[5] = 25;
gotoAndPlay (256);
Frame 7
if (hole_id == 1) {
bonus_time = bonus_time + 180;
}
if (hole_id == 2) {
bonus_time = bonus_time + 90;
}
logos_seen++;
bonus_text = (((("Bonus = " + bonus_time) + " x ") + bonus_mult) + " = ") + (bonus_time * bonus_mult);
score = score + (bonus_time * bonus_mult);
bonus_text_done = "";
if (level == 5) {
score = score + 5000;
bonus_text_done = "BONUS 5000 points for completing all levels!";
}
Frame 256
lock_timer = false;
level++;
if (5 < level) {
gotoAndPlay (1206);
} else {
target = lookup[level];
target_left = target;
hole_id = 1;
bonus_mult = blookup[level];
level_text = level + " of 5";
target_text = target + " balls on the green";
}
Frame 257
stop();
Frame 258
gotoAndPlay (276);
Frame 259
trace("ERROR!!!!");
Frame 262
stop();
hole_id++;
logos_seen++;
if (3 < hole) {
}
Frame 268
stop();
Frame 269
lock_timer = false;
if (hole_id == 1) {
gotoAndPlay (276);
} else if (hole_id == 2) {
gotoAndPlay (497);
} else {
gotoAndPlay (743);
}
Frame 276
logos_seen++;
stop();
Frame 277
logos_seen++;
attempt = 0;
total = 0;
goes = 10;
avge = "-";
startline = 350;
space = 65;
i = 0;
while (10 >= i) {
duplicateMovieClip ("line", i, i);
eval (i)._y = startline;
eval (i)._yscale = (startline / 350) * 100;
eval (i)._xscale = (startline / 350) * 100;
startline = startline - space;
space = space / 1.2;
i++;
}
i = 0;
while (10 >= i) {
removeMovieClip("x" + i);
i++;
}
removeMovieClip("man");
duplicateMovieClip ("tempman", "man", 100000);
Instance of Symbol 132 MovieClip "tempman" in Frame 277
/* no clip actions */
Instance of Symbol 165 MovieClip "wind" in Frame 277
onClipEvent (load) {
function init() {
strength = random(5);
dirn = random(360);
count = 0;
}
dst = 3;
strength = random(5);
dirn = random(360);
max = 5;
min = 1;
wait = 20;
count = 0;
}
onClipEvent (enterFrame) {
if (_level0.level >= 7) {
max = _level0.level;
} else {
max = 5;
}
this.pointer._rotation = dirn;
if (_level0.wind_blowing) {
dirn = (dirn + random(10)) - random(10);
count++;
if (wait < count) {
strength = (strength + random(2)) - random(2);
if (max < strength) {
strength = max;
}
if (strength < min) {
strength = min;
}
dst = strength * 3;
count = 0;
}
}
}
Instance of Symbol 167 MovieClip "timer" in Frame 277
onClipEvent (load) {
function set_timer() {
if (!_level0.lock_timer) {
rtime = _level0.time_limit;
running = true;
_level0.lock_timer = true;
} else {
_level0.score = 0;
rtime = 0;
running = true;
}
}
rtime = _level0.time_limit;
running = false;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.0277777777777778;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
running = false;
}
}
time = int(rtime);
}
Frame 279
attempt = 0;
man._visible = true;
gameover = false;
timer.set_timer();
i = 0;
while (10 >= i) {
eval (i)._visible = true;
i++;
}
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
Frame 280
shot_wait = true;
t = 0;
man._x = 280;
man._y = 200;
attempt++;
wind_blowing = true;
_level0.wind.init();
xballcentre = 275;
hit = 0;
_level0.power.gotoandstop(1);
_level0.man.gotoandstop(1);
_level0.snap.gotoandstop(1);
powerscale = 8;
pstart = 20;
pcap = 180;
angle = (32 + random(2)) - random(2);
a = -2;
yballcentre = 380;
ball._x = xballcentre;
ball._y = yballcentre;
cue._y = yballcentre + 200;
shadow._x = xballcentre;
shadow._y = yballcentre;
bounce = 0;
setProperty("/ball", _xscale , 100);
setProperty("/ball", _yscale , 100);
ball._visible = true;
shadow._visible = true;
water = false;
splash._visible = false;
message = "";
Frame 281
Instance of Symbol 190 MovieClip in Frame 281
onClipEvent (mouseUp) {
if (state == "power_up") {
state = "snap";
}
if (state == "address") {
state = "power_up";
_level0.power.gotoandplay(2);
_level0.wind_blowing = false;
}
}
onClipEvent (mouseDown) {
if (state == "address") {
}
if (state == "power_up") {
_level0.u = _level0.power._currentframe * 1;
_level0.power.stop();
_level0.snap.gotoandplay(2);
}
if (state == "snap") {
_level0.snap.stop();
diff = 14 - _level0.snap._currentframe;
_level0.ratio = (-diff) / 14;
_level0.start_angle = _level0.arrow._rotation;
if (!_level0.gameover) {
_level0.man.gotoandplay(2);
_level0.shot_wait = false;
state = "shoot";
} else {
_level0.gotoandplay("check_end");
}
}
}
onClipEvent (load) {
state = "address";
dx = 0;
}
Frame 282
if (gameover) {
_level0.gotoandplay("check_end");
} else if (shot_wait) {
gotoAndPlay (281);
} else {
gotoAndPlay (290);
}
Frame 294
hit_sign = false;
wind_ang = _level0.wind.pointer._rotation;
wind_factor_y = _level0.wind.strength * Math.cos((wind_ang * 3.142) / 180);
wind_factor_x = _level0.wind.strength * Math.sin((wind_ang * 3.142) / 180);
trace("wind_x = " + wind_factor_x);
trace("wind_y = " + wind_factor_y);
bdirn = 1;
t = 0;
theta = (Math.atan(ratio) * 180) / 3.142;
theta = (theta / 4) + (wind_factor_x / 2);
u = u * Math.cos((theta * 3.142) / 180);
Frame 295
t = Number(t) + 0.05;
temp = s + bounce;
temp = int(temp * 10) / 10;
s = (Math.cos((angle * 3.142) / 180) * Number(u * t)) + Number(((a * t) * t) / 2);
s = s + ((wind_factor_y / 2) * t);
v = (Math.cos((angle * 3.142) / 180) * Number(u)) + Number(a * t);
z = (Math.sin((angle * 3.142) / 180) * Number(u * t)) + Number(((-9.8 * t) * t) / 2);
if (water == false) {
if (z < 0) {
z = 0;
bounce = bounce + s;
t = 0;
s = 0;
u = v;
angle = angle / 1.5;
a = a - 1;
if (river.hittest(ball._x, ball._y, true)) {
trace("SPLOSSSHHHHHHH");
ball._visible = false;
shadow._visible = false;
splash._visible = true;
splash._x = ball._x;
splash._y = ball._y;
water = true;
tellTarget ("splash") {
gotoAndPlay (1);
};
} else if (bunker.hittest(ball._x, ball._y, true)) {
ball._visible = true;
shadow._visible = true;
gotoAndPlay (443);
}
}
}
sx = Math.sin((theta * 3.142) / 180) * (s + bounce);
ball._x = xballcentre + ((bdirn * sx) * 7);
shadow._x = ball._x;
shadow._y = 400 / Math.pow(1.5, (s + bounce) / 30);
bally = shadow._y - ((z * shadow._y) / 12);
if (-100 < bally) {
ball._y = bally;
} else {
ball._y = -100;
}
ball._xscale = ((shadow._y / 400) * 100) - 5;
ball._yscale = ((shadow._y / 400) * 100) - 5;
shadow._xscale = ((shadow._y / 400) * 100) - 5;
shadow._yscale = ((shadow._y / 400) * 100) - 5;
Frame 296
dist_hole = Math.sqrt(((ball._x - hole._x) * (ball._x - hole._x)) + ((ball._y - hole._y) * (ball._y - hole._y)));
hole_in_one = false;
if ((dist_hole < 2) and (v < 10)) {
trace("in the hole!");
v = -1;
ball._x = -999;
shadow._x = -999;
hole_in_one = true;
}
if (sign.hittest(ball._x, ball._y, true) and sign.hittest(shadow._x, shadow._y, true)) {
trace("HIT THE BOARD!!!!");
hit_sign = true;
boardhit.gotoandplay(2);
ball._x = -999;
shadow._x = -999;
v = -1;
}
if ((Number(v) >= 0) and (water == false)) {
gotoAndPlay (295);
}
Frame 297
trace("HEEEEEEEEEEEEEEEEEEEEE!");
trace("x=" + ball._x);
trace("y=" + ball._y);
trace("x=" + _level0.hole._x);
trace("y=" + hole._y);
otg_multi = 0;
if (hole.green.hittest(ball._x, ball._y, true)) {
trace("landed on green");
if (hole.green.three.hittest(ball._x, ball._y, true)) {
trace("landed on three");
otg = _level0.timer.time * 3;
score = score + otg;
otg_multi = 3;
} else if (hole.green.two.hittest(ball._x, ball._y, true)) {
trace("landed on two");
otg = _level0.timer.time * 2;
otg_multi = 2;
score = score + otg;
} else if (hole.green.one.hittest(ball._x, ball._y, true)) {
trace("landed on one");
otg = _level0.timer.time * 1;
otg_multi = 1;
score = score + otg;
}
target_left--;
on_green = true;
clap.gotoandplay(2);
} else {
on_green = false;
}
if (hole_in_one) {
target_left--;
otg = _level0.timer.time * 5;
otg_multi = 5;
score = score + otg;
down.gotoandplay(2);
clap.gotoandplay(2);
t = 0;
}
trace(sx);
trace(temp);
yards = Math.sqrt((Math.abs(130 - temp) * Math.abs(130 - temp)) + ((sx * sx) * 4));
if (water == false) {
if (on_green) {
message = "You finished on the green";
} else {
message = "You finished off the green";
}
if (yards < 70) {
duplicateMovieClip ("ball", "x" + attempt, attempt + 10);
}
} else {
message = "You're in the water !";
}
avge = int((10 * total) / attempt) / 10;
Frame 301
if (on_green or hole_in_one) {
gotoAndPlay (369);
} else if (hit_sign) {
gotoAndPlay (306);
} else {
gotoAndPlay (341);
}
Frame 306
target_left--;
otg = _level0.timer.time * 5;
otg_multi = 5;
score = score + otg;
t = 0;
Frame 340
down.gotoandplay(2);
gotoAndPlay (369);
Frame 367
if (gameover) {
gotoAndPlay (422);
} else {
gotoAndPlay (280);
}
Frame 369
otg_i = int(otg / otg_multi);
otg_score = ((((("You scored " + otg_i) + "x") + otg_multi) + " = ") + otg) + " points";
Frame 421
trace("here!!");
if (target_left < 1) {
gameover = true;
}
if (gameover) {
gotoAndPlay (422);
} else {
gotoAndPlay (280);
}
Frame 422
trace("gameover1");
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
i = 0;
while (10 >= i) {
eval (i)._visible = false;
i++;
}
man._visible = false;
trace("left - " + target_left);
if (target_left < 1) {
gameover = false;
}
if (gameover) {
gotoAndPlay (484);
} else {
trace("LEVEL DONE!!!");
bonus_time = _level0.timer.time;
gotoAndPlay (7);
}
Frame 423
stop();
Frame 443
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
i = 0;
while (10 >= i) {
eval (i)._visible = false;
i++;
}
man._visible = false;
Frame 444
explode.gotoandplay(2);
Frame 483
gotoAndPlay (1206);
Frame 484
trace("here too!!");
gotoAndPlay (262);
Frame 494
gotoAndPlay (277);
Frame 497
logos_seen++;
stop();
Frame 498
logos_seen++;
attempt = 0;
total = 0;
goes = 10;
avge = "-";
startline = 350;
space = 65;
i = 0;
while (10 >= i) {
duplicateMovieClip ("line", i, i);
eval (i)._y = startline;
eval (i)._yscale = (startline / 350) * 100;
eval (i)._xscale = (startline / 350) * 100;
startline = startline - space;
space = space / 1.2;
i++;
}
i = 0;
while (10 >= i) {
removeMovieClip("x" + i);
i++;
}
removeMovieClip("man");
duplicateMovieClip ("tempman", "man", 100000);
Instance of Symbol 132 MovieClip "tempman" in Frame 498
/* no clip actions */
Instance of Symbol 165 MovieClip "wind" in Frame 498
onClipEvent (load) {
function init() {
strength = random(5);
dirn = random(360);
count = 0;
}
dst = 3;
strength = random(5);
dirn = random(360);
max = 5;
min = 1;
wait = 20;
count = 0;
}
onClipEvent (enterFrame) {
if (_level0.level >= 7) {
max = _level0.level;
} else {
max = 5;
}
this.pointer._rotation = dirn;
if (_level0.wind_blowing) {
dirn = (dirn + random(10)) - random(10);
count++;
if (wait < count) {
strength = (strength + random(2)) - random(2);
if (max < strength) {
strength = max;
}
if (strength < min) {
strength = min;
}
dst = strength * 3;
count = 0;
}
}
}
Instance of Symbol 167 MovieClip "timer" in Frame 498
onClipEvent (load) {
function set_timer() {
if (!_level0.lock_timer) {
rtime = _level0.time_limit;
running = true;
_level0.lock_timer = true;
} else {
_level0.score = 0;
rtime = 0;
running = true;
}
}
rtime = _level0.time_limit;
running = false;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.0277777777777778;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
running = false;
}
}
time = int(rtime);
}
Frame 500
attempt = 0;
man._visible = true;
gameover = false;
timer.set_timer();
i = 0;
while (10 >= i) {
eval (i)._visible = true;
i++;
}
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
Frame 501
shot_wait = true;
t = 0;
man._x = 280;
man._y = 200;
attempt++;
wind_blowing = true;
_level0.wind.init();
xballcentre = 275;
hit = 0;
_level0.power.gotoandstop(1);
_level0.man.gotoandstop(1);
_level0.snap.gotoandstop(1);
powerscale = 8;
pstart = 20;
pcap = 180;
angle = (32 + random(2)) - random(2);
a = -2;
yballcentre = 380;
ball._x = xballcentre;
ball._y = yballcentre;
cue._y = yballcentre + 200;
shadow._x = xballcentre;
shadow._y = yballcentre;
bounce = 0;
setProperty("/ball", _xscale , 100);
setProperty("/ball", _yscale , 100);
ball._visible = true;
shadow._visible = true;
water = false;
splash._visible = false;
message = "";
Frame 502
Instance of Symbol 190 MovieClip in Frame 502
onClipEvent (mouseUp) {
if (state == "power_up") {
state = "snap";
}
if (state == "address") {
state = "power_up";
_level0.power.gotoandplay(2);
_level0.wind_blowing = false;
}
}
onClipEvent (mouseDown) {
if (state == "address") {
}
if (state == "power_up") {
_level0.u = _level0.power._currentframe * 1;
_level0.power.stop();
_level0.snap.gotoandplay(2);
}
if (state == "snap") {
_level0.snap.stop();
diff = 14 - _level0.snap._currentframe;
_level0.ratio = (-diff) / 14;
_level0.start_angle = _level0.arrow._rotation;
if (!_level0.gameover) {
_level0.man.gotoandplay(2);
_level0.shot_wait = false;
state = "shoot";
} else {
_level0.gotoandplay("check_end");
}
}
}
onClipEvent (load) {
state = "address";
dx = 0;
}
Frame 503
if (gameover) {
_level0.gotoandplay("check_end");
} else if (shot_wait) {
gotoAndPlay (502);
} else {
gotoAndPlay (511);
}
Frame 515
t = 0;
hit_sign = false;
wind_ang = _level0.wind.pointer._rotation;
wind_factor_y = _level0.wind.strength * Math.cos((wind_ang * 3.142) / 180);
wind_factor_x = _level0.wind.strength * Math.sin((wind_ang * 3.142) / 180);
trace("wind_x = " + wind_factor_x);
trace("wind_y = " + wind_factor_y);
bdirn = 1;
theta = (Math.atan(ratio) * 180) / 3.142;
theta = (theta / 4) + (wind_factor_x / 2);
u = u * Math.cos((theta * 3.142) / 180);
Frame 516
t = Number(t) + 0.05;
temp = s + bounce;
temp = int(temp * 10) / 10;
s = (Math.cos((angle * 3.142) / 180) * Number(u * t)) + Number(((a * t) * t) / 2);
s = s + ((wind_factor_y / 2) * t);
v = (Math.cos((angle * 3.142) / 180) * Number(u)) + Number(a * t);
z = (Math.sin((angle * 3.142) / 180) * Number(u * t)) + Number(((-9.8 * t) * t) / 2);
if (water == false) {
if (z < 0) {
z = 0;
bounce = bounce + s;
t = 0;
s = 0;
u = v;
angle = angle / 1.5;
a = a - 1;
if (river.hittest(ball._x, ball._y, true)) {
trace("SPLOSSSHHHHHHH");
ball._visible = false;
shadow._visible = false;
splash._visible = true;
splash._x = ball._x;
splash._y = ball._y;
water = true;
tellTarget ("splash") {
gotoAndPlay (1);
};
} else if (bunker.hittest(ball._x, ball._y, true)) {
ball._visible = true;
shadow._visible = true;
gotoAndPlay (687);
}
}
}
sx = Math.sin((theta * 3.142) / 180) * (s + bounce);
ball._x = xballcentre + ((bdirn * sx) * 7);
shadow._x = ball._x;
shadow._y = 400 / Math.pow(1.5, (s + bounce) / 30);
bally = shadow._y - ((z * shadow._y) / 12);
if (-100 < bally) {
ball._y = bally;
} else {
ball._y = -100;
}
ball._xscale = ((shadow._y / 400) * 100) - 5;
ball._yscale = ((shadow._y / 400) * 100) - 5;
shadow._xscale = ((shadow._y / 400) * 100) - 5;
shadow._yscale = ((shadow._y / 400) * 100) - 5;
Frame 517
dist_hole = Math.sqrt(((ball._x - hole._x) * (ball._x - hole._x)) + ((ball._y - hole._y) * (ball._y - hole._y)));
hole_in_one = false;
if ((dist_hole < 2) and (v < 10)) {
trace("in the hole!");
v = -1;
ball._x = -999;
shadow._x = -999;
hole_in_one = true;
}
if (sign.hittest(ball._x, ball._y, true) and sign.hittest(shadow._x, shadow._y, true)) {
trace("HIT THE BOARD!!!!");
hit_sign = true;
boardhit.gotoandplay(2);
ball._x = -999;
shadow._x = -999;
v = -1;
}
if ((Number(v) >= 0) and (water == false)) {
gotoAndPlay (516);
}
Frame 518
trace("HEEEEEEEEEEEEEEEEEEEEE!");
trace("x=" + ball._x);
trace("y=" + ball._y);
trace("x=" + _level0.hole._x);
trace("y=" + hole._y);
otg_multi = 0;
if (hole.green.hittest(ball._x, ball._y, true)) {
trace("landed on green");
if (hole.green.three.hittest(ball._x, ball._y, true)) {
trace("landed on three");
otg = _level0.timer.time * 3;
score = score + otg;
otg_multi = 3;
} else if (hole.green.two.hittest(ball._x, ball._y, true)) {
trace("landed on two");
otg = _level0.timer.time * 2;
otg_multi = 2;
score = score + otg;
} else if (hole.green.one.hittest(ball._x, ball._y, true)) {
trace("landed on one");
otg = _level0.timer.time * 1;
otg_multi = 1;
score = score + otg;
}
target_left--;
on_green = true;
clap.gotoandplay(2);
} else {
on_green = false;
}
if (hole_in_one) {
target_left--;
otg = _level0.timer.time * 5;
otg_multi = 5;
score = score + otg;
down.gotoandplay(2);
clap.gotoandplay(2);
}
trace(sx);
trace(temp);
yards = Math.sqrt((Math.abs(130 - temp) * Math.abs(130 - temp)) + ((sx * sx) * 4));
if (water == false) {
if (on_green) {
message = "You finished on the green";
} else {
message = "You finished off the green";
}
if (yards < 70) {
duplicateMovieClip ("ball", "x" + attempt, attempt + 10);
}
} else {
message = "You're in the water !";
}
avge = int((10 * total) / attempt) / 10;
Frame 522
if (on_green or hole_in_one) {
gotoAndPlay (590);
} else if (hit_sign) {
gotoAndPlay (524);
} else {
gotoAndPlay (559);
}
Frame 524
target_left--;
otg = _level0.timer.time * 5;
otg_multi = 5;
score = score + otg;
t = 0;
Frame 557
down.gotoandplay(2);
gotoAndPlay (590);
Frame 588
if (gameover) {
gotoAndPlay (666);
} else {
gotoAndPlay (501);
}
Frame 590
otg_i = int(otg / otg_multi);
otg_score = ((((("You scored " + otg_i) + "x") + otg_multi) + "=") + otg) + " points";
Frame 665
trace("here!!");
if (target_left < 1) {
gameover = true;
}
if (gameover) {
gotoAndPlay (666);
} else {
gotoAndPlay (501);
}
Frame 666
trace("gameover2");
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
i = 0;
while (10 >= i) {
eval (i)._visible = false;
i++;
}
man._visible = false;
trace("left - " + target_left);
if (target_left < 1) {
gameover = false;
}
if (gameover) {
gotoAndPlay (728);
} else {
trace("LEVEL DONE!!!");
bonus_time = _level0.timer.time;
gotoAndPlay (7);
}
Frame 667
stop();
Frame 687
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
i = 0;
while (10 >= i) {
eval (i)._visible = false;
i++;
}
man._visible = false;
Frame 688
explode.gotoandplay(2);
Frame 727
gotoAndPlay (1206);
Frame 728
trace("here too!!");
gotoAndPlay (262);
Frame 738
gotoAndPlay (498);
Frame 743
logos_seen++;
stop();
Frame 744
logos_seen++;
attempt = 0;
total = 0;
goes = 10;
avge = "-";
startline = 350;
space = 65;
i = 0;
while (10 >= i) {
duplicateMovieClip ("line", i, i);
eval (i)._y = startline;
eval (i)._yscale = (startline / 350) * 100;
eval (i)._xscale = (startline / 350) * 100;
startline = startline - space;
space = space / 1.2;
i++;
}
i = 0;
while (10 >= i) {
removeMovieClip("x" + i);
i++;
}
removeMovieClip("man");
duplicateMovieClip ("tempman", "man", 100000);
Instance of Symbol 132 MovieClip "tempman" in Frame 744
/* no clip actions */
Instance of Symbol 165 MovieClip "wind" in Frame 744
onClipEvent (load) {
function init() {
strength = random(5);
dirn = random(360);
count = 0;
}
dst = 3;
strength = random(5);
dirn = random(360);
max = 5;
min = 1;
wait = 20;
count = 0;
}
onClipEvent (enterFrame) {
if (_level0.level >= 7) {
max = _level0.level;
} else {
max = 5;
}
this.pointer._rotation = dirn;
if (_level0.wind_blowing) {
dirn = (dirn + random(10)) - random(10);
count++;
if (wait < count) {
strength = (strength + random(2)) - random(2);
if (max < strength) {
strength = max;
}
if (strength < min) {
strength = min;
}
dst = strength * 3;
count = 0;
}
}
}
Instance of Symbol 167 MovieClip "timer" in Frame 744
onClipEvent (load) {
function set_timer() {
if (!_level0.lock_timer) {
rtime = _level0.time_limit;
running = true;
_level0.lock_timer = true;
} else {
_level0.score = 0;
rtime = 0;
running = true;
}
}
rtime = _level0.time_limit;
running = false;
}
onClipEvent (enterFrame) {
if (running) {
rtime = rtime - 0.0277777777777778;
if (rtime < 0) {
rtime = 0;
_level0.gameover = true;
running = false;
}
}
time = int(rtime);
}
Frame 746
attempt = 0;
man._visible = true;
gameover = false;
timer.set_timer();
i = 0;
while (10 >= i) {
eval (i)._visible = true;
i++;
}
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
Frame 747
shot_wait = true;
t = 0;
man._x = 280;
man._y = 200;
attempt++;
wind_blowing = true;
_level0.wind.init();
xballcentre = 275;
hit = 0;
_level0.power.gotoandstop(1);
_level0.man.gotoandstop(1);
_level0.snap.gotoandstop(1);
powerscale = 8;
pstart = 20;
pcap = 180;
angle = (32 + random(2)) - random(2);
a = -2;
yballcentre = 380;
ball._x = xballcentre;
ball._y = yballcentre;
cue._y = yballcentre + 200;
shadow._x = xballcentre;
shadow._y = yballcentre;
bounce = 0;
setProperty("/ball", _xscale , 100);
setProperty("/ball", _yscale , 100);
ball._visible = true;
shadow._visible = true;
water = false;
splash._visible = false;
message = "";
Frame 748
Instance of Symbol 190 MovieClip in Frame 748
onClipEvent (mouseUp) {
if (state == "power_up") {
state = "snap";
}
if (state == "address") {
state = "power_up";
_level0.power.gotoandplay(2);
_level0.wind_blowing = false;
}
}
onClipEvent (mouseDown) {
if (state == "address") {
}
if (state == "power_up") {
_level0.u = _level0.power._currentframe * 1;
_level0.power.stop();
_level0.snap.gotoandplay(2);
}
if (state == "snap") {
_level0.snap.stop();
diff = 14 - _level0.snap._currentframe;
_level0.ratio = (-diff) / 14;
_level0.start_angle = _level0.arrow._rotation;
if (!_level0.gameover) {
_level0.man.gotoandplay(2);
_level0.shot_wait = false;
state = "shoot";
} else {
_level0.gotoandplay("check_end");
}
}
}
onClipEvent (load) {
state = "address";
dx = 0;
}
Frame 749
if (gameover) {
gotoAndPlay (888);
} else if (shot_wait) {
gotoAndPlay (748);
} else {
gotoAndPlay (757);
}
Frame 761
t = 0;
hit_sign = false;
wind_ang = _level0.wind.pointer._rotation;
wind_factor_y = _level0.wind.strength * Math.cos((wind_ang * 3.142) / 180);
wind_factor_x = _level0.wind.strength * Math.sin((wind_ang * 3.142) / 180);
trace("wind_x = " + wind_factor_x);
trace("wind_y = " + wind_factor_y);
bdirn = 1;
theta = (Math.atan(ratio) * 180) / 3.142;
theta = (theta / 4) + (wind_factor_x / 2);
u = u * Math.cos((theta * 3.142) / 180);
Frame 762
t = Number(t) + 0.05;
temp = s + bounce;
temp = int(temp * 10) / 10;
s = (Math.cos((angle * 3.142) / 180) * Number(u * t)) + Number(((a * t) * t) / 2);
s = s + ((wind_factor_y / 2) * t);
v = (Math.cos((angle * 3.142) / 180) * Number(u)) + Number(a * t);
z = (Math.sin((angle * 3.142) / 180) * Number(u * t)) + Number(((-9.8 * t) * t) / 2);
if (water == false) {
if (z < 0) {
z = 0;
bounce = bounce + s;
t = 0;
s = 0;
u = v;
angle = angle / 1.5;
a = a - 1;
if (river.hittest(ball._x, ball._y, true)) {
trace("SPLOSSSHHHHHHH");
ball._visible = false;
shadow._visible = false;
splash._visible = true;
splash._x = ball._x;
splash._y = ball._y;
water = true;
tellTarget ("splash") {
gotoAndPlay (1);
};
} else if (bunker.hittest(ball._x, ball._y, true)) {
ball._visible = true;
shadow._visible = true;
gotoAndPlay (910);
}
}
}
sx = Math.sin((theta * 3.142) / 180) * (s + bounce);
ball._x = xballcentre + ((bdirn * sx) * 7);
shadow._x = ball._x;
shadow._y = 400 / Math.pow(1.5, (s + bounce) / 30);
bally = shadow._y - ((z * shadow._y) / 12);
if (-100 < bally) {
ball._y = bally;
} else {
ball._y = -100;
}
ball._xscale = ((shadow._y / 400) * 100) - 5;
ball._yscale = ((shadow._y / 400) * 100) - 5;
shadow._xscale = ((shadow._y / 400) * 100) - 5;
shadow._yscale = ((shadow._y / 400) * 100) - 5;
Frame 763
dist_hole = Math.sqrt(((ball._x - hole._x) * (ball._x - hole._x)) + ((ball._y - hole._y) * (ball._y - hole._y)));
hole_in_one = false;
if ((dist_hole < 2) and (v < 10)) {
trace("in the hole!");
v = -1;
ball._x = -999;
shadow._x = -999;
hole_in_one = true;
}
if (sign.hittest(ball._x, ball._y, true) and sign.hittest(shadow._x, shadow._y, true)) {
trace("HIT THE BOARD!!!!");
hit_sign = true;
boardhit.gotoandplay(2);
ball._x = -999;
shadow._x = -999;
v = -1;
}
if ((Number(v) >= 0) and (water == false)) {
gotoAndPlay (762);
}
Frame 764
trace("HEEEEEEEEEEEEEEEEEEEEE!");
trace("x=" + ball._x);
trace("y=" + ball._y);
trace("x=" + _level0.hole._x);
trace("y=" + hole._y);
otg_multi = 0;
if (hole.green.hittest(ball._x, ball._y, true)) {
trace("landed on green");
if (hole.green.three.hittest(ball._x, ball._y, true)) {
trace("landed on three");
otg = _level0.timer.time * 3;
score = score + otg;
otg_multi = 3;
} else if (hole.green.two.hittest(ball._x, ball._y, true)) {
trace("landed on two");
otg = _level0.timer.time * 2;
otg_multi = 2;
score = score + otg;
} else if (hole.green.one.hittest(ball._x, ball._y, true)) {
trace("landed on one");
otg = _level0.timer.time * 1;
otg_multi = 1;
score = score + otg;
}
target_left--;
on_green = true;
clap.gotoandplay(2);
} else {
on_green = false;
}
if (hole_in_one) {
target_left--;
otg = _level0.timer.time * 5;
otg_multi = 5;
score = score + otg;
down.gotoandplay(2);
clap.gotoandplay(2);
}
trace(sx);
trace(temp);
yards = Math.sqrt((Math.abs(130 - temp) * Math.abs(130 - temp)) + ((sx * sx) * 4));
if (water == false) {
if (on_green) {
message = "You finished on the green";
} else {
message = "You finished off the green";
}
if (yards < 70) {
duplicateMovieClip ("ball", "x" + attempt, attempt + 10);
}
} else {
message = "You're in the water !";
}
avge = int((10 * total) / attempt) / 10;
Frame 768
if (on_green or hole_in_one) {
gotoAndPlay (836);
} else if (hit_sign) {
gotoAndPlay (770);
} else {
gotoAndPlay (809);
}
Frame 770
target_left--;
otg = _level0.timer.time * 5;
otg_multi = 5;
score = score + otg;
t = 0;
Frame 806
down.gotoandplay(2);
gotoAndPlay (836);
Frame 834
if (gameover) {
gotoAndPlay (889);
} else {
gotoAndPlay (747);
}
Frame 836
otg_i = int(otg / otg_multi);
otg_score = ((((("You scored " + otg_i) + "x") + otg_multi) + "=") + otg) + " points";
Frame 888
trace((("here hole 3!!" + gameover) + " ") + target_left);
if (target_left < 1) {
gameover = true;
}
if (gameover) {
trace("gameover=true");
gotoAndPlay (889);
} else {
gotoAndPlay (747);
}
Frame 889
trace("gameover3");
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
i = 0;
while (10 >= i) {
eval (i)._visible = false;
i++;
}
man._visible = false;
trace("left - " + target_left);
if (target_left < 1) {
gameover = false;
}
if (gameover) {
trace("ALL OVER !!!");
gotoAndPlay (910);
} else {
trace("LEVEL DONE!!!");
bonus_time = _level0.timer.time;
gotoAndPlay (7);
}
Frame 890
stop();
Frame 910
i = 0;
while (20 >= i) {
removeMovieClip("x" + i);
i++;
}
i = 0;
while (10 >= i) {
eval (i)._visible = false;
i++;
}
man._visible = false;
Frame 911
explode.gotoandplay(2);
Frame 950
gotoAndPlay (1206);
Frame 951
trace("all over!");
gotoAndPlay (910);
Frame 961
stop();
Frame 1206
logos_seen++;
stop();
Instance of Symbol 265 MovieClip "check2" in Frame 1206
onClipEvent (load) {
value = _level0.i_want_a_newsletter;
if (!value) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
}
onClipEvent (mouseDown) {
trace("mouse down");
if (hitTest(_root._xmouse, _root._ymouse, false)) {
trace("hit !");
value = !value;
if (!value) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
_level0.i_want_a_newsletter = value;
trace("iwan" + _level0.i_want_a_newsletter);
}
}
Frame 1210
command = "update";
this.loadVariables("highscoresjp.php?" + int(Math.random() * 100000), "POST");
Frame 1235
gotoAndStop (1236);
Frame 1236
logos_seen++;
time_played = int((getTimer() - start_time) / 1000);
minutes = int(time_played / 60);
seconds = time_played - (minutes * 60);
see_txt = ("You have seen the logo above " + logos_seen) + " times.";
if (0 < minutes) {
if (minutes == 1) {
play_txt = ("You have been playing for " + minutes) + " minute ";
} else {
play_txt = ("You have been playing for " + minutes) + " minutes ";
}
if (seconds == 1) {
play_txt = play_txt + (("and " + seconds) + " second.");
} else {
play_txt = play_txt + (("and " + seconds) + " seconds.");
}
} else {
play_txt = ("You have been playing for " + seconds) + " seconds.";
}
txt1 = "";
txt2 = "";
txt3 = "";
counter = 1;
trace("nick..." + nick);
trace("email..." + email);
if (0 < nick.length) {
txt1 = "You have given us your name.";
counter++;
}
if (0 < email.length) {
if (counter == 2) {
txt2 = "You have given us your email address.";
} else {
txt1 = "You have given us your email address.";
}
counter++;
}
if (i_want_a_newsletter) {
if (counter == 1) {
txt1 = "You have chosen to receive our newsletter.";
}
if (counter == 2) {
txt2 = "You have chosen to receive our newsletter.";
}
if (counter == 3) {
txt3 = "You have chosen to receive our newsletter.";
}
}
Frame 1237
stop();
Symbol 6 MovieClip Frame 1
doneLoading = 0;
stop();
Instance of Symbol 2 MovieClip "bkgd" in Symbol 6 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.doneLoading == 0) {
total = _parent._parent.getBytesTotal();
isloaded = _parent._parent.getBytesLoaded();
p = 100 * (isLoaded / total);
_parent.bytes = ((int(isloaded / 1000) add " KB of ") add int(total / 1000)) add " KB";
_parent.percent = int(p) add "% LOADED";
_parent.bar._xscale = p;
if (Number(95) < Number(p)) {
_parent._parent.gotoAndPlay(Number(2));
_parent.gotoAndStop("off");
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(Number(1));
}
}
}
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 6
stop();
Symbol 25 Button
on (release) {
tellTarget ("rules_text") {
nextFrame();
};
}
Symbol 28 Button
on (release) {
tellTarget ("rules_text") {
prevFrame();
};
}
Symbol 37 Button
on (release) {
gotoAndPlay (6);
}
Symbol 55 Button
on (release) {
play();
}
Symbol 74 Button
on (release) {
gotoAndPlay (277);
}
Symbol 100 MovieClip Frame 25
stop();
Symbol 107 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 20
stop();
Symbol 134 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 20
stop();
Symbol 201 Button
on (release) {
gotoAndPlay (498);
}
Symbol 225 Button
on (release) {
gotoAndPlay (744);
}
Symbol 249 Button
on (release) {
gotoAndStop (5);
}
Symbol 262 Button
on (release) {
gotoAndPlay (1210);
}
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 2
stop();
Symbol 273 Button
on (release) {
gotoAndStop (1236);
}
Symbol 282 Button
on (rollOver) {
tellTarget ("credits") {
gotoAndStop (2);
};
}
on (rollOut) {
tellTarget ("credits") {
gotoAndStop (1);
};
}
Symbol 284 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 2
stop();