Frame 1
startDrag ("mousetracker", true);
ball_dir_y = "down";
ball_speed_y = "13";
ball_speed_x = "8";
ball_dir_x = "none";
wins = "0";
losses = "0";
difficulty = "7.2";
beenhere = "0";
Frame 2
ball_speed_y = "13";
ball_speed_x = "8";
Frame 3
mousetracker_x = getProperty("mousetracker", _x);
mousetracker_y = getProperty("mousetracker", _y);
paddle1_x = getProperty("paddle1", _x);
paddle3_y = getProperty("paddle3", _y);
ball_x = getProperty("ball", _x);
ball_y = getProperty("ball", _y);
if ((paddle1_x < mousetracker_x) and ("450" >= paddle1_x)) {
setProperty("paddle1", _x , paddle1_x + ((mousetracker_x - paddle1_x) / "2"));
} else if ((mousetracker_x < paddle1_x) and (paddle1_x >= "70")) {
setProperty("paddle1", _x , paddle1_x - ((paddle1_x - mousetracker_x) / "2"));
}
if ((paddle3_y < mousetracker_y) and ("315" >= paddle3_y)) {
setProperty("paddle3", _y , paddle3_y + ((mousetracker_y - paddle3_y) / "2"));
} else if ((mousetracker_y < paddle3_y) and (paddle3_y >= "90")) {
setProperty("paddle3", _y , paddle3_y - ((paddle3_y - mousetracker_y) / "2"));
}
paddle2_x = getProperty("paddle2", _x);
paddle4_y = getProperty("paddle4", _y);
if ((paddle2_x < ball_x) and ("465" >= paddle2_x)) {
setProperty("paddle2", _x , paddle2_x + ((ball_x - paddle2_x) / (difficulty + (random("20") / "10"))));
} else if ((ball_x < paddle2_x) and (paddle2_x >= "40")) {
setProperty("paddle2", _x , paddle2_x - ((paddle2_x - ball_x) / (difficulty + (random("20") / "10"))));
}
if ((paddle4_y < ball_y) and ("300" >= paddle4_y)) {
setProperty("paddle4", _y , paddle4_y + ((ball_y - paddle4_y) / ((difficulty + (random("20") / "10")) - "3")));
} else if ((ball_y < paddle4_y) and (paddle4_y >= "85")) {
setProperty("paddle4", _y , paddle4_y - ((paddle4_y - ball_y) / ((difficulty + (random("20") / "10")) - "3")));
}
if ((((("340" < ball_y) and (ball_y < "355")) and (ball_x < (paddle1_x + "50"))) and ((paddle1_x - "50") < ball_x)) and ((ball_dir_y eq "down") or (ball_dir_y eq "none"))) {
tellTarget ("sound") {
gotoAndPlay (2);
};
ball_dir_y = "up";
if (((paddle1_x + "25") < ball_x) and (ball_x < (paddle1_x + "50"))) {
ball_speed_x = "8";
ball_dir_x = "right";
} else if ((ball_x >= (paddle1_x + "3")) and ((paddle1_x + "25") >= ball_x)) {
ball_speed_x = "4";
ball_dir_x = "right";
} else if ((ball_x >= (paddle1_x + "25")) and ((paddle1_x + "35") >= ball_x)) {
ball_speed_x = "6";
ball_dir_x = "right";
}
if (((paddle1_x - "25") >= ball_x) and ((paddle1_x - "50") < ball_x)) {
ball_speed_x = "8";
ball_dir_x = "left";
} else if (((paddle1_x - "3") >= ball_x) and (ball_x >= (paddle1_x - "25"))) {
ball_speed_x = "4";
ball_dir_x = "left";
} else if (((paddle1_x - "25") >= ball_x) and ((paddle1_x - "35") < ball_x)) {
ball_speed_x = "6";
ball_dir_x = "left";
}
if (((paddle1_x - "2") < ball_x) and (ball_x < (paddle1_x + "2"))) {
ball_speed_x = "0";
ball_dir_x = "none";
}
}
if (((((ball_y < "70") and ("56" < ball_y)) and (ball_x < (paddle2_x + "50"))) and ((paddle2_x - "50") < ball_x)) and ((ball_dir_y eq "up") or (ball_dir_y eq "none"))) {
ball_dir_y = "down";
tellTarget ("sound") {
gotoAndPlay (2);
};
}
if ((((("500" < ball_x) and (ball_x < "520")) and (ball_y < (paddle3_y + "50"))) and ((paddle3_y - "50") < ball_y)) and ((ball_dir_x eq "right") or (ball_dir_x eq "none"))) {
ball_dir_x = "left";
if (((paddle3_y - "35") >= ball_y) and ((paddle3_y - "50") < ball_y)) {
ball_speed_y = "15";
ball_dir_y = "up";
} else if (((paddle3_y - "4") >= ball_y) and ((paddle3_y - "25") >= ball_y)) {
ball_dir_y = "up";
ball_speed_y = "12";
} else if (((paddle3_y - "25") >= ball_y) and ((paddle3_y - "35") < ball_y)) {
ball_dir_y = "up";
ball_speed_y = "13";
}
if ((ball_y >= (paddle3_y + "35")) and (ball_y < (paddle3_y + "50"))) {
ball_speed_y = "15";
ball_dir_y = "down";
} else if ((ball_y >= (paddle3_y + "4")) and ((paddle3_y + "25") >= ball_y)) {
ball_dir_y = "down";
ball_speed_y = "12";
} else if ((ball_y >= (paddle3_y + "25")) and (ball_y < (paddle3_y + "35"))) {
ball_dir_y = "down";
ball_speed_y = "13";
}
if (((paddle3_y - "5") < ball_y) and (ball_y < (paddle3_y + "5"))) {
ball_speed_y = "3";
ball_speed_x = "13";
}
tellTarget ("sound") {
gotoAndPlay (2);
};
}
if ((((("72" < ball_x) and (ball_x < "90")) and (ball_y < (paddle4_y + "50"))) and ((paddle4_y - "50") < ball_y)) and (ball_dir_x eq "left")) {
ball_dir_x = "right";
tellTarget ("sound") {
gotoAndPlay (2);
};
}
if (ball_dir_y eq "up") {
setProperty("ball", _y , ball_y - ball_speed_y);
} else if (ball_dir_y eq "down") {
setProperty("ball", _y , ball_y + ball_speed_y);
}
if (ball_dir_x eq "right") {
setProperty("ball", _x , ball_x + ball_speed_x);
} else if (ball_dir_x eq "left") {
setProperty("ball", _x , ball_x - ball_speed_x);
}
if (((wins >= "10") or (losses >= "10")) and (beenhere == "0")) {
gotoAndStop (14);
}
if (("0" >= ball_y) and ("0" >= ball_x)) {
gotoAndStop (6);
}
if (("0" >= ball_y) and (ball_x >= "550")) {
gotoAndStop (9);
}
if ((ball_y >= "390") and (ball_x >= "550")) {
gotoAndStop (9);
}
if ((ball_y >= "390") and ("0" >= ball_x)) {
gotoAndStop (6);
}
if ((ball_y >= "390") and ((ball_x >= "0") and ("550" >= ball_x))) {
gotoAndStop (9);
}
if (("0" >= ball_y) and ((ball_x >= "0") and ("550" >= ball_x))) {
gotoAndStop (6);
}
Frame 4
gotoAndPlay (3);
Frame 6
wins = wins + "1";
ball_dir_x = "none";
ball_speed_x = "0";
Frame 9
losses = losses + "1";
ball_dir_x = "none";
ball_speed_x = "0";
Frame 14
beenhere = "1";
Symbol 23 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 2
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 2
gotoAndStop (1);
Symbol 29 Button
on (release) {
difficulty = "7.2";
tellTarget ("diff") {
gotoAndStop ("easy");
}
}
Symbol 32 Button
on (release) {
difficulty = "5.5";
tellTarget ("/diff") {
gotoAndStop ("hard");
}
}
Symbol 38 Button
on (release) {
gotoAndPlay (2);
}