Frame 1
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
fscommand ("showmenu", 0);
fscommand ("allowscale", 0);
if (percent == 100) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Frame 73
tellTarget ("start.ripple") {
gotoAndPlay (2);
};
Frame 84
stop();
Frame 85
function bounce(b_angle, y_bounce, x_bounce) {
eval ("_root.score_panel.score.play_" + id).gotoandplay("bounce");
xspeed = 0;
yspeed = 0;
xspeed = xspeed + (x_bounce * Math.sin(((((-b_angle) + 180) / 360) * 2) * Math.PI));
yspeed = yspeed + (y_bounce * Math.cos(((((-b_angle) + 180) / 360) * 2) * Math.PI));
}
function check_wall() {
if ((_root.gamebounds.xMax - 10) < ((_x + radius) + xspeed)) {
xspeed = -(xspeed + 1);
} else if (((_x - radius) + xspeed) < (_root.gamebounds.xMin + 10)) {
xspeed = -(xspeed - 1);
} else if ((_root.gamebounds.yMax - 10) < ((_y + radius) + yspeed)) {
yspeed = -(yspeed + 1);
} else if (((_y - radius) + yspeed) < (_root.gamebounds.yMin + 10)) {
yspeed = -(yspeed - 1);
} else {
return("cool");
}
}
function start_movs() {
hover_1.bounce = bounce;
hover_1.check_wall = check_wall;
hover_2.bounce = bounce;
hover_2.check_wall = check_wall;
hover_1._x = player_1_startx;
hover_1._y = player_1_starty;
hover_2._x = player_2_startx;
hover_2._y = player_2_starty;
hover_1.gotoandplay(2);
hover_2.hull.gotoandstop(2);
hover_2.gotoandplay(2);
}
function addscore() {
if (_root.possesion ne "-") {
var temp_obj = (("_root.score_panel.score.player_" + _root.possesion) + "_score");
eval (temp_obj)++;
if (eval (temp_obj) >= score_limit) {
end_game(_root.possesion);
}
if (eval (temp_obj) < 10) {
Set(temp_obj, "0" + eval (temp_obj));
}
}
}
function end_game(win) {
winner.gotoAndPlay(2);
endgame = "yes";
if (number_of_players == 1) {
time_taken = int(getTimer() / 500) - time_reset;
if (win == 2) {
win_bonus = 0;
winner.display.text = "the mighty\ncomputer\nwins!";
} else {
win_bonus = 500;
winner.display.text = "the feeble\nhuman\nwins!";
}
} else {
winner.display.text = (("player " + win) + "\r") + " wins!";
}
hover_1.gotoandstop(1);
hover_2.gotoandstop(1);
eval ("hover_" + win).gotoandplay("win");
boat_trail.stop();
bomb.gotoandstop(24);
}
function get_angle(x1, y1, x2, y2, xspeed1, yspeed1, xspeed2, yspeed2, id) {
var yspeed = ((Math.abs(yspeed1) + Math.abs(yspeed2)) / 2);
var xspeed = ((Math.abs(xspeed1) + Math.abs(xspeed2)) / 2);
var angle = ((Math.atan2(y1 - y2, x1 - x2) * 180) / Math.PI);
angle = angle - 90;
eval (("hover_" + id) + ".bounce")(angle, (yspeed * 2) + 1, (xspeed * 2) + 1);
angle = angle - 180;
bomb.yspeed = 0;
bomb.xspeed = 0;
bomb.y_bounce = (yspeed * 3) + 1;
bomb.x_bounce = (xspeed * 3) + 1;
return(angle);
}
speed_limit = 6;
if (number_of_players == 1) {
comp_speed_limit = 5;
comp_drag = 0.045;
comp_acc = 0.5;
comp_turn_speed = 3;
}
bomb_speed_limit = 30;
_root.possesion = "-";
endgame = "no";
player_1_startx = 100;
player_1_starty = 100;
player_2_startx = 300;
player_2_starty = 300;
time_reset = int(getTimer() / 500);
this.gotoAndStop(("game_" + game_type) + number_of_players.toString());
Instance of Symbol 207 MovieClip "game_area" in Frame 85
onClipEvent (load) {
_root.gamebounds = this.getBounds(_root);
}
Instance of Symbol 212 MovieClip "bomb" in Frame 85
onClipEvent (load) {
radius = _width / 2;
drag = 0.03;
acc = 6;
}
Frame 87
score_limit = 11;
start_movs();
stop();
Instance of Symbol 240 MovieClip "hover_2" in Frame 87
onClipEvent (load) {
id = 2;
other_id = 1;
radius = _width / 2;
}
Instance of Symbol 241 MovieClip "hover_1" in Frame 87
onClipEvent (load) {
id = 1;
other_id = 2;
drag = 0.045;
acc = 0.5;
turn_speed = 4;
radius = _width / 2;
}
Frame 91
score_limit = 11;
start_movs();
stop();
Instance of Symbol 260 MovieClip "hover_2" in Frame 91
onClipEvent (load) {
id = 2;
other_id = 1;
drag = 0.045;
acc = 0.5;
turn_speed = 4;
radius = _width / 2;
}
Frame 95
score_limit = 60;
timer.reset = int(getTimer() / 1000);
timer.gotoandplay(2);
start_movs();
stop();
Instance of Symbol 240 MovieClip "hover_2" in Frame 95
onClipEvent (load) {
id = 2;
other_id = 1;
radius = _width / 2;
}
Frame 99
score_limit = 60;
timer.reset = int(getTimer() / 1000);
timer.gotoandplay(2);
start_movs();
stop();
Instance of Symbol 260 MovieClip "hover_2" in Frame 99
onClipEvent (load) {
id = 2;
other_id = 1;
drag = 0.045;
acc = 0.5;
turn_speed = 4;
radius = _width / 2;
}
Frame 105
tellTarget ("start") {
gotoAndStop ("highscore");
};
Frame 123
tellTarget ("start.ripple") {
gotoAndPlay (2);
};
Frame 134
stop();
Symbol 23 MovieClip Frame 91
_root.play();
stop();
Symbol 23 MovieClip Frame 109
gotoAndPlay (1);
Symbol 31 Button
on (release) {
getURL ("http://www.hyro.com", "_blank");
}
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 50
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 65 Button
on (release) {
_root.number_of_players = 2;
gotoAndPlay (3);
}
Symbol 69 Button
on (release) {
_root.number_of_players = 1;
gotoAndPlay (3);
}
Symbol 77 Button
on (release) {
viewscores = "yes";
gotoAndPlay (3);
}
Symbol 83 Button
on (release) {
gotoAndStop (1);
}
Symbol 86 Button
on (release) {
_root.game_type = 1;
if (viewscores eq "yes") {
gotoAndPlay (65);
} else {
gotoAndPlay (23);
}
}
Symbol 89 Button
on (release) {
_root.game_type = 2;
if (viewscores eq "yes") {
gotoAndPlay (65);
} else {
gotoAndPlay (23);
}
}
Symbol 99 Button
on (release) {
gotoAndPlay (37);
}
Symbol 100 Button
on (release) {
gotoAndPlay (10);
}
Symbol 101 Button
on (release) {
tellTarget ("_root") {
gotoAndPlay ("start");
};
}
Symbol 104 Button
on (release) {
gotoAndStop (3);
}
Symbol 118 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 1
key3a.gotoAndStop(2);
Symbol 128 MovieClip Frame 32
key3a.gotoAndStop(1);
key1a.gotoAndStop(2);
Symbol 128 MovieClip Frame 65
key3a.gotoAndStop(2);
key1a.gotoAndStop(1);
Symbol 128 MovieClip Frame 75
key3a.gotoAndStop(1);
Symbol 128 MovieClip Frame 79
key2a.gotoAndStop(2);
Symbol 128 MovieClip Frame 116
key2a.gotoAndStop(1);
Symbol 129 Button
on (release) {
gotoAndStop(_root.game_type);
}
Symbol 130 MovieClip Frame 1
stop();
Symbol 134 Button
on (release) {
gotoAndPlay (23);
}
Symbol 135 Button
on (release) {
gotoAndStop (3);
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 23
stop();
key = "?";
Instance of Symbol 142 MovieClip in Symbol 143 MovieClip Frame 23
onClipEvent (keyDown) {
_parent._parent.num = _parent.num;
_parent._parent.enterKey();
}
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 23
stop();
key = "?";
Instance of Symbol 142 MovieClip in Symbol 144 MovieClip Frame 23
onClipEvent (keyDown) {
_parent._parent.num = _parent.num;
_parent._parent.enterKey();
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 23
stop();
key = "?";
Instance of Symbol 142 MovieClip in Symbol 145 MovieClip Frame 23
onClipEvent (keyDown) {
_parent._parent.num = _parent.num;
_parent._parent.enterKey();
}
Symbol 148 Button
on (release) {
gotoAndStop (4);
}
Symbol 153 MovieClip Frame 1
function set_keys(sub) {
var i = 1;
while (i < 4) {
var temp_code = eval (("_root.player_" + id) + "_key_array")[i];
if ((36 < temp_code) && (temp_code < 41)) {
eval (("key" + i) + sub).gotoandstop("arrow" + temp_code);
} else {
eval (("key" + i) + sub).gotoandstop(1);
Set((("key" + i) + sub) + ".key", chr(temp_code));
}
i++;
}
}
function checkKey(code) {
var i = 1;
while (i < 4) {
if (_root.player_1_key_array[i] == code) {
return("taken");
}
if (_root.player_2_key_array[i] == code) {
return("taken");
}
i++;
}
}
function enterKey() {
var code = Key.getCode();
if (checkKey(code) ne "taken") {
if ((64 < code) && (code < 91)) {
Set(("key" + num) + "a.key", chr(Key.getAscii()).toUpperCase());
eval (("key" + num) + "a").gotoAndStop(1);
var good = "yes";
} else if ((47 < code) && (code < 58)) {
Set(("key" + num) + "a.key", 48 - code);
eval (("key" + num) + "a").gotoAndStop(1);
var good = "yes";
} else if ((36 < code) && (code < 41)) {
eval (("key" + num) + "a").gotoandstop("arrow" + code);
var good = "yes";
}
if (good eq "yes") {
eval (("_root.player_" + id) + "_key_array")[num] = code;
if (num == 3) {
gotoAndStop(_root.number_of_players);
tellTarget ("_parent") {
gotoAndStop ("define_last");
};
} else {
eval (("key" + (num + 1)) + "a").gotoAndStop("define");
}
}
}
}
id = 1;
set_keys("a");
stop();
Instance of Symbol 143 MovieClip "key1a" in Symbol 153 MovieClip Frame 1
onClipEvent (load) {
num = 1;
}
Instance of Symbol 144 MovieClip "key3a" in Symbol 153 MovieClip Frame 1
onClipEvent (load) {
num = 3;
}
Instance of Symbol 145 MovieClip "key2a" in Symbol 153 MovieClip Frame 1
onClipEvent (load) {
num = 2;
}
Symbol 153 MovieClip Frame 2
id = 1;
set_keys("a");
id = 2;
set_keys("b");
stop();
Instance of Symbol 143 MovieClip "key1b" in Symbol 153 MovieClip Frame 2
onClipEvent (load) {
num = 1;
}
Instance of Symbol 144 MovieClip "key3b" in Symbol 153 MovieClip Frame 2
onClipEvent (load) {
num = 3;
}
Instance of Symbol 145 MovieClip "key2b" in Symbol 153 MovieClip Frame 2
onClipEvent (load) {
num = 2;
}
Symbol 153 MovieClip Frame 3
tellTarget ("_parent") {
gotoAndStop ("defining");
};
id = 1;
set_keys("a");
key1a.gotoAndStop("define");
_root.player_1_key_array = new Array("blank", 0, 0, 0);
if (_root.number_of_players == 1) {
_root.player_2_key_array = new Array();
}
Symbol 153 MovieClip Frame 4
tellTarget ("_parent") {
gotoAndStop ("defining");
};
id = 2;
set_keys("a");
key1a.gotoAndStop("define");
_root.player_2_key_array = new Array("blank", 0, 0, 0);
Symbol 155 MovieClip Frame 1
stop();
Symbol 163 Button
on (release) {
name_bad.gotoAndStop(1);
email_bad.gotoAndStop(1);
name_check = "";
if (check_cuss(name) ne "bad") {
if (check_email(email) ne "bad") {
sent = "";
_root.name = name;
_root.email = email;
loadVariables (serverpath + "highscores.asp", "", "POST");
gotoAndPlay (58);
} else {
email_bad.gotoAndStop(2);
}
} else {
name_bad.gotoAndStop(2);
}
}
Symbol 173 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 1
stop();
Symbol 174 MovieClip Frame 2
bomb.gotoAndStop(6);
Symbol 180 Button
on (release) {
gotoAndStop (65);
}
Symbol 184 Button
on (release) {
name_bad.gotoAndStop(1);
email_bad.gotoAndStop(1);
if (_parent.check_cuss(recievename) ne "bad") {
if (_parent.check_email(email) ne "bad") {
loadVariables ((((((((((((((_parent.serverpath + "challenge.asp?email=") + email) + "&name=") + name) + "&sendername=") + sendername) + "&senderemail=") + senderemail) + "&score=") + score) + "&game=") + game) + "&recievename=") + recievename, "");
gotoAndPlay (4);
} else {
email_bad.gotoAndStop(2);
}
} else {
name_bad.gotoAndStop(2);
}
}
Symbol 188 MovieClip Frame 1
stop();
sendername = _parent.name;
senderemail = _parent.email;
score = _parent.score;
if (_root.game_type == 1) {
game = "Hover Havoc - Destroy";
} else {
game = "Hover Havoc - Possess";
}
Symbol 188 MovieClip Frame 4
if (email eq "sent") {
email = "";
recievename = "";
gotoAndStop (2);
} else {
play();
}
Symbol 188 MovieClip Frame 5
gotoAndPlay (4);
Symbol 189 Button
on (release) {
_parent.score_index = _parent.score_index + _parent.display_limit;
_parent.duplicate_mov();
}
Symbol 191 MovieClip Frame 1
stop();
Symbol 192 Button
on (release) {
_parent.score_index = _parent.score_index - _parent.display_limit;
_parent.duplicate_mov();
}
Symbol 194 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 1
function clear_scores() {
i = 0;
while (i < 50) {
delete eval ("name" + i);
i++;
}
}
function duplicate_mov() {
setProperty("score_list", _visible , 0);
if (eval ("name" + ((display_limit + score_index) + 1)) eq "") {
next.gotoAndStop(1);
} else {
next.gotoAndStop(2);
}
if (score_index == 0) {
prev.gotoAndStop(1);
} else {
prev.gotoAndStop(2);
}
var i = 0;
while (i < (display_limit - score_cutoff)) {
var temp_obj = ("score_list_" add i);
var num = ((i + 1) + score_index);
if (eval ("name" + num) eq "") {
remove_mov(i);
return;
}
duplicateMovieClip ("score_list", temp_obj, i);
eval (temp_obj)._y = (score_height + gap) * i;
eval (temp_obj).name = eval ("name" + num);
eval (temp_obj).score = eval ("score" + num);
eval (temp_obj).rank = num;
i++;
}
}
function remove_mov(index) {
i = index;
while (i < display_limit) {
removeMovieClip("score_list_" + i);
i++;
}
}
gap = 3;
display_limit = 5;
score_index = 0;
score_cutoff = 0;
score_height = score_list._height;
score_y = score_list._y;
stop();
Symbol 205 Button
on (release) {
if (viewscores eq "yes") {
gotoAndStop (1);
} else {
tellTarget ("_root") {
gotoAndPlay ("intro");
};
}
}
Symbol 206 MovieClip Frame 1
viewscores = "no";
serverpath = "http://www.hyro.com/games/";
order = "desc";
pagesize = 50;
stop();
Symbol 206 MovieClip Frame 19
if (_root.player_1_key_array[0] eq "") {
_root.player_1_key_array = new Array("blank", 65, 87, 68);
}
if ((_root.number_of_players == 2) && (_root.player_2_key_array[0] eq "")) {
_root.player_2_key_array = new Array("blank", 74, 73, 76);
}
stop();
Symbol 206 MovieClip Frame 32
stop();
Instance of Symbol 130 MovieClip in Symbol 206 MovieClip Frame 32
onClipEvent (load) {
gotoAndStop(_root.game_type);
}
Symbol 206 MovieClip Frame 46
stop();
Instance of Symbol 153 MovieClip "define_the_keys" in Symbol 206 MovieClip Frame 46
onClipEvent (load) {
gotoAndStop(_root.number_of_players);
}
Symbol 206 MovieClip Frame 54
if (_root.win_bonus != 0) {
win_bonus = "win bonus = " + _root.win_bonus;
} else {
win_bonus = "";
}
game_name.gotoandstop(_root.game_type);
game = "hoverhavoc_" + _root.game_type;
if (_root.name ne "") {
name = _root.name;
email = _root.email;
}
method = "post";
if (_root.game_type == 1) {
score_bonus = _root.score_panel.score.player_1_score * 200;
score_bonus_txt = ("score bonus = " + _root.score_panel.score.player_1_score) + " x 200";
} else {
score_bonus = _root.score_panel.score.player_1_score * 100;
score_bonus_txt = ("score bonus = " + _root.score_panel.score.player_1_score) + " x 100";
}
time_cost = _root.time_taken;
score = (score_bonus - time_cost) + _root.win_bonus;
final_score = "final score = " + score;
time_cost = ("time penalty = " + _root.time_taken) + " x 1";
if (0 >= score) {
nextFrame();
}
stop();
function check_cuss(word) {
word = word.toLowerCase();
if (word eq "") {
return("bad");
}
var i = 0;
while (i < cuss_array.length) {
if (-1 < word.indexOf(cuss_array[i].toLowerCase(), 0)) {
return("bad");
}
i++;
}
}
function check_email(word) {
if (word eq "") {
return("bad");
}
var i = 0;
while (i < email_good_array.length) {
if (word.indexOf(email_good_array[i], 0) < 0) {
return("bad");
}
if (-1 < word.indexOf(" ", 0)) {
return("bad");
}
i++;
}
}
cuss_array = new Array("fuck", "cunt", "dick", "shit", "pussy");
email_good_array = new Array(".", "@");
Symbol 206 MovieClip Frame 58
if (sent eq "yes") {
gotoAndStop (62);
} else {
play();
}
Symbol 206 MovieClip Frame 59
gotoAndPlay (58);
Symbol 206 MovieClip Frame 65
score_list.clear_scores();
score_list.score_index = 0;
game_name.gotoandstop(_root.game_type);
game = "hoverhavoc_" + _root.game_type;
loadVariables ((((((serverpath + "displayscores.asp?method=flash&pagesize=") + pagesize) + "&order=") + order) + "&game=") + game, "score_list");
loadVariables ((((((serverpath + "displayscores.asp?method=flash&pagesize=") + pagesize) + "&order=") + order) + "&game=") + game, "score_list");
stop();
Instance of Symbol 199 MovieClip "score_list" in Symbol 206 MovieClip Frame 65
onClipEvent (data) {
duplicate_mov(5);
}
Symbol 210 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 1
bomb.gotoandstop(_root.possesion + 1);
stop();
Symbol 211 MovieClip Frame 2
bomb.gotoandstop(_root.possesion + 1);
Symbol 211 MovieClip Frame 8
bomb.gotoandstop(_root.possesion + 1);
Symbol 211 MovieClip Frame 14
bomb.gotoandstop(_root.possesion + 1);
Symbol 211 MovieClip Frame 19
bomb.gotoandstop(_root.possesion + 1);
Symbol 212 MovieClip Frame 1
_x = (random(320) + 40);
_y = (random(320) + 40);
Symbol 212 MovieClip Frame 22
i = 1;
while (i < 3) {
temp_obj = eval ("_root.hover_" + i);
a = _y - temp_obj._y;
b = _x - temp_obj._x;
c = Math.sqrt((a * a) + (b * b));
if ((radius + temp_obj.radius) >= c) {
if (_root.possesion != i) {
_root.possesion = i;
bomb.bomb.gotoandstop(i + 1);
if (_root.game_type == 2) {
_root.timer.temp_score = eval (("_root.score_panel.score.player_" + _root.possesion) + "_score");
_root.timer.reset = int(getTimer() / 1000);
}
}
bomb.gotoandplay(2);
hitangle = _root.get_angle(_x, _y, temp_obj._x, temp_obj._y, temp_obj.xspeed, temp_obj.yspeed, xspeed, yspeed, i);
yspeed = yspeed + (y_bounce * Math.cos(((((-hitangle) + 180) / 360) * 2) * Math.PI));
xspeed = xspeed + (x_bounce * Math.sin(((((-hitangle) + 180) / 360) * 2) * Math.PI));
yspeed * 2;
xspeed * 2;
}
i++;
}
if (_root.bomb_speed_limit < Math.abs(yspeed)) {
if (0 < yspeed) {
yspeed = _root.bomb_speed_limit;
} else {
yspeed = -_root.bomb_speed_limit;
}
}
if (_root.bomb_speed_limit < Math.abs(xspeed)) {
if (0 < xspeed) {
xspeed = _root.bomb_speed_limit;
} else {
xspeed = -_root.bomb_speed_limit;
}
}
temp_obj = _root.boat_trail.boat;
a = _y - (_root.boat_trail._y - temp_obj._y);
b = _x - (_root.boat_trail._x - temp_obj._x);
c = Math.sqrt((a * a) + (b * b));
if ((radius + _root.boat_trail.radius) >= c) {
_root.boat_trail.stop();
_root.boat_trail.boat.gotoandplay("sink");
xspeed = 0;
yspeed = 0;
_root.addscore();
gotoAndPlay (25);
} else {
_alpha = 100;
}
if (_root.gamebounds.xMax < ((_x + radius) + xspeed)) {
xspeed = -xspeed;
} else if (((_x - radius) + xspeed) < _root.gamebounds.xMin) {
xspeed = -xspeed;
} else if (_root.gamebounds.yMax < ((_y + radius) + yspeed)) {
yspeed = -yspeed;
} else if (((_y - radius) + yspeed) < _root.gamebounds.yMin) {
yspeed = -yspeed;
} else {
_y = (_y + yspeed);
_x = (_x + xspeed);
yspeed = yspeed - (yspeed * drag);
xspeed = xspeed - (xspeed * drag);
}
play();
Symbol 212 MovieClip Frame 23
gotoAndPlay (22);
Symbol 212 MovieClip Frame 25
bomb.gotoandstop(_root.possesion + 3);
Symbol 212 MovieClip Frame 46
_root.possesion = "-";
gotoAndPlay (1);
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 2
play();
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 2
play();
Symbol 224 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 1
stop();
Symbol 228 Button
on (release) {
tellTarget ("_root") {
gotoAndPlay ("intro");
};
}
Symbol 229 MovieClip Frame 20
stop();
Symbol 235 Button
on (release) {
tellTarget ("_root") {
gotoAndPlay ("highscore");
};
}
Symbol 236 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 23
if (_root.number_of_players == 2) {
stop();
}
Symbol 236 MovieClip Frame 30
stop();
Symbol 239 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
if (angle < 0) {
angle = angle + 360;
}
if (360 < angle) {
angle = angle - 360;
}
if (_root.possesion == id) {
temp_obj = "_root.hover_1";
} else {
temp_obj = "_root.bomb";
}
dest_angle = (Math.atan2(eval (temp_obj)._y - _y, eval (temp_obj)._x - _x) * 180) / Math.PI;
dest_angle = dest_angle + 90;
if (dest_angle < 0) {
dest_angle = dest_angle + 360;
}
if (360 < dest_angle) {
dest_angle = dest_angle - 360;
}
dest_angle = int(dest_angle);
if (int(angle) != int(dest_angle)) {
test_angle = angle + (360 - dest_angle);
if (360 < test_angle) {
test_angle = test_angle - 360;
}
if (180 < test_angle) {
turn = 1;
} else {
turn = -1;
}
} else {
turn = 0;
}
var i = 0;
while (i < _root.comp_turn_speed) {
if (int(angle) == int(dest_angle)) {
break;
}
angle = angle + turn;
i++;
}
if (_root.comp_speed_limit < Math.abs(yspeed)) {
if (0 < yspeed) {
yspeed = _root.comp_speed_limit;
} else {
yspeed = -_root.comp_speed_limit;
}
}
if (_root.comp_speed_limit < Math.abs(xspeed)) {
if (0 < xspeed) {
xspeed = _root.comp_speed_limit;
} else {
xspeed = -_root.comp_speed_limit;
}
}
wall = check_wall();
if (wall eq "cool") {
yspeed = yspeed + (_root.comp_acc * Math.cos(((((-angle) + 180) / 360) * 2) * Math.PI));
xspeed = xspeed + (_root.comp_acc * Math.sin(((((-angle) + 180) / 360) * 2) * Math.PI));
}
_y = (_y + yspeed);
_x = (_x + xspeed);
yspeed = yspeed - (yspeed * _root.comp_drag);
xspeed = xspeed - (xspeed * _root.comp_drag);
_rotation = angle;
play();
Symbol 240 MovieClip Frame 3
gotoAndPlay (2);
Symbol 240 MovieClip Frame 5
hull.gotoAndStop(id);
play();
Symbol 240 MovieClip Frame 51
gotoAndPlay (5);
Symbol 241 MovieClip Frame 1
function get_angle(x1, y1, x2, y2, xspeed1, yspeed1, xspeed2, yspeed2, id) {
trace(_name + "andgle");
var yspeed = ((Math.abs(yspeed1) + Math.abs(yspeed2)) / 2);
var xspeed = ((Math.abs(xspeed1) + Math.abs(xspeed2)) / 2);
var angle = ((Math.atan2(y1 - y2, x1 - x2) * 180) / Math.PI);
angle = angle - 90;
if (angle < 0) {
angle = angle + 360;
}
eval (("_root.hover_" + id) + ".bounce")(angle, (yspeed * 3) + 1, (xspeed * 3) + 1);
angle = angle - 180;
if (angle < 0) {
angle = angle + 360;
}
bounce(angle, (yspeed * 3) + 1, (xspeed * 3) + 1);
}
stop();
Symbol 241 MovieClip Frame 2
if (Key.isDown(eval (("_root.player_" + id) + "_key_array")[3])) {
turn = turn_speed;
} else if (Key.isDown(eval (("_root.player_" + id) + "_key_array")[1])) {
turn = -turn_speed;
} else {
turn = 0;
}
angle = angle + turn;
if (angle < 0) {
angle = angle + 360;
}
if (360 < angle) {
angle = angle - 360;
}
if (_root.speed_limit < Math.abs(yspeed)) {
if (0 < yspeed) {
yspeed = _root.speed_limit;
} else {
yspeed = -_root.speed_limit;
}
}
if (_root.speed_limit < Math.abs(xspeed)) {
if (0 < xspeed) {
xspeed = _root.speed_limit;
} else {
xspeed = -_root.speed_limit;
}
}
temp_obj = eval ("_root.hover_" + other_id);
a = _y - temp_obj._y;
b = _x - temp_obj._x;
c = Math.sqrt((a * a) + (b * b));
if (((radius + temp_obj.radius) + 5) >= c) {
get_angle(_x, _y, temp_obj._x, temp_obj._y, temp_obj.xspeed, temp_obj.yspeed, xspeed, yspeed, other_id);
} else {
wall = check_wall();
if (wall eq "cool") {
if (Key.isDown(eval (("_root.player_" + id) + "_key_array")[2])) {
yspeed = yspeed + (acc * Math.cos(((((-angle) + 180) / 360) * 2) * Math.PI));
xspeed = xspeed + (acc * Math.sin(((((-angle) + 180) / 360) * 2) * Math.PI));
} else {
yspeed = yspeed - (yspeed * drag);
xspeed = xspeed - (xspeed * drag);
}
}
}
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = angle;
play();
Symbol 241 MovieClip Frame 3
gotoAndPlay (2);
Symbol 241 MovieClip Frame 5
hull.gotoAndStop(id);
play();
Symbol 241 MovieClip Frame 51
gotoAndPlay (5);
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 10
play();
Symbol 258 MovieClip Frame 55
if (_root.endgame ne "yes") {
_parent.play();
gotoAndStop (1);
} else {
stop();
}
Symbol 259 MovieClip Frame 1
radius = boat._width - 20;
Symbol 260 MovieClip Frame 1
function get_angle(x1, y1, x2, y2, xspeed1, yspeed1, xspeed2, yspeed2, id) {
trace(_name + "andgle");
var yspeed = ((Math.abs(yspeed1) + Math.abs(yspeed2)) / 2);
var xspeed = ((Math.abs(xspeed1) + Math.abs(xspeed2)) / 2);
var angle = ((Math.atan2(y1 - y2, x1 - x2) * 180) / Math.PI);
angle = angle - 90;
if (angle < 0) {
angle = angle + 360;
}
eval (("_root.hover_" + id) + ".bounce")(angle, (yspeed * 3) + 1, (xspeed * 3) + 1);
angle = angle - 180;
if (angle < 0) {
angle = angle + 360;
}
bounce(angle, (yspeed * 3) + 1, (xspeed * 3) + 1);
}
stop();
Symbol 260 MovieClip Frame 2
if (Key.isDown(eval (("_root.player_" + id) + "_key_array")[3])) {
turn = turn_speed;
} else if (Key.isDown(eval (("_root.player_" + id) + "_key_array")[1])) {
turn = -turn_speed;
} else {
turn = 0;
}
angle = angle + turn;
if (angle < 0) {
angle = angle + 360;
}
if (360 < angle) {
angle = angle - 360;
}
if (_root.speed_limit < Math.abs(yspeed)) {
if (0 < yspeed) {
yspeed = _root.speed_limit;
} else {
yspeed = -_root.speed_limit;
}
}
if (_root.speed_limit < Math.abs(xspeed)) {
if (0 < xspeed) {
xspeed = _root.speed_limit;
} else {
xspeed = -_root.speed_limit;
}
}
temp_obj = eval ("_root.hover_" + other_id);
a = _y - temp_obj._y;
b = _x - temp_obj._x;
c = Math.sqrt((a * a) + (b * b));
if (((radius + temp_obj.radius) + 5) >= c) {
get_angle(_x, _y, temp_obj._x, temp_obj._y, temp_obj.xspeed, temp_obj.yspeed, xspeed, yspeed, other_id);
} else {
wall = check_wall();
if (wall eq "cool") {
if (Key.isDown(eval (("_root.player_" + id) + "_key_array")[2])) {
yspeed = yspeed + (acc * Math.cos(((((-angle) + 180) / 360) * 2) * Math.PI));
xspeed = xspeed + (acc * Math.sin(((((-angle) + 180) / 360) * 2) * Math.PI));
} else {
yspeed = yspeed - (yspeed * drag);
xspeed = xspeed - (xspeed * drag);
}
}
}
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = angle;
play();
Symbol 260 MovieClip Frame 3
gotoAndPlay (2);
Symbol 260 MovieClip Frame 5
hull.gotoAndStop(id);
play();
Symbol 260 MovieClip Frame 51
gotoAndPlay (5);
Symbol 261 MovieClip Frame 1
stop();
Symbol 261 MovieClip Frame 2
if (_root.possesion ne "-") {
var temp_obj = (("_root.score_panel.score.player_" + _root.possesion) + "_score");
temp_secs = int(getTimer() / 1000) - reset;
Set(temp_obj, Number(temp_score) + temp_secs);
if (eval (temp_obj) < 10) {
Set(temp_obj, "0" + eval (temp_obj));
}
if (eval (temp_obj) == _root.score_limit) {
gotoAndStop (1);
_root.end_game(_root.possesion);
}
}
play();
Symbol 261 MovieClip Frame 3
gotoAndPlay (2);