Frame 212
level = 0;
_level0.rota = new array();
stop();
Frame 213
level++;
max_levels = 4;
level_time = new array();
level_time[1] = 60;
level_time[2] = 60;
level_time[3] = 60;
level_time[4] = 60;
limit = level_time[level];
task = new array();
task[1] = "LEVEL 1. Dock your boat in the space shown. Don't hit the Jetties or Buoys!";
task[2] = "LEVEL 2. Quickly dock your boat but watch the current - its FAST!";
task[3] = "LEVEL 3. Look out for the canoe - dont spoil his day!";
task[4] = "LEVEL 4. Weave your way through the buoys and pick up all the coins in order";
task_txt = task[level];
limit_txt = ("You have " + limit) + " seconds to complete this level.";
Instance of Symbol 133 MovieClip "game_cooky" in Frame 213
onClipEvent (load) {
function write_game_cookie(game_id, f1, f2, f3, f4, f5, f6, f7, f8) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
trace("writing cookie......name : " + game_id);
so.data.game_id = game_id;
so.data.f1 = f1;
so.data.f2 = f2;
so.data.f3 = f3;
so.data.f4 = f4;
so.data.f5 = f5;
so.data.f6 = f6;
so.data.f7 = f7;
so.data.f8 = f8;
so.data.f9 = f9;
trace("f6..." + f6);
trace("f7..." + f7);
trace("f8..." + f8);
so.flush();
}
function read_game_cookie(game_id) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
if (so.data.game_id == null) {
result = false;
trace("no cookie....");
} else {
trace("cookie....");
result = true;
trace("reading cookie....");
_level0.checker = so.data.game_id;
_level0.f1 = so.data.f1;
_level0.f2 = so.data.f2;
_level0.f3 = so.data.f3;
_level0.f4 = so.data.f4;
_level0.f5 = so.data.f5;
_level0.f6 = so.data.f6;
_level0.f7 = so.data.f7;
_level0.f8 = so.data.f8;
_level0.f9 = so.data.f9;
}
return(result);
}
_visible = true;
}
Frame 214
function get_cookie_txt() {
cookie_best1_txt = cookie_best1;
cookie_best2_txt = cookie_best2;
cookie_best3_txt = cookie_best3;
cookie_best4_txt = cookie_best4;
cookie_best5_txt = cookie_best5;
cookie_best_txt = cookie_best;
if (cookie_best == not_yet_done) {
cookie_best_txt = "N/A";
}
if (cookie_best1 == not_yet_done) {
cookie_best1_txt = "N/A";
}
if (cookie_best2 == not_yet_done) {
cookie_best2_txt = "N/A";
}
if (cookie_best3 == not_yet_done) {
cookie_best3_txt = "N/A";
}
if (cookie_best4 == not_yet_done) {
cookie_best4_txt = "N/A";
}
if (cookie_best5 == not_yet_done) {
cookie_best5_txt = "N/A";
}
}
game_id = "ctg_docking_1.1";
exists = game_cooky.read_game_cookie(game_id);
trace((("game " + game_id) + " ") + exists);
not_yet_done = -1;
if (exists == false) {
game_cooky.write_game_cookie(game_id, not_yet_done, not_yet_done, not_yet_done, not_yet_done, not_yet_done, not_yet_done, 0, 0);
f1 = not_yet_done;
f2 = not_yet_done;
f3 = not_yet_done;
f4 = not_yet_done;
f5 = not_yet_done;
f6 = not_yet_done;
f7 = 0;
f8 = 0;
f9 = 0;
}
cookie_best1 = f1;
cookie_best2 = f2;
cookie_best3 = f3;
cookie_best4 = f4;
cookie_best5 = f5;
cookie_best = f6;
cookie_played = f7;
cookie_completed = f8;
trace("****READ****");
trace("cookie_best1 " + cookie_best1);
trace("****ENDREAD****");
get_cookie_txt();
stop();
Instance of Symbol 133 MovieClip "game_cooky" in Frame 215
onClipEvent (load) {
function write_game_cookie(game_id, f1, f2, f3, f4, f5, f6, f7, f8) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
trace("writing cookie......name : " + game_id);
so.data.game_id = game_id;
so.data.f1 = f1;
so.data.f2 = f2;
so.data.f3 = f3;
so.data.f4 = f4;
so.data.f5 = f5;
so.data.f6 = f6;
so.data.f7 = f7;
so.data.f8 = f8;
so.data.f9 = f9;
trace("f6..." + f6);
trace("f7..." + f7);
trace("f8..." + f8);
so.flush();
}
function read_game_cookie(game_id) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
if (so.data.game_id == null) {
result = false;
trace("no cookie....");
} else {
trace("cookie....");
result = true;
trace("reading cookie....");
_level0.checker = so.data.game_id;
_level0.f1 = so.data.f1;
_level0.f2 = so.data.f2;
_level0.f3 = so.data.f3;
_level0.f4 = so.data.f4;
_level0.f5 = so.data.f5;
_level0.f6 = so.data.f6;
_level0.f7 = so.data.f7;
_level0.f8 = so.data.f8;
_level0.f9 = so.data.f9;
}
return(result);
}
_visible = false;
}
Instance of Symbol 136 MovieClip "timer" in Frame 215
onClipEvent (load) {
function start_timer() {
start = getTimer();
state = "running";
}
function stop_timer() {
finish = getTimer();
state = "stopped";
}
state = "idle";
timer_val = "00.0";
start_timer();
}
onClipEvent (enterFrame) {
if (state == "running") {
time_now = getTimer();
duration = (time_now - start) / 1000;
timer_val = int(duration * 10) / 10;
if (timer_val != last_timer_val) {
timer_val_txt = timer_val;
if (timer_val == int(timer_val)) {
timer_val_txt = timer_val_txt + ".0";
}
_level0.acct_txt = _level0.acct + timer_val;
if ((_level0.acct + timer_val) == int(_level0.acct + timer_val)) {
_level0.acct_txt = _level0.acct_txt + ".0";
}
}
last_timer_val = timer_val;
}
}
Instance of Symbol 157 MovieClip "pb" in Frame 215
onClipEvent (load) {
_visible = false;
}
Frame 216
if (level == 1) {
gotoAndStop (218);
}
if (level == 2) {
gotoAndStop (238);
}
if (level == 3) {
gotoAndStop (230);
}
if (level == 4) {
gotoAndStop (223);
}
Instance of Symbol 77 MovieClip "me" in Frame 216
onClipEvent (load) {
canoed = 2;
this_score = 0;
state = "play";
coin_level = false;
canoe_level = false;
buoys = 4;
jettys = 7;
coins = 8;
if (_level0.level == 1) {
vx = -0.1;
vy = 0.1;
_level0.cookie_played++;
_level0.game_cooky.write_game_cookie(_level0.game_id, _level0.cookie_best1, _level0.cookie_best2, _level0.cookie_best3, _level0.cookie_best4, _level0.cookie_best5, _level0.cookie_best, _level0.cookie_played, _level0.cookie_completed);
boats = 6;
}
if (_level0.level == 2) {
vx = -0.15;
vy = 0.15;
boats = 4;
}
if (_level0.level == 3) {
vx = -0.1;
vy = 0.1;
canoe_level = true;
boats = 4;
}
if (_level0.level == 4) {
coin_level = true;
vx = 0.1;
vy = 0.1;
boats = 4;
}
speed = 0;
startx = _x;
starty = _y;
cmax = 16;
ang = new array();
cross_dx = new array();
cross_dy = new array();
mag = new array();
pi_div_180 = 0.0174555555555556;
next_coin = 1;
j = 1;
while (j <= cmax) {
mov1 = eval ("_level0.cross" + j);
cross_dx[j] = (xdx + startx) - mov1._x;
cross_dy[j] = (xdy + starty) - mov1._y;
mag[j] = math.sqrt((cross_dx[j] * cross_dx[j]) + (cross_dy[j] * cross_dy[j]));
ang[j] = -90 + ((Math.atan2(cross_dy[j], cross_dx[j]) * 180) / 3.142);
mov1._visible = false;
j++;
}
}
onClipEvent (enterFrame) {
level = _level0.level;
if (state == "play") {
if (canoe_level) {
_level0.canoe._x = _level0.canoe._x + canoed;
if (_level0.canoe._x > 440) {
canoed = canoed * -1;
_level0.canoe._x = 440;
}
if (_level0.canoe._x < 0) {
canoed = canoed * -1;
_level0.canoe._x = 0;
}
}
startposx = _x;
startposy = _y;
if (Key.isDown(39)) {
_rotation = (_rotation + ((speed / 2) + 0.1));
}
if (Key.isDown(37)) {
_rotation = (_rotation - ((speed / 2) + 0.1));
}
if (Key.isDown(38)) {
speed = speed + 0.1;
maxs = 2.4;
if (speed > maxs) {
speed = maxs;
}
}
if (Key.isDown(40)) {
speed = speed - 0.1;
mins = -2;
if (speed < mins) {
speed = mins;
}
}
_x = (_x + vx);
_y = (_y + vy);
a = (_rotation * 3.142) / 180;
_x = (_x + (speed * Math.sin(a)));
_y = (_y - (speed * Math.cos(a)));
count = 0;
j = 1;
while (j <= cmax) {
mov1 = eval ("_level0.cross" + j);
testx = _x + (mag[j] * Math.sin((_rotation + ang[j]) * pi_div_180));
testy = _y - (mag[j] * Math.cos((_rotation + ang[j]) * pi_div_180));
if (coin_level) {
testmc = eval ("_level0.coin" + next_coin);
if (testmc.hitTest(testx, testy, true)) {
testmc._visible = false;
next_coin++;
}
}
if (canoe_level) {
testmc = _level0.canoe;
if (testmc.hitTest(testx, testy, true)) {
trace("HIT!");
state = "gameover";
this.gotoandplay("sink");
bubble._visible = true;
bubble._rotation = -_rotation;
if (_x > 300) {
bubble.gotoAndStop(2);
}
bubble.txt = "WATCH IT SON!";
testmc.gotoAndStop(1);
}
}
ii = 1;
while (ii <= buoys) {
testmc = eval ("_level0.buoy" + ii);
if (testmc.zone.hitTest(testx, testy, true)) {
trace("HIT!");
state = "gameover";
this.gotoandplay("sink");
bubble._visible = true;
bubble._rotation = -_rotation;
bubble.txt = "Ouch!";
if (_x > 300) {
bubble.gotoAndStop(2);
}
}
ii++;
}
ii = 1;
while (ii <= boats) {
testmc = eval ("_level0.boat" + ii);
if (testmc.zone.hitTest(testx, testy, true)) {
trace("HIT!");
state = "gameover";
bubble._visible = true;
this.gotoandplay("sink");
bubble._rotation = -_rotation;
bubble.txt = "Oh Fiddlesticks!";
if (_x > 300) {
bubble.gotoAndStop(2);
}
}
ii++;
}
ii = 1;
while (ii <= jettys) {
testmc = eval ("_level0.jetty" + ii);
if (testmc.hitTest(testx, testy, true)) {
trace("HIT!");
state = "gameover";
bubble._visible = true;
this.gotoandplay("sink");
bubble._rotation = -_rotation;
bubble.txt = "Which fool left that there?!";
if (_x > 300) {
bubble.gotoAndStop(2);
}
}
ii++;
}
current_zone = 1;
mov = eval ("_level0.zone" + current_zone);
if (mov.hitTest(testx, testy, true)) {
count++;
}
j++;
}
_level0.diag = count;
if (count >= cmax) {
if (coin_level and (next_coin <= coins)) {
trace("need more coins!");
} else {
state = "done";
trace("done!");
_level0.result.gotoandplay("done");
_level0.timer.stop_timer();
this_score = _level0.timer.timer_val;
_level0.rota[_level0.level] = this_score;
_level0.eve = _level0.rotat - _level0.rota[1];
_level0.vel = _level0.rota[2] + _level0.rotat;
_level0.leve = _level0.rota[3] + (_level0.rotat * 2);
_level0.tation = 200 - _level0.rota[4];
_level0.toand = 10 + _level0.rota[5];
_level0.game_cooky._visible = true;
}
}
if (_level0.timer.timer_val >= _level0.level_time[level]) {
trace("too slow!");
_level0.result.gotoandplay("timeup");
_level0.timer.stop_timer();
state = "done";
}
}
if (state == "gameover") {
state = "done";
_level0.result.gotoandplay("crashed");
_level0.timer.stop_timer();
}
}
Frame 223
coins = me.coins;
i = 1;
while (i <= coins) {
mc = eval ("coin" + i);
mc.number = i;
i++;
}
Frame 263
gotoAndPlay (212);
Frame 264
stopAllSounds();
if (level >= max_levels) {
gotoAndPlay (265);
} else {
gotoAndPlay (213);
}
Frame 265
score = manager_rating;
players = "";
command = "update";
bo = "ta";
sct1 = _level0.rota[1];
sct2 = _level0.rota[2];
sct3 = _level0.rota[3];
sct4 = _level0.rota[4];
sct5 = _level0.rota[5];
Instance of Symbol 157 MovieClip "pb" in Frame 265
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 133 MovieClip "game_cooky" in Frame 265
onClipEvent (load) {
function write_game_cookie(game_id, f1, f2, f3, f4, f5, f6, f7, f8) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
trace("writing cookie......name : " + game_id);
so.data.game_id = game_id;
so.data.f1 = f1;
so.data.f2 = f2;
so.data.f3 = f3;
so.data.f4 = f4;
so.data.f5 = f5;
so.data.f6 = f6;
so.data.f7 = f7;
so.data.f8 = f8;
so.data.f9 = f9;
trace("f6..." + f6);
trace("f7..." + f7);
trace("f8..." + f8);
so.flush();
}
function read_game_cookie(game_id) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
if (so.data.game_id == null) {
result = false;
trace("no cookie....");
} else {
trace("cookie....");
result = true;
trace("reading cookie....");
_level0.checker = so.data.game_id;
_level0.f1 = so.data.f1;
_level0.f2 = so.data.f2;
_level0.f3 = so.data.f3;
_level0.f4 = so.data.f4;
_level0.f5 = so.data.f5;
_level0.f6 = so.data.f6;
_level0.f7 = so.data.f7;
_level0.f8 = so.data.f8;
_level0.f9 = so.data.f9;
}
return(result);
}
_visible = true;
}
Frame 266
_level0.get_cookie_txt();
trace("ATB = " + all_time_best);
if (all_time_best) {
pb.gotoAndPlay(2);
pb._visible = true;
}
stopAllSounds();
stop();
Symbol 7 MovieClip Frame 1
doneLoading = 0;
stop();
Instance of Symbol 3 MovieClip "bkgd" in Symbol 7 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.doneLoading == 0) {
total = _parent._parent.getBytesTotal();
isloaded = _parent._parent.getBytesLoaded();
p = 100 * (isLoaded / total);
_parent.bytes = ((int(isloaded / 1000) add " KB of ") add int(total / 1000)) add " KB";
_parent.percent = int(p) add "% LOADED";
_parent.bar._xscale = p;
trace("....." + Number(p));
if (Number(p) >= Number(100)) {
_parent._parent.gotoAndPlay(Number(2));
_parent.gotoAndStop("off");
_parent.doneLoading = 1;
} else {
_parent._parent.gotoAndPlay(Number(1));
}
}
}
Symbol 13 MovieClip Frame 7
gotoAndPlay (1);
Symbol 16 MovieClip Frame 32
gotoAndPlay (1);
Symbol 19 MovieClip Frame 7
gotoAndPlay (1);
Symbol 21 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?cdgtid=dp", "_self");
}
Symbol 27 MovieClip Frame 1
Symbol 27 MovieClip Frame 19
stop();
Symbol 41 MovieClip Frame 36
gotoAndPlay (1);
Symbol 57 Button
on (release) {
play();
}
Symbol 64 MovieClip Frame 18
gotoAndPlay (1);
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 64
gotoAndPlay (10);
Symbol 77 MovieClip Frame 1
stop();
Instance of Symbol 70 MovieClip "bubble" in Symbol 77 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 70 MovieClip "bubble" in Symbol 77 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 77 MovieClip Frame 57
bubble.txt = "GLUG!";
Symbol 77 MovieClip Frame 93
stop();
Symbol 97 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?cdgtid=dp", "_self");
}
Symbol 100 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?page=freestuff", "_self");
}
Symbol 104 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?page=freestuff", "_self");
}
Symbol 113 Button
on (release, keyPress "<Enter>") {
play();
}
Symbol 133 MovieClip Frame 1
stop();
Symbol 141 Button
on (release) {
play();
}
Symbol 143 Button
on (release) {
play();
}
Symbol 152 Button
on (release) {
play();
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
cs = _level0.me.this_score;
_level0.acct = _level0.acct + cs;
if (_level0.level == _level0.max_levels) {
_level0.cookie_completed++;
_level0.all_time_best = false;
if ((_level0.acct < _level0.cookie_best) or (_level0.cookie_best == -1)) {
_level0.cookie_best = _level0.acct;
trace("ATB!");
_level0.all_time_best = true;
}
}
trace("best was..." + _level0["cookie_best" + _level0.level]);
trace("this..." + cs);
if ((cs < _level0["cookie_best" + _level0.level]) or (_level0["cookie_best" + _level0.level] == -1)) {
_level0["cookie_best" + _level0.level] = cs;
_level0.pb._visible = true;
_level0.pb.gotoAndPlay(2);
}
_level0.game_cooky.write_game_cookie(_level0.game_id, _level0.cookie_best1, _level0.cookie_best2, _level0.cookie_best3, _level0.cookie_best4, _level0.cookie_best5, _level0.cookie_best, _level0.cookie_played, _level0.cookie_completed);
_level0.get_cookie_txt();
_level0.game_cooky._visible = true;
Symbol 153 MovieClip Frame 20
stop();
Symbol 153 MovieClip Frame 21
_root.gotoandplay("end");
stop();
Symbol 153 MovieClip Frame 43
stop();
Symbol 153 MovieClip Frame 44
_root.gotoandplay("failed");
stop();
Symbol 153 MovieClip Frame 83
stop();
Symbol 153 MovieClip Frame 84
_root.gotoandplay("failed");
stop();
Symbol 153 MovieClip Frame 117
_level0.geezer.gotoandplay("crosseyed");
_level0.geezer.text = "Oh my!\rI need a lie down.";
stop();
Symbol 153 MovieClip Frame 118
_root.gotoandplay("failed");
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 20
gotoAndPlay (2);
Instance of Symbol 163 MovieClip "zone" in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 164 MovieClip Frame 88
gotoAndPlay (1);
Instance of Symbol 163 MovieClip "zone" in Symbol 165 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 165 MovieClip Frame 79
gotoAndPlay (1);
Instance of Symbol 163 MovieClip "zone" in Symbol 167 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 167 MovieClip Frame 100
gotoAndPlay (1);
Instance of Symbol 163 MovieClip "zone" in Symbol 176 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 176 MovieClip Frame 104
gotoAndPlay (1);
Symbol 186 MovieClip Frame 39
gotoAndPlay (2);
Symbol 195 Button
on (release) {
gotoAndPlay (212);
}
Symbol 198 Button
on (release) {
getURL ("http://www.mousebreaker.com/index.php?cdgtid=dp", "_self");
}