Frame 1
width = "640";
height = "480";
radius = "130";
shadow_radius = "130";
offset = "3";
center_x = width / "2";
center_y = height / "2";
rep_count = "10";
x_one = center_x;
input = (radius * radius) - ((x_one - center_x) * (x_one - center_x));
call("sqrt");
y_one = output + center_y;
x_two = center_x;
input = (radius * radius) - ((x_two - center_x) * (x_two - center_x));
call("sqrt");
y_two = ("-1" * output) + center_y;
setProperty("paddle_one", _x , x_one);
setProperty("paddle_one", _y , y_one);
setProperty("paddle_two", _x , x_two);
setProperty("paddle_two", _y , y_two);
rotation_steps = "72";
rotate_one = "180";
rotate_two = "0";
setProperty("paddle_one", _rotation , rotate_one);
setProperty("paddle_two", _rotation , rotate_two);
paddle_speed = "3";
AI_speed = "1";
ball_speed_increment = "0.05";
default_ball_speed = "1";
ball_speed = default_ball_speed;
x_speed = "0";
input = (ball_speed * ball_speed) - (x_speed * x_speed);
call("sqrt");
y_speed = output;
ball_x = "0";
ball_y = "0";
ball_direction = "1";
input = (ball_x * ball_x) + (ball_y * ball_y);
call("sqrt");
ball_pos_check = output;
fade_radius_min = radius - "9";
fade_radius_max = radius + "15";
ball_alpha = "100";
ball_scale = "100";
setProperty("ball", _x , ball_x + (width / "2"));
setProperty("ball", _y , ball_y + (height / "2"));
setProperty("ball", _xscale , "ball_scale");
setProperty("ball", _yscale , "ball_scale");
setProperty("ball", _alpha , ball_alpha);
paddle_one_range = "23";
paddle_two_range = "25";
affect_range = "0.2";
turn = "1";
key_hit_one = "0";
paddle_limit = radius - "7";
zone1 = center_x - paddle_limit;
zone2 = (center_x - paddle_limit) + ((paddle_limit * "2") / "3");
zone3 = (center_x + paddle_limit) - ((paddle_limit * "2") / "3");
zone4 = center_x + paddle_limit;
y_gap = "30";
ball_shadow_x = ball_x;
ball_shadow_y = ball_y;
shadow_scale = "60";
paddle_shadow_alpha = "60";
one_score = "0";
two_score = "0";
score_ani_length = "80";
score_one_x_pos = "568.1";
score_one_y_pos = "84.0";
score_one_x_increment = "4.6" / score_ani_length;
score_one_y_increment = "70.32" / score_ani_length;
score_two_x_pos = "497.2";
score_two_y_pos = "82.8";
score_two_x_increment = "5.2" / score_ani_length;
score_two_y_increment = "68.15" / score_ani_length;
score_ani_count = "0";
score_ani_flag = "0";
score_void_flag = "0";
loop = "1";
tune_counter = "0";
tune_counter_max = "1";
ball_pos_check_simulation = "0";
x_forecast = "0";
simulation_flag = "0";
stop();
shadow_one_x = x_one;
input = (shadow_radius * shadow_radius) - ((shadow_one_x - (center_x + offset)) * (shadow_one_x - (center_x + offset)));
call("sqrt");
shadow_one_y = output + center_y;
shadow_two_x = x_two;
input = (shadow_radius * shadow_radius) - ((shadow_two_x - (center_x + offset)) * (shadow_two_x - (center_x + offset)));
call("sqrt");
shadow_two_y = ("-1" * output) + center_y;
setProperty("shadow1", _x , shadow_one_x);
setProperty("shadow1", _y , shadow_one_y);
setProperty("shadow1", _xscale , shadow_scale);
setProperty("shadow1", _yscale , shadow_scale);
setProperty("shadow1", _rotation , rotate_one);
setProperty("shadow1", _alpha , paddle_shadow_alpha);
setProperty("shadow2", _x , shadow_two_x);
setProperty("shadow2", _y , shadow_two_y);
setProperty("shadow2", _xscale , shadow_scale);
setProperty("shadow2", _yscale , shadow_scale);
setProperty("shadow2", _rotation , rotate_two);
setProperty("shadow2", _alpha , paddle_shadow_alpha);
Frame 11
n = "1";
counter = "0";
while (counter < rep_count) {
n = n - (((n * n) - input) / ("2" * n));
counter = counter + "1";
}
output = n;
Frame 16
if (loop == "1") {
gotoAndPlay ("tunes");
loop = "0";
}
if (tune_counter == tune_counter_max) {
tune_counter = "0";
loop = "1";
}
tune_counter = tune_counter + "1";
if ((((fade_radius_max < ball_pos_check) and (score_ani_count == "0")) and (turn == "2")) and (score_void_flag == "0")) {
score_ani_flag = "1";
one_score = one_score + "1";
new_score_one_x_pos = score_one_x_pos + (score_one_x_increment * score_ani_length);
new_score_one_y_pos = score_one_y_pos - (score_one_y_increment * score_ani_length);
score_ani_count = "1";
}
if (score_ani_flag == "1") {
if ((score_ani_length >= score_ani_count) and ("0" < score_ani_count)) {
if ("9" >= one_score) {
if ((new_score_one_x_pos >= score_one_x_pos) and (score_one_y_pos >= new_score_one_y_pos)) {
score_one_x_pos = score_one_x_pos + score_one_x_increment;
score_one_y_pos = score_one_y_pos - score_one_y_increment;
setProperty("one_count", _x , score_one_x_pos);
setProperty("one_count", _y , score_one_y_pos);
}
score_ani_count = score_ani_count + "1";
} else {
one_score = "0";
two_score = "0";
gotoAndPlay ("game over");
}
} else {
score_ani_count = "0";
score_ani_flag = "0";
}
}
if ((((fade_radius_max < ball_pos_check) and (score_ani_count == "0")) and (turn == "1")) and (score_void_flag == "0")) {
score_ani_flag = "2";
two_score = two_score + "1";
new_score_two_x_pos = score_two_x_pos + (score_two_x_increment * score_ani_length);
new_score_two_y_pos = score_two_y_pos - (score_two_y_increment * score_ani_length);
score_ani_count = "1";
}
if (score_ani_flag == "2") {
if ((score_ani_length >= score_ani_count) and ("0" < score_ani_count)) {
if ("9" >= two_score) {
if ((new_score_two_x_pos >= score_two_x_pos) and (score_two_y_pos >= new_score_two_y_pos)) {
score_two_x_pos = score_two_x_pos + score_two_x_increment;
score_two_y_pos = score_two_y_pos - score_two_y_increment;
setProperty("two_count", _x , score_two_x_pos);
setProperty("two_count", _y , score_two_y_pos);
}
score_ani_count = score_ani_count + "1";
} else {
one_score = "0";
two_score = "0";
gotoAndPlay ("game over");
}
} else {
score_ani_count = "0";
score_ani_flag = "0";
}
}
score_void_flag = "0";
input = (ball_x * ball_x) + (ball_y * ball_y);
call("sqrt");
ball_pos_check = output;
if (ball_pos_check < fade_radius_min) {
ball_x = ball_x + (x_speed * ball_direction);
ball_y = ball_y + (y_speed * ball_direction);
ball_alpha = "100";
setProperty("ball", _x , ball_x + (width / "2"));
setProperty("ball", _y , ball_y + (height / "2"));
setProperty("ball", _xscale , ball_scale);
setProperty("ball", _yscale , ball_scale);
}
if ((fade_radius_max >= ball_pos_check) and (fade_radius_min < ball_pos_check)) {
ball_x = ball_x + (x_speed * ball_direction);
ball_y = ball_y + (y_speed * ball_direction);
ball_alpha = ball_alpha - "4";
setProperty("ball", _x , ball_x + (width / "2"));
setProperty("ball", _y , ball_y + (height / "2"));
setProperty("ball", _xscale , ball_scale);
setProperty("ball", _yscale , ball_scale);
setProperty("ball", _alpha , ball_alpha);
}
if (fade_radius_max < ball_pos_check) {
gotoAndPlay ("out");
if ((turn == "1") and ((ball_y + (height / "2")) < (center_y + y_gap))) {
ball_y = "0";
score_void_flag = "1";
stop();
gotoAndPlay (30);
}
if ((turn == "2") and ((center_y - y_gap) < (ball_y + (height / "2")))) {
ball_y = "0";
score_void_flag = "1";
stop();
gotoAndPlay (30);
}
simulation_flag = "1";
x_forecast = width / "2";
ball_speed = default_ball_speed;
ball_x = "0";
ball_y = "0";
ball_shadow_x = "0";
ball_shadow_y = "0";
x_speed = "0";
ball_alpha = "100";
setProperty("ball", _x , ball_x + (width / "2"));
setProperty("ball", _y , ball_y + (height / "2"));
setProperty("ball", _xscale , ball_scale);
setProperty("ball", _yscale , ball_scale);
setProperty("ball", _alpha , ball_alpha);
}
if ((fade_radius_min < ball_pos_check) and (ball_pos_check < (fade_radius_min + ball_speed))) {
ball_alpha = "100";
if (turn == "1") {
if (((((ball_x + (width / "2")) < (x_one + paddle_one_range)) and ((x_one - paddle_one_range) < (ball_x + (width / "2")))) and ((ball_y + (height / "2")) < (y_one + paddle_one_range))) and ((y_one - paddle_one_range) < (ball_y + (height / "2")))) {
gotoAndPlay ("hit");
ball_direction = ball_direction * "-1";
ball_speed = ball_speed + ball_speed_increment;
if ((zone3 < x_one) and (x_one < zone4)) {
x_speed = x_speed + (random("300") / "650");
if (x_speed < "0") {
x_speed = x_speed * "-1";
}
} else if ((x_one < zone2) and (zone1 < x_one)) {
x_speed = x_speed - (random("300") / "650");
if ("0" < x_speed) {
x_speed = x_speed * "-1";
}
} else {
x_speed = x_speed - (random("300") / "650");
while (("0.25" < x_speed) or (x_speed < "-0.25")) {
if (x_speed < (ball_speed * "-1")) {
x_speed = "ball_speed";
}
x_speed = x_speed - (random("300") / "650");
}
}
turn = "2";
simulation_flag = "0";
x_forecast = "0";
}
} else if (((((ball_x + (width / "2")) < (x_two + paddle_two_range)) and ((x_two - paddle_two_range) < (ball_x + (width / "2")))) and ((ball_y + (height / "2")) < (y_two + paddle_two_range))) and ((y_two - paddle_two_range) < (ball_y + (height / "2")))) {
gotoAndPlay ("hit");
ball_direction = ball_direction * "-1";
ball_speed = ball_speed + ball_speed_increment;
if ((zone3 < x_one) and (x_one < zone4)) {
x_speed = x_speed - (random("300") / "650");
if ("0" < x_speed) {
x_speed = x_speed * "-1";
}
} else if ((x_one < zone2) and (zone1 < x_one)) {
x_speed = x_speed + (random("300") / "650");
if (x_speed < "0") {
x_speed = x_speed * "-1";
}
} else {
x_speed = x_speed - (random("300") / "650");
while (("0.25" < x_speed) or (x_speed < "-0.25")) {
if (x_speed < (ball_speed * "-1")) {
x_speed = "ball_speed";
}
x_speed = x_speed - (random("300") / "650");
}
}
turn = "1";
}
}
if ((x_speed >= (ball_speed - "0.05")) or (((ball_speed - "0.05") * "-1") >= x_speed)) {
x_speed = "0";
}
input = (ball_speed * ball_speed) - (x_speed * x_speed);
call("sqrt");
y_speed = output;
ball_shadow_x_speed = (x_speed / "1.2") * ball_direction;
ball_shadow_y_speed = (y_speed / "1.2") * ball_direction;
ball_shadow_x = ball_shadow_x + ball_shadow_x_speed;
ball_shadow_y = ball_shadow_y + ball_shadow_y_speed;
setProperty("ball_shadow", _x , ball_shadow_x + (width / "2"));
setProperty("ball_shadow", _y , ball_shadow_y + (height / "2"));
setProperty("ball_shadow", _xscale , ball_scale);
setProperty("ball_shadow", _yscale , ball_scale);
setProperty("ball_shadow", _alpha , ball_alpha);
sim_count = "3";
if ((turn == "2") and (simulation_flag == "0")) {
input = (ball_speed * ball_speed) - (x_speed * x_speed);
call("sqrt");
y_speed_sim = output;
while (ball_pos_check_simulation < fade_radius_min) {
input = ((ball_x + ((x_speed * sim_count) * ball_direction)) * (ball_x + ((x_speed * sim_count) * ball_direction))) + ((ball_y + ((y_speed_sim * sim_count) * ball_direction)) * (ball_y + ((y_speed_sim * sim_count) * ball_direction)));
call("sqrt");
ball_pos_check_simulation = output;
x_forecast = (((ball_x + ((x_speed * sim_count) * ball_direction)) + (width / "2")) + (random("3000") / "50")) - "30";
sim_count = sim_count + "10";
}
ball_pos_check_simulation = "0";
simulation_flag = "1";
}
if ((turn == "2") and (simulation_flag == "1")) {
if (x_two < x_forecast) {
if ((center_x + paddle_limit) >= x_two) {
x_two = x_two + AI_speed;
if ((center_x + paddle_limit) < x_two) {
x_two = center_x + paddle_limit;
}
rotate_two = rotate_two + (rotation_steps / (paddle_limit / AI_speed));
if (("0" + rotation_steps) < rotate_two) {
rotate_two = "0" + rotation_steps;
}
input = (radius * radius) - ((x_two - center_x) * (x_two - center_x));
call("sqrt");
y_two = ("-1" * output) + center_y;
setProperty("paddle_two", _x , x_two);
setProperty("paddle_two", _y , y_two);
setProperty("paddle_two", _xscale , "100");
setProperty("paddle_two", _yscale , "100");
setProperty("paddle_two", _rotation , rotate_two);
if (x_forecast < x_two) {
simulation_flag = "-1";
}
}
} else if (x_two >= (center_x - paddle_limit)) {
x_two = x_two - AI_speed;
if (x_two < (center_x - paddle_limit)) {
x_two = center_x - paddle_limit;
}
rotate_two = rotate_two - (rotation_steps / (paddle_limit / AI_speed));
if (rotate_two < (-rotation_steps)) {
rotate_two = -rotation_steps;
}
input = (radius * radius) - ((x_two - center_x) * (x_two - center_x));
call("sqrt");
y_two = ("-1" * output) + center_y;
setProperty("paddle_two", _x , x_two);
setProperty("paddle_two", _y , y_two);
setProperty("paddle_two", _xscale , "100");
setProperty("paddle_two", _yscale , "100");
setProperty("paddle_two", _rotation , rotate_two);
if (x_forecast >= x_two) {
simulation_flag = "-1";
}
}
}
shadow_one_x = x_one;
input = (shadow_radius * shadow_radius) - ((shadow_one_x - (center_x + offset)) * (shadow_one_x - (center_x + offset)));
call("sqrt");
shadow_one_y = output + center_y;
shadow_two_x = x_two;
input = (shadow_radius * shadow_radius) - ((shadow_two_x - (center_x + offset)) * (shadow_two_x - (center_x + offset)));
call("sqrt");
shadow_two_y = ("-1" * output) + center_y;
setProperty("shadow1", _x , shadow_one_x);
setProperty("shadow1", _y , shadow_one_y);
setProperty("shadow1", _xscale , shadow_scale);
setProperty("shadow1", _yscale , shadow_scale);
setProperty("shadow1", _rotation , rotate_one);
setProperty("shadow1", _alpha , paddle_shadow_alpha);
setProperty("shadow2", _x , shadow_two_x);
setProperty("shadow2", _y , shadow_two_y);
setProperty("shadow2", _xscale , shadow_scale);
setProperty("shadow2", _yscale , shadow_scale);
setProperty("shadow2", _rotation , rotate_two);
setProperty("shadow2", _alpha , paddle_shadow_alpha);
Frame 17
gotoAndPlay (16);
shadow_one_x = x_one;
input = (shadow_radius * shadow_radius) - ((shadow_one_x - (center_x + offset)) * (shadow_one_x - (center_x + offset)));
call("sqrt");
shadow_one_y = output + center_y;
shadow_two_x = x_two;
input = (shadow_radius * shadow_radius) - ((shadow_two_x - (center_x + offset)) * (shadow_two_x - (center_x + offset)));
call("sqrt");
shadow_two_y = ("-1" * output) + center_y;
setProperty("shadow1", _x , shadow_one_x);
setProperty("shadow1", _y , shadow_one_y);
setProperty("shadow1", _xscale , shadow_scale);
setProperty("shadow1", _yscale , shadow_scale);
setProperty("shadow1", _rotation , rotate_one);
setProperty("shadow1", _alpha , paddle_shadow_alpha);
setProperty("shadow2", _x , shadow_two_x);
setProperty("shadow2", _y , shadow_two_y);
setProperty("shadow2", _xscale , shadow_scale);
setProperty("shadow2", _yscale , shadow_scale);
setProperty("shadow2", _rotation , rotate_two);
setProperty("shadow2", _alpha , paddle_shadow_alpha);
Frame 150
gotoAndPlay ("loopesque");
Frame 152
gotoAndPlay ("loopesque");
Frame 154
gotoAndPlay ("loopesque");
Frame 156
gotoAndPlay ("loopesque");
Frame 157
stop();
stopAllSounds();
Symbol 18 Button
on (release) {
gotoAndPlay (2);
}
Symbol 23 Button
on (release) {
getURL ("http://www.games2go.co.uk", "_blank");
}
Symbol 26 Button
on (release) {
getURL ("http://www.games2go.co.uk/freecontent.php", "_blank");
}
Symbol 29 Button
on (keyPress "d") {
if ((center_x + paddle_limit) >= x_two) {
x_two = x_two + paddle_speed;
if ((center_x + paddle_limit) < x_two) {
x_two = center_x + paddle_limit;
}
rotate_two = rotate_two + (rotation_steps / (paddle_limit / paddle_speed));
if (("0" + rotation_steps) < rotate_two) {
rotate_two = "0" + rotation_steps;
}
input = (radius * radius) - ((x_two - center_x) * (x_two - center_x));
call("sqrt");
y_two = ("-1" * output) + center_y;
setProperty("paddle_two", _x , x_two);
setProperty("paddle_two", _y , y_two);
setProperty("paddle_two", _xscale , "100");
setProperty("paddle_two", _yscale , "100");
setProperty("paddle_two", _rotation , rotate_two);
}
}
on (keyPress "a") {
if (x_two >= (center_x - paddle_limit)) {
x_two = x_two - paddle_speed;
if (x_two < (center_x - paddle_limit)) {
x_two = center_x - paddle_limit;
}
rotate_two = rotate_two - (rotation_steps / (paddle_limit / paddle_speed));
if (rotate_two < (-rotation_steps)) {
rotate_two = -rotation_steps;
}
input = (radius * radius) - ((x_two - center_x) * (x_two - center_x));
call("sqrt");
y_two = ("-1" * output) + center_y;
setProperty("paddle_two", _x , x_two);
setProperty("paddle_two", _y , y_two);
setProperty("paddle_two", _xscale , "100");
setProperty("paddle_two", _yscale , "100");
setProperty("paddle_two", _rotation , rotate_two);
}
}
Symbol 31 Button
on (keyPress "<Right>") {
if ((center_x + paddle_limit) >= x_one) {
x_one = x_one + paddle_speed;
if ((center_x + paddle_limit) < x_one) {
x_one = center_x + paddle_limit;
}
rotate_one = rotate_one - (rotation_steps / (paddle_limit / paddle_speed));
if (rotate_one < ("180" - rotation_steps)) {
rotate_one = "180" - rotation_steps;
}
input = (radius * radius) - ((x_one - center_x) * (x_one - center_x));
call("sqrt");
y_one = output + center_y;
setProperty("paddle_one", _x , x_one);
setProperty("paddle_one", _y , y_one);
setProperty("paddle_one", _xscale , "100");
setProperty("paddle_one", _yscale , "100");
setProperty("paddle_one", _rotation , rotate_one);
if (x_one < (center_x + paddle_limit)) {
if (key_hit_one >= "0") {
paddle_one_range_x = paddle_one_range_x - affect_range;
paddle_one_range_y = paddle_one_range_y + affect_range;
} else if (key_hit_one < "0") {
paddle_one_range_x = paddle_one_range_x + affect_range;
paddle_one_range_y = paddle_one_range_y - affect_range;
}
key_hit_one = key_hit_one + "1";
}
}
}
on (keyPress "<Left>") {
if (x_one >= (center_x - paddle_limit)) {
x_one = x_one - paddle_speed;
if (x_one < (center_x - paddle_limit)) {
x_one = center_x - paddle_limit;
}
rotate_one = rotate_one + (rotation_steps / (paddle_limit / paddle_speed));
if (("180" + rotation_steps) < rotate_one) {
rotate_one = "180" + rotation_steps;
}
input = (radius * radius) - ((x_one - center_x) * (x_one - center_x));
call("sqrt");
y_one = output + center_y;
setProperty("paddle_one", _x , x_one);
setProperty("paddle_one", _y , y_one);
setProperty("paddle_one", _xscale , "100");
setProperty("paddle_one", _yscale , "100");
setProperty("paddle_one", _rotation , rotate_one);
if ((center_x - paddle_limit) < y_one) {
if ("0" >= key_hit_one) {
paddle_one_range_x = paddle_one_range_x - affect_range;
} else if ("0" < key_hit_one) {
paddle_one_range_x = paddle_one_range_x + affect_range;
}
key_hit_one = key_hit_one - "1";
}
}
}
Symbol 34 MovieClip Frame 80
stop();
Symbol 47 MovieClip Frame 80
stop();
if (two_score == "0") {
play();
}
Symbol 47 MovieClip Frame 150
stop();
Symbol 48 MovieClip Frame 80
stop();
if (two_score == "0") {
play();
}
Symbol 48 MovieClip Frame 150
stop();
Symbol 50 MovieClip Frame 119
stop();