Frame 1
stop();
Frame 2
p2score = "0";
p1score = "0";
ballsize = "8";
speedx = "-4";
speedy = "2";
gameleft = "0";
gameright = "400";
gametop = "12";
gamebottom = "284";
movespeed = "1";
pause = "30";
Frame 3
call("action");
if (p1score == "9") {
gotoAndPlay (7);
} else if (p2score == "9") {
gotoAndPlay (68);
}
if ((getProperty("/ball", _x) < "240") or (speedx < "0")) {
if (getProperty("/paddle2", _y) < "148") {
setProperty("/paddle2", _y , getProperty("/paddle2", _y) + "1");
} else if ("148" < getProperty("/paddle2", _y)) {
setProperty("/paddle2", _y , getProperty("/paddle2", _y) - "1");
} else {
setProperty("/paddle2", _y , "148");
}
} else if ("1" < random("100")) {
if (getProperty("/ball", _y) < getProperty("/paddle2", _y)) {
setProperty("/paddle2", _y , (getProperty("/paddle2", _y) - random("8")) - "1");
} else {
setProperty("/paddle2", _y , (getProperty("/paddle2", _y) + random("8")) + "1");
}
}
movespeed = getProperty("/paddle3", _y) - "148";
setProperty("/paddle1", _y , getProperty("/paddle1", _y) + (movespeed / "20"));
if ("253" < getProperty("/paddle2", _y)) {
setProperty("/paddle2", _y , "253");
} else if (getProperty("/paddle2", _y) < "44") {
setProperty("/paddle2", _y , "44");
}
if ("253" < getProperty("/paddle1", _y)) {
setProperty("/paddle1", _y , "253");
} else if (getProperty("/paddle1", _y) < "44") {
setProperty("/paddle1", _y , "44");
}
Frame 4
call("action");
gotoAndPlay (3);
Frame 5
setProperty("/ball", _x , getProperty("/ball", _x) + speedx);
setProperty("/ball", _y , getProperty("/ball", _y) + speedy);
if (((gamebottom - ballsize) < getProperty("/ball", _y)) or (getProperty("/ball", _y) < (gametop + ballsize))) {
speedy = -speedy;
if ((!random("8")) and ((pause == "30") or (pause == "0"))) {
speedx = -speedx;
}
if ((pause == "30") or (pause == "0")) {
tellTarget ("/sound") {
gotoAndPlay ("pong");
};
}
}
if (getProperty("/ball", _x) < gameleft) {
if (pause) {
pause = pause - "1";
} else {
p1score = p1score + "1";
tellTarget ("/p1score") {
nextFrame();
};
call("nextball");
}
} else if (gameright < getProperty("/ball", _x)) {
if (pause) {
pause = pause - "1";
} else {
p2score = p2score + "1";
tellTarget ("/p2score") {
nextFrame();
};
call("nextball");
}
}
if ((((("12" < getProperty("/ball", _x)) and (getProperty("/ball", _x) < "18")) and ((getProperty("/paddle1", _y) - "30") < getProperty("/ball", _y))) and (getProperty("/ball", _y) < (getProperty("/paddle1", _y) + "30"))) or (((("382" < getProperty("/ball", _x)) and (getProperty("/ball", _x) < "388")) and ((getProperty("/paddle2", _y) - "30") < getProperty("/ball", _y))) and (getProperty("/ball", _y) < (getProperty("/paddle2", _y) + "30")))) {
speedx = -speedx;
if (!random("8")) {
speedy = -speedy;
}
tellTarget ("/sound") {
gotoAndPlay ("ping");
};
}
startDrag ("/paddle3", false, "-10", "0", "-10", "300");
Frame 6
speedx = -speedx;
if (random("4") < "1") {
speedy = -speedy;
}
setProperty("/ball", _x , "200");
setProperty("/ball", _y , "148");
pause = "30";
Frame 67
gotoAndStop (1);
Frame 127
gotoAndStop (1);
Symbol 3 Button
on (release) {
stopAllSounds();
gotoAndPlay (2);
}
Symbol 6 Button
on (release) {
getURL ("http://www.neave.com/webgames/", "_blank");
}
Symbol 8 Button
on (press) {
fscommand ("quit");
}
Symbol 10 Button
on (press) {
gotoAndStop (1);
}
Symbol 13 MovieClip Frame 1
stop();
Symbol 13 MovieClip Frame 5
stop();
Symbol 13 MovieClip Frame 10
stop();
Symbol 24 MovieClip Frame 1
stop();