Instance of Symbol 52 MovieClip in Frame 1
onClipEvent (load) {
_parent.ng_API = new NewgroundsAPI(12);
_parent.stop();
}
Frame 2
var FANBOXAPI;
if (FANBOXAPI == undefined) {
FANBOXAPI = new Object();
FANBOXAPI.EmailAPI = new Object();
FANBOXAPI.GamingAPI = new Object();
FANBOXAPI.OptinAPI = new Object();
}
FANBOXAPI.DeveloperKey = "09F054BF-2583-4A59-A7D8-CFDF9B4A3C03";
game_id = "Mini-Putt_2";
rc4key = "paf98u85w3f479q7f9q4fuq4w";
myScore = new saveScore(game_id, rc4key, "");
_global.guestUser = function () {
host = _url.split("/")[2].toLowerCase();
return(((host == "") or (host == undefined)) or (host.indexOf("psychogoldfish.com") > -1));
};
trace(guestUser());
_global.submitScore = function (score, player) {
if (guestUser()) {
myScore.submit(player, score);
}
FANBOXAPI.GameAPI.GameOver(score);
trace(("you sent " + score) + " to FANBOXAPI");
};
Mouse.show();
_root.hole = 0;
_root.score = 0;
i = 1;
while (i <= 18) {
Set("score" + i, "");
i++;
}
stop();
Frame 3
if (music == "on") {
tellTarget ("game.sound") {
gotoAndPlay ("bgm1");
};
}
Frame 4
stop();
Frame 5
prevFrame();
Symbol 4 MovieClip Frame 1
function domainIs(domain) {
site = _url.split("/")[2].toLowerCase();
if ((site == "") and (domain.toLowerCase() == "localhost")) {
return(true);
}
if (site.indexOf(domain.toLowerCase()) > -1) {
return(true);
}
return(false);
}
_visible = false;
_global.gameParams = new Object();
_global.gameParams.course = 1;
_global.gameParams.mute = false;
if ((domainIs("localhost") or domainIs("psychogoldfish.com")) or domainIs("flashgamelicense.com")) {
_global.gameParams.submitHole = function (hole, strokes) {
trace(((("HOLE " + hole) + " :: ") + strokes) + " strokes!!");
};
_global.gameParams.submitFinal = function (score) {
trace("final score: " + score);
};
} else if (domainIs("txm.com") or domainIs("txmafia.com")) {
_global.gameParams.liveSubmit = true;
_global.gameParams.realtimeUpdates = true;
_global.gameParams.submitHole = function (hole, strokes) {
trace(((("HOLE " + hole) + " :: ") + strokes) + " strokes");
};
_global.gameParams.submitFinal = function (score) {
trace("final score: " + score);
};
} else {
locked = true;
}
if (locked) {
_visible = true;
}
Symbol 8 Button
on (release) {
_global.NewgroundsAPI_DataObject.API.LoadNewgrounds();
}
Symbol 17 Button
on (release) {
_global.NewgroundsAPI_DataObject.API.LoadNewgrounds();
}
Symbol 34 MovieClip Frame 40
stop();
Symbol 49 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 50 Button
on (press) {
gotoAndStop ("end");
_root.play();
}
Instance of Symbol 19 MovieClip in Symbol 51 MovieClip Frame 1
onClipEvent (load) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 51 MovieClip Frame 101
play();
Symbol 51 MovieClip Frame 165
stop();
Symbol 52 MovieClip Frame 1
function startAd(ngad_url) {
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("\r::IGNORE THE FOLLOWING ERROR IF THE AD LOADS::");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
var _local1 = 731;
var _local2 = 3;
ngads_redirect.load(ngad_url);
}
_root.stop();
if (_global.NewgroundsAPI_DataObject.ad_url) {
startAd(_global.NewgroundsAPI_DataObject.ad_url);
}
_global.NewgroundsAPI_DataObject.API.onAdsApproved = function () {
startAd(_global.NewgroundsAPI_DataObject.ad_url);
};
stop();
Symbol 374 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
var script_url, movie_id, host, stat_ids, data_object;
function NewgroundsAPI (id) {
script_url = "http://www.ngads.com/gateway.php";
movie_id = id;
host = _url.split("/")[2];
if (host.length < 1) {
host = "localhost";
}
stat_ids = new Object();
stat_ids.movie_views = 1;
stat_ids.author_links = 2;
stat_ids.sponsor_links = 3;
stat_ids.high_score = 4;
if (!_global.NewgroundsAPI_DataObject) {
_global.NewgroundsAPI_DataObject = new Object();
_global.NewgroundsAPI_DataObject.API = this;
var _local3 = new Object();
_local3.id = movie_id;
_local3.host = host;
_local3.stat = stat_ids.movie_views;
_local3.value = 1;
sendStats(_local3);
}
data_object = _global.NewgroundsAPI_DataObject;
}
function sendStats(params) {
var _local7 = "?version=1.0.2";
for (var _local4 in params) {
_local7 = _local7 + ((("&" + _local4) + "=") + escape(String(params[_local4])));
}
var _local9 = new XML();
_local9.ignoreWhite = true;
_local9.onLoad = function (success) {
trace((newline + this) + newline);
var _local7 = new Object();
var _local4 = 0;
while (_local4 < this.firstChild.childNodes.length) {
var _local5 = this.firstChild.childNodes[_local4];
var _local6 = _local5.nodeName;
var _local3 = _local5.attributes.value;
if (_local3 == Number(_local3)) {
_local3 = Number(_local3);
}
_local7[_local6] = _local3;
_local4++;
}
_global.NewgroundsAPI_DataObject.API.eventHandler(_local7);
};
trace(script_url + _local7);
_local9.load(script_url + _local7);
}
function LoadNewgrounds() {
getURL ((script_url + "?referrer=") + movie_id, "_blank");
}
function eventHandler(params) {
for (var _local3 in params) {
data_object[_local3] = unescape(params[_local3]);
switch (_local3) {
case "ad_url" :
if (params[_local3]) {
onAdsApproved();
}
break;
case "deny_host" :
if (params[_local3]) {
onDenyHost();
}
break;
case "settings_loaded" :
onSettingsLoaded(params[_local3]);
}
}
}
function onSettingsLoaded(success) {
}
function onAdsApproved() {
}
function onDenyHost() {
trace("\r======================================================================================");
trace("{{NEWGROUNDS API HELP}}");
trace("======================================================================================");
trace("In order to test this movie from your local computer,");
trace("look for the following ActionScript on your timeline:");
trace("======================================================================================");
trace("\r\tvar ng_API = new NewgroundsAPI(movie_id);\r");
trace("======================================================================================");
trace("and AFTER, add this code:");
trace("======================================================================================");
trace("\r\tng_API.onDenyHost = function() {");
trace("\t\t// delete this function when you publish");
trace("\t}\r");
trace("======================================================================================");
trace("OR, log in to your Newgrounds Account and add 'localhost' to");
trace("your list of approved domains");
trace("======================================================================================\r");
if (data_object.real_host) {
var _local7 = data_object.real_host;
} else {
var _local7 = "http://www.newgrounds.com";
}
_root.createEmptyMovieClip("overlay", 1000);
_root.overlay.lineStyle(20, 0, 100);
_root.overlay.beginFill(6684672);
_root.overlay.moveTo(0, 0);
_root.overlay.lineTo(Stage.width, 0);
_root.overlay.lineTo(Stage.width, Stage.height);
_root.overlay.lineTo(0, Stage.height);
_root.overlay.lineTo(0, 0);
_root.overlay.endFill();
var _local3 = "This movie has not been approved for use on this host.\r\rPlease Visit ";
var _local9 = _local3.length;
_local3 = _local3 + _local7;
var _local8 = _local3.length;
_local3 = _local3 + " for an approved copy";
var _local6 = new TextFormat();
_local6.font = "Arial Black";
_local6.size = 48;
_local6.color = 16711680 /* 0xFF0000 */;
_root.overlay.createTextField("error", 100, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.overlay.error.text = "ERROR!";
_root.overlay.error.setTextFormat(_local6);
var _local4 = new TextFormat();
_local4.font = "Arial";
_local4.bold = true;
_local4.size = 12;
_local4.color = 16777215 /* 0xFFFFFF */;
var _local5 = new TextFormat();
_local5.color = 16776960 /* 0xFFFF00 */;
_local5.underline = true;
_local5.url = _local7;
_root.overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.overlay.message.text = _local3;
_root.overlay.message.multiline = true;
_root.overlay.message.wordWrap = true;
_root.overlay.message.html = true;
_root.overlay.message.setTextFormat(_local4);
_root.overlay.message.setTextFormat(_local9, _local8, _local5);
}
}
Symbol 375 MovieClip [__Packages.saveScore] Frame 0
class saveScore
{
var gameId, eKey, sponsor;
function saveScore (g, k, s) {
gameId = g;
eKey = k;
sponsor = s;
}
function submit(u, n, o, p) {
var _local2 = new Object();
_local2.seed = 99999999 * Math.random();
_local2.user = u;
if (p) {
_local2.password = com.meychi.ascrypt.MD5.calculate(p);
}
_local2.score = n;
if (o) {
_local2.other = JSON.stringify(o);
}
var _local3 = com.meychi.ascrypt.RC4.encrypt(JSON.stringify(_local2), eKey);
sendit(_local3);
}
function sendit(secure) {
_root.createEmptyMovieClip("scoreSubmissionWrapper", _root.getNextHighestDepth());
_root.scoreSubmissionWrapper.dataString = secure;
_root.scoreSubmissionWrapper.sponsor = sponsor;
_root.scoreSubmissionWrapper.gameId = gameId;
_root.scoreSubmissionWrapper.getURL("http://www.psychogoldfish.com/submitScore.php", "_blank", "POST");
_root.scoreSubmissionWrapper.removeMovieClip();
}
function show() {
getURL ((("http://www.psychogoldfish.com/scoreBoards.php?gameId=" + gameId) + "&sponsor=") + sponsor, "_blank");
}
}
Symbol 376 MovieClip [__Packages.com.meychi.ascrypt.MD5] Frame 0
class com.meychi.ascrypt.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 377 MovieClip [__Packages.JSON] Frame 0
class JSON
{
function JSON () {
}
static function stringify(arg, noquotes) {
var _local3;
var _local2;
var _local6;
var _local1 = "";
var _local4;
var _local8 = typeof(arg);
switch (_local8) {
case "object" :
if (arg) {
if (arg instanceof Array) {
_local2 = 0;
while (_local2 < arg.length) {
_local4 = stringify(arg[_local2]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local4;
_local2++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local2 in arg) {
_local4 = arg[_local2];
if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) {
_local4 = stringify(_local4);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((stringify(_local2) + ":") + _local4);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local6 = arg.length;
if (noquotes) {
var _local7 = "";
} else {
var _local7 = "\"";
}
_local1 = _local7;
_local2 = 0;
while (_local2 < _local6) {
_local3 = arg.charAt(_local2);
if (_local3 >= " ") {
if ((_local3 == "\\") || (_local3 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local3;
} else {
switch (_local3) {
case "\b" :
_local1 = _local1 + "\\b";
break;
case "\f" :
_local1 = _local1 + "\\f";
break;
case newline :
_local1 = _local1 + "\\n";
break;
case "\r" :
_local1 = _local1 + "\\r";
break;
case "\t" :
_local1 = _local1 + "\\t";
break;
default :
_local3 = _local3.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16));
}
}
_local2 = _local2 + 1;
}
return(_local1 + _local7);
case "boolean" :
return(String(arg));
}
return("null");
}
static function parse(text) {
var at = 0;
var ch = " ";
var _value;
var _error = function (m) {
throw {name:"JSONError", message:m, at:at - 1, text:text};
};
var _next = function () {
ch = text.charAt(at);
at = at + 1;
return(ch);
};
var _white = function () {
while (ch) {
if (ch <= " ") {
_next();
} else if (ch == "/") {
switch (_next()) {
case "/" :
while ((_next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
break;
default :
_error("Syntax error");
}
} else {
return;
}
}
};
var _string = function () {
var _local4;
var _local1 = "";
var _local3;
var _local2;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
switch (_next()) {
case "b" :
_local1 = _local1 + "\b";
break;
case "f" :
_local1 = _local1 + "\f";
break;
case "n" :
_local1 = _local1 + newline;
break;
case "r" :
_local1 = _local1 + "\r";
break;
case "t" :
_local1 = _local1 + "\t";
break;
case "u" :
_local2 = 0;
_local4 = 0;
while (_local4 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local2 = (_local2 * 16) + _local3;
_local4 = _local4 + 1;
}
if (_local5) {
_local5 = false;
break;
}
_local1 = _local1 + String.fromCharCode(_local2);
break;
default :
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
} else {
return(_local2);
}
};
var _word = function () {
switch (ch) {
case "t" :
if (((_next() == "r") && (_next() == "u")) && (_next() == "e")) {
_next();
return(true);
}
break;
case "f" :
if ((((_next() == "a") && (_next() == "l")) && (_next() == "s")) && (_next() == "e")) {
_next();
return(false);
}
break;
case "n" :
if (!(((_next() == "u") && (_next() == "l")) && (_next() == "l"))) {
break;
}
_next();
return(null);
}
_error("Syntax error");
};
_value = function () {
_white();
switch (ch) {
case "{" :
return(_object());
case "[" :
return(_array());
case "\"" :
return(_string());
case "-" :
return(_number());
}
return((((ch >= "0") && (ch <= "9")) ? (_number()) : (_word())));
};
return(_value());
}
}
Symbol 378 MovieClip [__Packages.com.meychi.ascrypt.RC4] Frame 0
class com.meychi.ascrypt.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 57 Button
on (release) {
getURL ("http://www.psychogoldfish.com/?ref=fanbox", "_blank");
}
Symbol 72 Button
on (release) {
play();
}
Symbol 84 Button
on (press, keyPress "1") {
_global.mute = false;
stopAllSounds();
gotoAndPlay ("bgm1");
}
on (keyPress "$") {
tellTarget ("..") {
play();
};
}
Symbol 86 Button
on (press, keyPress "x") {
_global.mute = true;
stopAllSounds();
}
Symbol 93 MovieClip Frame 1
if (_global.gameParams.mute) {
_x = (_x - 900);
soundmode = 1;
}
if (_global.mute) {
soundmode = 1;
}
if (!soundmode) {
gotoAndPlay ("bgm1");
soundmode = 1;
} else {
trace("mute");
}
stop();
Symbol 93 MovieClip Frame 2
gotoAndStop (1);
Symbol 93 MovieClip Frame 3
gotoAndStop (1);
Symbol 93 MovieClip Frame 4
gotoAndStop (1);
Symbol 93 MovieClip Frame 5
gotoAndStop (1);
Symbol 93 MovieClip Frame 6
gotoAndStop (1);
Symbol 93 MovieClip Frame 7
gotoAndStop (1);
Symbol 177 MovieClip Frame 1
Mouse.show();
Symbol 177 MovieClip Frame 2
Set("_root.score" + _root.hole, int(_root.strokes));
trace("strokes: " + _root.strokes);
par = 0;
message = "";
score = 0;
i = 1;
while (i <= 18) {
Set("_root.par" + i, int(eval ("par" + i)));
Set("score" + i, eval ("_root.score" + i));
score = score + eval ("_root.score" + i);
par = par + eval ("_root.par" + i);
if (i == _root.hole) {
if (eval ("_root.score" + i) == 1) {
message = "Hole in One!!!";
} else if (eval ("_root.score" + i) == (eval ("_root.par" + i) - 3)) {
message = "Albatross (-3)";
} else if (eval ("_root.score" + i) == (eval ("_root.par" + i) - 2)) {
message = "Eagle (-2)";
} else if (eval ("_root.score" + i) == (eval ("_root.par" + i) - 1)) {
message = "Birdie (-1)";
} else if (eval ("_root.score" + i) == eval ("_root.par" + i)) {
message = "You got par";
} else if (eval ("_root.score" + i) == (eval ("_root.par" + i) + 1)) {
message = "Bogey (+1)";
} else if (eval ("_root.score" + i) == (eval ("_root.par" + i) + 2)) {
message = "Double Bogey (+1)";
}
}
i++;
}
if (_root.hole) {
if (_global.gameParams.realtimeUpdates) {
trace("WUT");
_global.gameParams.submitHole(_root.hole, _root.strokes);
}
if (_root.hole == 18) {
if (_global.gameParams.liveSubmit) {
_global.gameParams.submitFinal(score);
} else if (_global.guestUser()) {
_parent.result.gotoAndStop(3);
} else {
_parent.result.gotoAndStop(2);
}
}
}
_root.hole = _root.hole + 1;
_root.score = score;
stop();
Symbol 182 Button
on (release) {
tellTarget ("..") {
play();
};
}
Symbol 184 MovieClip Frame 1
tellTarget ("..") {
stop();
};
Symbol 190 MovieClip Frame 1
Mouse.hide();
Symbol 193 MovieClip Frame 2
stop();
Symbol 194 MovieClip Frame 1
countme = "y";
stop();
Symbol 196 MovieClip Frame 1
countme = "y";
Symbol 199 MovieClip Frame 1
countme = "y";
Symbol 202 MovieClip Frame 1
countme = "y";
Symbol 208 Button
on (release) {
tellTarget ("..") {
nextFrame();
};
}
Symbol 209 MovieClip Frame 1
_parent.ball._x = _parent.button._x;
_parent.ball._y = _parent.button._y;
Symbol 209 MovieClip Frame 2
gotoAndPlay (1);
Symbol 210 Button
on (release, releaseOutside) {
if (_parent.speed <= maxhitspeed) {
tellTarget ("_parent._parent.sound") {
gotoAndStop ("hit");
};
_root.strokes = _root.strokes + 1;
tellTarget ("..") {
play();
};
}
}
Symbol 212 MovieClip Frame 1
tellTarget ("..") {
xdir = (ball._x - putter._x) * 0.33;
ydir = (ball._y - putter._y) * 0.33;
node1._x = ball._x + (xdir * 4.5);
node1._y = ball._y + (ydir * 4.5);
node2._x = ball._x + (xdir * 2.75);
node2._y = ball._y + (ydir * 2.75);
node3._x = ball._x + (xdir * 1.5);
node3._y = ball._y + (ydir * 1.5);
node4._x = ball._x + (xdir * 0.5);
node4._y = ball._y + (ydir * 0.5);
};
_parent.speed = (_parent.xdir * _parent.xdir) + (_parent.ydir * _parent.ydir);
maxhitspeed = 1000;
if (_parent.speed > maxhitspeed) {
tellTarget ("_parent.node1") {
gotoAndStop (2);
};
tellTarget ("_parent.node2") {
gotoAndStop (2);
};
tellTarget ("_parent.node3") {
gotoAndStop (2);
};
tellTarget ("_parent.node4") {
gotoAndStop (2);
};
} else {
tellTarget ("_parent.node1") {
gotoAndStop (1);
};
tellTarget ("_parent.node2") {
gotoAndStop (1);
};
tellTarget ("_parent.node3") {
gotoAndStop (1);
};
tellTarget ("_parent.node4") {
gotoAndStop (1);
};
}
_parent.putt._x = _parent.putter._x;
_parent.putt._y = _parent.putter._y;
Symbol 212 MovieClip Frame 2
gotoAndPlay (1);
Symbol 212 MovieClip Frame 3
tellTarget ("..") {
gotoAndPlay ("rolling");
};
Symbol 217 MovieClip Frame 1
_root.strokes = 0;
Symbol 217 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
} else {
trace("found t" + (ts + 1));
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 217 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 217 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 217 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 217 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 217 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 217 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 219 MovieClip Frame 1
countme = "y";
Symbol 221 MovieClip Frame 1
countme = "y";
stop();
Symbol 221 MovieClip Frame 21
_parent.ball._x = _x;
_parent.ball._y = _y;
tellTarget ("..") {
play();
};
gotoAndStop (1);
Symbol 224 MovieClip Frame 1
countme = "y";
Symbol 226 MovieClip Frame 1
_root.strokes = 0;
Symbol 226 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
tu = 0;
while (tudone != "y") {
if (eval (("tu" + (tu + 1)) + ".countme") != "y") {
tudone = "y";
tu = tu - 1;
}
tu++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 226 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 226 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
ty = 1;
while (ty <= tu) {
if (speed < 40) {
if (ball.hitTest(eval ("th" + ty))) {
ball._x = 9999;
ydir = (eval (("tu" + ty) + "._y") - eval (("th" + ty) + "._y")) / 50;
xdir = (eval (("tu" + ty) + "._x") - eval (("th" + ty) + "._x")) / 50;
tellTarget ("tu" + ty) {
play();
};
stop();
}
}
ty++;
}
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 226 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 226 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 226 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 226 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 229 MovieClip Frame 1
_root.strokes = 0;
Symbol 229 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 229 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 229 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 229 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 229 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 229 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 229 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 233 MovieClip Frame 1
_root.strokes = 0;
Symbol 233 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 233 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 233 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 233 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 233 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 233 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 233 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 238 MovieClip Frame 1
_root.strokes = 0;
Symbol 238 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 238 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 238 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 238 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 238 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 238 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 238 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 242 MovieClip Frame 1
_root.strokes = 0;
Symbol 242 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 242 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 242 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 242 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 242 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 242 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 242 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 248 MovieClip Frame 1
_root.strokes = 0;
Symbol 248 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 248 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 248 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 248 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 248 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 248 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 248 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 250 MovieClip Frame 1
tellTarget ("..") {
ymod = ydir * 0.4;
if (frame >= 46) {
ydir = ydir - 0.3;
} else {
ydir = ydir + 0.3;
}
frame = frame - ymod;
if ((int(frame) > 92) or (int(frame) < 3)) {
gotoAndStop (93);
} else {
gotoAndStop(int(frame));
}
};
Symbol 250 MovieClip Frame 2
gotoAndPlay (1);
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
if (side == "top") {
frame = 92;
} else {
frame = 3;
}
nextFrame();
Symbol 251 MovieClip Frame 3
hill = "d";
Symbol 251 MovieClip Frame 45
hill = "d";
Symbol 251 MovieClip Frame 46
hill = "u";
_parent.halfway = "y";
Symbol 251 MovieClip Frame 91
hill = "u";
Symbol 251 MovieClip Frame 93
if (ymod > 0) {
_parent._parent.ball._x = (_parent._parent.spiral._x + (_x - x_pos)) - 18;
_parent._parent.ball._y = _parent._parent.spiral._y + 40;
} else {
_parent._parent.ball._x = (_parent._parent.spiral._x - (_x - x_pos)) + 18;
_parent._parent.ball._y = _parent._parent.spiral._y - 40;
}
_parent._parent.ydir = ydir;
tellTarget ("_parent._parent") {
inspiral = "";
play();
};
gotoAndStop (1);
Symbol 258 MovieClip Frame 1
_root.strokes = 0;
Symbol 258 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 258 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 258 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
if (ball.hitTest(spiral)) {
if (((ball._x > spiral._x) and (ball._y < spiral._y)) and (ymod > 0)) {
spiral.ball.side = "top";
spiral.ball.x_pos = (ball._x - spiral._x) - 18;
inspiral = "y";
} else if (((ball._x < spiral._x) and (ball._y > spiral._y)) and (ymod < 0)) {
spiral.ball.side = "bot";
spiral.ball.x_pos = (ball._x - spiral._x) + 18;
inspiral = "y";
}
}
if (inspiral == "y") {
ball._x = spiral._x;
ball._y = spiral._y;
spiral.ball._x = spiral.ball.x_pos;
spiral.ball.ydir = ydir;
tellTarget ("spiral.ball") {
play();
};
tellTarget ("_parent.sound") {
gotoAndStop ("metal");
};
stop();
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 258 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 258 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 258 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 258 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 260 MovieClip Frame 1
countme = "y";
Symbol 269 MovieClip Frame 1
_root.strokes = 0;
Symbol 269 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 269 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 269 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 269 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 269 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 269 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 269 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 277 MovieClip Frame 1
_root.strokes = 0;
Symbol 277 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
tu = 0;
while (tudone != "y") {
if (eval (("tu" + (tu + 1)) + ".countme") != "y") {
tudone = "y";
tu = tu - 1;
}
tu++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 277 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 277 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
ty = 1;
while (ty <= tu) {
if (speed < 20) {
if (ball.hitTest(eval ("th" + ty))) {
ball._x = 9999;
ydir = (eval (("tu" + ty) + "._y") - eval (("th" + ty) + "._y")) / 30;
xdir = (eval (("tu" + ty) + "._x") - eval (("th" + ty) + "._x")) / 30;
tellTarget ("tu" + ty) {
play();
};
stop();
}
}
ty++;
}
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 277 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 277 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 277 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 277 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 284 MovieClip Frame 1
_root.strokes = 0;
Symbol 284 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 284 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 284 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 284 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 284 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 284 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 284 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 287 MovieClip Frame 1
countme = "y";
Symbol 290 MovieClip Frame 1
countme = "y";
Symbol 292 MovieClip Frame 1
_root.strokes = 0;
Symbol 292 MovieClip Frame 2
if (init != "y") {
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
ws = 0;
while (wdone != "y") {
if (eval (("w" + (ws + 1)) + ".countme") != "y") {
wdone = "y";
ws = ws - 1;
}
ws++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
init = "y";
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 292 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 292 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
w = 1;
while (w <= ws) {
if (ball.hitTest(eval ("w" + w))) {
tellTarget ("_parent.sound") {
gotoAndStop ("water");
};
gotoAndStop (2);
}
w++;
}
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 292 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 292 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 292 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 292 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 294 MovieClip Frame 1
countme = "y";
Symbol 299 MovieClip Frame 1
_root.strokes = 0;
Symbol 299 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 299 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 299 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
if (ball.hitTest(spiral)) {
if (((ball._x > spiral._x) and (ball._y < spiral._y)) and (ymod > 0)) {
spiral.ball.side = "top";
spiral.ball.x_pos = (ball._x - spiral._x) - 18;
inspiral = "y";
} else if (((ball._x < spiral._x) and (ball._y > spiral._y)) and (ymod < 0)) {
spiral.ball.side = "bot";
spiral.ball.x_pos = (ball._x - spiral._x) + 18;
inspiral = "y";
}
}
if (inspiral == "y") {
ball._x = spiral._x;
ball._y = spiral._y;
spiral.ball._x = spiral.ball.x_pos;
spiral.ball.ydir = ydir;
tellTarget ("spiral.ball") {
play();
};
tellTarget ("_parent.sound") {
gotoAndStop ("metal");
};
stop();
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 299 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 299 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 299 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 299 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 301 MovieClip Frame 1
_root.strokes = 0;
Symbol 301 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
tu = 0;
while (tudone != "y") {
if (eval (("tu" + (tu + 1)) + ".countme") != "y") {
tudone = "y";
tu = tu - 1;
}
tu++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 301 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 301 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
ty = 1;
while (ty <= tu) {
if (speed < 20) {
if (ball.hitTest(eval ("th" + ty))) {
ball._x = 9999;
ydir = (eval (("tu" + ty) + "._y") - eval (("th" + ty) + "._y")) / 30;
xdir = (eval (("tu" + ty) + "._x") - eval (("th" + ty) + "._x")) / 30;
tellTarget ("tu" + ty) {
play();
};
stop();
}
}
ty++;
}
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 301 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 301 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 301 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 301 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 306 MovieClip Frame 1
_root.strokes = 0;
Symbol 306 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 306 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 306 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 306 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 306 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 306 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 306 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 310 MovieClip Frame 1
_root.strokes = 0;
Symbol 310 MovieClip Frame 2
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 310 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 310 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 310 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 310 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 310 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 310 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 311 MovieClip Frame 1
countme = "y";
Symbol 313 MovieClip Frame 1
_root.strokes = 0;
Symbol 313 MovieClip Frame 2
Mouse.show();
hill = 0.035;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 313 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 313 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 313 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 313 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 313 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 313 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 316 MovieClip Frame 1
countme = "y";
Symbol 317 MovieClip Frame 1
_root.strokes = 0;
Symbol 317 MovieClip Frame 2
if (init != "y") {
Mouse.show();
hill = 0.075;
matw = mat._width;
mymath = mat._height;
mat_l = (mat._x - (matw / 2)) + 2;
mat_r = (mat._x + (matw / 2)) - 2;
mat_t = (mat._y - (mymath / 2)) + 2;
mat_b = (mat._y + (mymath / 2)) - 2;
ss = 0;
while (sdone != "y") {
if (eval (("s" + (ss + 1)) + ".countme") != "y") {
sdone = "y";
ss = ss - 1;
}
ss++;
}
ts = 0;
while (tdone != "y") {
if (eval (("t" + (ts + 1)) + ".countme") != "y") {
tdone = "y";
ts = ts - 1;
}
ts++;
}
ws = 0;
while (wdone != "y") {
if (eval (("w" + (ws + 1)) + ".countme") != "y") {
wdone = "y";
ws = ws - 1;
}
ws++;
}
drs = 0;
while (drdone != "y") {
if (eval (("dr" + (drs + 1)) + ".countme") != "y") {
drdone = "y";
drs = drs - 1;
}
drs++;
}
hrs = 0;
while (hrdone != "y") {
if (eval (("hr" + (hrs + 1)) + ".countme") != "y") {
hrdone = "y";
hrs = hrs - 1;
}
hrs++;
}
hls = 0;
while (hldone != "y") {
if (eval (("hl" + (hls + 1)) + ".countme") != "y") {
hldone = "y";
hls = hls - 1;
}
hls++;
}
hus = 0;
while (hudone != "y") {
if (eval (("hu" + (hus + 1)) + ".countme") != "y") {
hudone = "y";
hus = hus - 1;
}
hus++;
}
hds = 0;
while (hddone != "y") {
if (eval (("hd" + (hds + 1)) + ".countme") != "y") {
hddone = "y";
hds = hds - 1;
}
hds++;
}
init = "y";
}
startDrag ("button", true, mat_l, mat_t, mat_r, mat_b);
stop();
Symbol 317 MovieClip Frame 3
Mouse.hide();
if (_root.strokes == 10) {
gotoAndPlay ("limit");
}
startDrag ("putter", true);
Symbol 317 MovieClip Frame 4
if (xdir < 0) {
xcnt = xdir * -1;
} else {
xcnt = xdir;
}
if (ydir < 0) {
ycnt = ydir * -1;
} else {
ycnt = ydir;
}
if (ycnt > xcnt) {
cnt = ycnt;
} else {
cnt = xcnt;
}
ymod = ydir / cnt;
xmod = xdir / cnt;
x_old2 = ball._x;
y_old2 = ball._y;
i = 0;
while (i < cnt) {
x_old = ball._x;
y_old = ball._y;
ball._x = ball._x + xmod;
w = 1;
while (w <= ws) {
if (ball.hitTest(eval ("w" + w))) {
tellTarget ("_parent.sound") {
gotoAndStop ("water");
};
gotoAndStop (2);
}
w++;
}
s = 1;
while (s <= ss) {
if (ball.hitTest(eval ("s" + s))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._x = x_old;
xmod = xmod * -1;
xdir = xdir * -1;
}
s++;
}
ball._y = ball._y + ymod;
t = 1;
while (t <= ts) {
if (ball.hitTest(eval ("t" + t))) {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
ball._y = y_old;
ymod = ymod * -1;
ydir = ydir * -1;
}
t++;
}
dr = 0;
while (dr <= drs) {
if (ball.hitTest(eval ("dr" + dr))) {
if (eval ("on_dr" + dr) != "y") {
tellTarget ("_parent.sound") {
gotoAndStop ("bounce");
};
x_anc = eval (("dr" + dr) + "._x");
y_anc = eval (("dr" + dr) + "._y");
if (y_anc > ball._y) {
area = "t";
} else {
area = "b";
}
if (x_anc > ball._x) {
area = area + "l";
} else {
area = area + "r";
}
if (area == "tl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
} else if (area == "tr") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if (area == "bl") {
if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod > 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * 1;
xmod2 = ymod * 1;
}
} else if ((ymod == 0) or (xmod == 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod > 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod > 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
} else if ((xmod < 0) and (ymod < 0)) {
ymod2 = xmod * -1;
xmod2 = ymod * -1;
}
ymod = ymod2;
xmod = xmod2;
ball._x = ball._x + xmod;
ball._y = ball._y + ymod;
ydir = ymod * cnt;
xdir = xmod * cnt;
checktimes = checktimes + 1;
Set("on_dr" + dr, "y");
tellTarget ("dr" + dr) {
gotoAndStop (1);
};
}
} else {
Set("on_dr" + dr, "n");
}
dr++;
}
onhill = "no";
hr = 1;
while (hr <= hrs) {
if (ball.hitTest(eval ("hr" + hr))) {
xdir = xdir + (hill * 1.5);
onhill = "yes";
}
hr++;
}
hl = 1;
while (hl <= hls) {
if (ball.hitTest(eval ("hl" + hl))) {
xdir = xdir - (hill * 1.5);
onhill = "yes";
}
hl++;
}
hu = 1;
while (hu <= hus) {
if (ball.hitTest(eval ("hu" + hu))) {
ydir = ydir - (hill * 1.5);
onhill = "yes";
}
hu++;
}
hd = 1;
while (hd <= hds) {
if (ball.hitTest(eval ("hd" + hd))) {
ydir = ydir + (hill * 1.5);
onhill = "yes";
}
hd++;
}
i++;
}
speed = (ydir * ydir) + (xdir * xdir);
if (speed < 40) {
if (ball.hitTest(hole)) {
gotoAndPlay ("sunk");
}
} else if (speed < 90) {
if (ball.hitTest(hole)) {
ydir = ydir * (0.7 + (random(6) / 10));
xdir = xdir * (0.7 + (random(6) / 10));
}
}
if (speed > 0.02) {
ydir = ydir * 0.92;
xdir = xdir * 0.92;
} else {
ydir = 0;
xdir = 0;
prevFrame();
}
Symbol 317 MovieClip Frame 5
gotoAndPlay ("rolling");
Symbol 317 MovieClip Frame 6
ball._x = hole._x;
ball._y = hole._y;
tellTarget ("_parent.sound") {
gotoAndStop ("sunk");
};
play();
Symbol 317 MovieClip Frame 15
tellTarget ("..") {
play();
};
Symbol 317 MovieClip Frame 115
tellTarget ("..") {
play();
};
Symbol 319 Button
on (release) {
stopAllSounds();
tellTarget ("_root") {
gotoAndPlay (1);
};
}
Symbol 321 Button
on (release) {
if (_root.hole > 18) {
submitScore(_root.score);
}
}
Symbol 324 Button
on (release) {
if (((_root.hole > 18) and (pname.length > 0)) and (pname != undefined)) {
submitScore(_root.score, pname);
}
}
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 3
if (_root.pg_username) {
pname = _root.pg_username;
}
Symbol 350 MovieClip Frame 112
tellTarget ("_root") {
gotoAndStop ("kicked");
};
Symbol 357 MovieClip Frame 63
tellTarget ("_root") {
gotoAndStop ("kicked");
};
Symbol 371 MovieClip Frame 46
tellTarget ("_root") {
gotoAndStop ("kicked");
};
Symbol 372 MovieClip Frame 1
gotoAndStop(random(3) + 2);
Symbol 373 MovieClip Frame 2
stop();
Symbol 373 MovieClip Frame 4
stop();
Symbol 373 MovieClip Frame 6
stop();
Symbol 373 MovieClip Frame 8
stop();
Symbol 373 MovieClip Frame 10
stop();
Symbol 373 MovieClip Frame 12
stop();
Symbol 373 MovieClip Frame 14
stop();
Symbol 373 MovieClip Frame 16
stop();
Symbol 373 MovieClip Frame 18
stop();
Symbol 373 MovieClip Frame 20
stop();
Symbol 373 MovieClip Frame 22
stop();
Symbol 373 MovieClip Frame 24
stop();
Symbol 373 MovieClip Frame 26
stop();
Symbol 373 MovieClip Frame 28
stop();
Symbol 373 MovieClip Frame 30
stop();
Symbol 373 MovieClip Frame 32
stop();
Symbol 373 MovieClip Frame 34
stop();
Symbol 373 MovieClip Frame 36
stop();
Symbol 373 MovieClip Frame 37
stop();
Symbol 373 MovieClip Frame 38
Mouse.show();
stopAllSounds();