Frame 2
ifFrameLoaded (155) {
gotoAndPlay (4);
}
Frame 3
gotoAndPlay (2);
Frame 69
players = "1";
setProperty("/playerpick", _x , "559");
Frame 80
stop();
Frame 96
setProperty("/scorecard", _visible , "0");
if (players == "2") {
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
p1done = "0";
p2done = "0";
pturn = "1";
p1_h1 = "-";
p2_h1 = "-";
p1_h2 = "-";
p2_h2 = "-";
p1_h3 = "-";
p2_h3 = "-";
p1_h4 = "-";
p2_h4 = "-";
p1_h5 = "-";
p2_h5 = "-";
p1_h6 = "-";
p2_h6 = "-";
p1_h7 = "-";
p2_h7 = "-";
p1_h8 = "-";
p2_h8 = "-";
p1_h9 = "-";
p2_h9 = "-";
move = "0";
shotspeed = "5";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
Frame 97
startDrag ("/ship", true);
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.2") and ((-"0.2") < xmov)) and ((ymov < "0.2") and ((-"0.2") < ymov))) {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (ballx < "65") {
setProperty("/ball", _x , "100");
setProperty("/ball", _y , "205");
setProperty("/aimer", _x , "100");
setProperty("/aimer", _y , "205");
p1_h1 = p1_h1 + "1";
stopped = "1";
}
} else if (pturn == "2") {
if (((xmov2 < "0.2") and ((-"0.2") < xmov2)) and ((ymov2 < "0.2") and ((-"0.2") < ymov2))) {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx2) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (ballx2 < "65") {
setProperty("/ball2", _x , "100");
setProperty("/ball2", _y , "205");
setProperty("/aimer2", _x , "100");
setProperty("/aimer2", _y , "205");
p2_h1 = p2_h1 + "1";
stopped = "1";
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h1 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h1 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "6") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (99);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (99);
}
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (99);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (99);
}
if (stopped == "1") {
stopped = "0";
inthehole = "0";
move = "0";
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
if (p1done == "1") {
gotoAndPlay (99);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
p1_h1 = p1_h1 + "1";
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (99);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h1 = p1_h1 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h1 = p2_h1 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
}
Frame 98
gotoAndPlay (97);
Frame 102
startDrag ("/ship", true);
setProperty("/ball", _x , "99.1");
setProperty("/ball", _y , "208.8");
setProperty("/aimer", _x , "96.5");
setProperty("/aimer", _y , "209.8");
setProperty("/ball2", _x , "99.1");
setProperty("/ball2", _y , "208.8");
setProperty("/aimer2", _x , "96.5");
setProperty("/aimer2", _y , "209.8");
if (players == "2") {
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
pturn = "1";
p1_h2 = "-";
p2_h2 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
wall1x = getProperty("/wall1", _x);
wall1y = getProperty("/wall1", _y);
wall1width = getProperty("/wall1", _width) / "2";
wall1height = getProperty("/wall1", _height) / "2";
Frame 103
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.2") and ((-"0.2") < xmov)) and ((ymov < "0.2") and ((-"0.2") < ymov))) {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall1x - wall1width) - "5") < ballx) and (ballx < wall1x)) and (((wall1y - wall1height) < bally) and (bally < (wall1y + wall1height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall1x - wall1width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall1x + wall1width) + "5")) and (wall1x < ballx)) and (((wall1y - wall1height) < bally) and (bally < (wall1y + wall1height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall1x + wall1width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall1x + wall1width) + "5")) and (wall1x < ballx)) and (((wall1y - wall1height) - "5") < bally)) and (bally < ((wall1y - wallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall1y - wall1height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (ballx < "65") {
setProperty("/ball", _x , "99.1");
setProperty("/ball", _y , "208.8");
setProperty("/aimer", _x , "96.5");
setProperty("/aimer", _y , "209.8");
p1_h2 = p1_h2 + "1";
stopped = "1";
}
} else if (pturn == "2") {
if (((xmov2 < "0.2") and ((-"0.2") < xmov2)) and ((ymov2 < "0.2") and ((-"0.2") < ymov2))) {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx2) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall1x - wall1width) - "5") < ballx2) and (ballx2 < wall1x)) and (((wall1y - wall1height) < bally2) and (bally2 < (wall1y + wall1height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall1x - wall1width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall1x + wall1width) + "5")) and (wall1x < ballx2)) and (((wall1y - wall1height) < bally2) and (bally2 < (wall1y + wall1height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall1x + wall1width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall1x + wall1width) + "5")) and (wall1x < ballx2)) and (((wall1y - wall1height) - "5") < bally2)) and (bally2 < ((wall1y - wallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall1y - wall1height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (ballx2 < "65") {
setProperty("/ball2", _x , "99.1");
setProperty("/ball2", _y , "208.8");
setProperty("/aimer2", _x , "96.5");
setProperty("/aimer2", _y , "209.8");
p2_h2 = p2_h2 + "1";
stopped = "1";
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h2 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h2 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "6") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (105);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (105);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
if (p1done == "1") {
gotoAndPlay (105);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
p1_h2 = p1_h2 + "1";
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (105);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h2 = p1_h2 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h2 = p2_h2 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 104
gotoAndPlay (103);
Frame 108
startDrag ("/ship", true);
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "60.6");
setProperty("/ball", _y , "331.9");
setProperty("/aimer", _x , "60");
setProperty("/aimer", _y , "331.7");
setProperty("/ball2", _x , "60.6");
setProperty("/ball2", _y , "331.9");
setProperty("/aimer2", _x , "60");
setProperty("/aimer2", _y , "331.7");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
setProperty("/aimer2", _visible , "0");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/aimer", _visible , "1");
pturn = "1";
p1_h3 = "-";
p2_h3 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
wall3x = getProperty("/wall3", _x);
wall3y = getProperty("/wall3", _y);
wall3width = getProperty("/wall3", _width) / "2";
wall3height = getProperty("/wall3", _height) / "2";
topwall2x = getProperty("/topwall2", _x);
topwall2y = getProperty("/topwall2", _y);
topwall2width = getProperty("/topwall2", _width) / "2";
topwall2height = getProperty("/topwall2", _height) / "2";
botwall2x = getProperty("/botwall2", _x);
botwall2y = getProperty("/botwall2", _y);
botwall2width = getProperty("/botwall2", _width) / "2";
botwall2height = getProperty("/botwall2", _height) / "2";
wall2x = getProperty("/wall2", _x);
wall2y = getProperty("/wall2", _y);
wall2width = getProperty("/wall2", _width) / "2";
wall2height = getProperty("/wall2", _height) / "2";
botrightx = "567";
botrighty = "371";
toprightx = "573";
toprighty = "127";
Frame 109
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((topwall2x - topwall2width) < ballx) and (ballx < (topwall2x + topwall2width))) and (((topwall2y - topwall2height) - "5") < bally)) and (bally < ((topwall2y + topwall2height) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwall2y - topwall2height) - "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((botwall2x - botwall2width) < ballx) and (ballx < (botwall2x + botwall2width))) and (bally < ((botwall2y + botwall2height) + "5"))) and (((botwall2y - botwall2height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwall2y + botwall2height) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx < ((wall3x + wall3width) + "5")) and (((wall3y - wall3height) < bally) and (bally < (wall3y + wall3height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx < ((wall2x + wall2width) + "5")) and (((wall2y - wall2height) < bally) and (bally < (wall2y + wall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall2x + wall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (botrightx < ballx) {
botright_diff = ballx - botrightx;
if ((botrighty - botright_diff) < bally) {
xmovtemp = xmov;
ymovtemp = ymov;
if ((xmov < "0") and (ymov < "0")) {
ymov = xmovtemp;
xmov = ymovtemp * (-"1");
} else if (("0" < xmov) and ("0" < ymov)) {
ymov = xmovtemp * (-"1");
xmov = ymovtemp * (-"1");
} else if ((xmov < "0") and ("0" < ymov)) {
ymov = xmovtemp * (-"1");
xmov = ymovtemp * (-"1");
} else {
ymov = xmovtemp * (-"1");
xmov = ymovtemp;
}
setProperty("/ball", _y , bally - "5");
setProperty("/ball", _x , ballx - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
if (toprightx < ballx) {
topright_diff = ballx - toprightx;
if (bally < (toprighty + topright_diff)) {
xmovtemp = xmov;
ymovtemp = ymov;
ymov = xmovtemp;
xmov = ymovtemp;
setProperty("/ball", _y , bally + "5");
setProperty("/ball", _x , ballx - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
if (ballx < "20") {
setProperty("/ball", _x , "60.6");
setProperty("/ball", _y , "318.9");
setProperty("/aimer", _x , "60");
setProperty("/aimer", _y , "317");
p1_h3 = p1_h3 + "1";
stopped = "1";
}
} else if (pturn == "2") {
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((topwall2x - topwall2width) < ballx2) and (ballx2 < (topwall2x + topwall2width))) and (((topwall2y - topwall2height) - "5") < bally2)) and (bally2 < ((topwall2y + topwall2height) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwall2y - topwall2height) - "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((botwall2x - botwall2width) < ballx2) and (ballx2 < (botwall2x + botwall2width))) and (bally2 < ((botwall2y + botwall2height) + "5"))) and (((botwall2y - botwall2height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwall2y + botwall2height) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx2) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx2 < ((wall3x + wall3width) + "5")) and (((wall3y - wall3height) < bally2) and (bally2 < (wall3y + wall3height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx2 < ((wall2x + wall2width) + "5")) and (((wall2y - wall2height) < bally2) and (bally2 < (wall2y + wall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall2x + wall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (botrightx < ballx2) {
botright_diff = ballx2 - botrightx;
if ((botrighty - botright_diff) < bally2) {
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
xmov2temp = xmov2;
ymov2temp = ymov2;
if ((xmov2 < "0") and (ymov2 < "0")) {
ymov2 = xmov2temp;
xmov2 = ymov2temp * (-"1");
} else if (("0" < xmov2) and ("0" < ymov2)) {
ymov2 = xmov2temp * (-"1");
xmov2 = ymov2temp * (-"1");
} else if ((xmov2 < "0") and ("0" < ymov2)) {
ymov2 = xmov2temp * (-"1");
xmov2 = ymov2temp * (-"1");
} else {
ymov2 = xmov2temp * (-"1");
xmov2 = ymov2temp;
}
setProperty("/ball2", _y , bally2 - "5");
setProperty("/ball2", _x , ballx2 - "5");
}
}
if (toprightx < ballx2) {
topright_diff = ballx2 - toprightx;
if (bally2 < (toprighty + topright_diff)) {
xmov2temp = xmov2;
ymov2temp = ymov2;
ymov2 = xmov2temp;
xmov2 = ymov2temp;
setProperty("/ball2", _y , bally2 + "5");
setProperty("/ball2", _x , ballx2 - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
if (ballx2 < "20") {
setProperty("/ball2", _x , "60.6");
setProperty("/ball2", _y , "318.9");
setProperty("/aimer2", _x , "60");
setProperty("/aimer2", _y , "317");
p2_h3 = p2_h3 + "1";
stopped = "1";
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h3 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h3 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (111);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (111);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
if (p1done == "1") {
gotoAndPlay (111);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
p1_h3 = p1_h3 + "1";
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (111);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h3 = p1_h3 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h3 = p2_h3 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 110
gotoAndPlay (109);
Frame 114
startDrag ("/ship", true);
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "60.6");
setProperty("/ball", _y , "318.9");
setProperty("/aimer", _x , "60");
setProperty("/aimer", _y , "318");
setProperty("/ball2", _x , "60.6");
setProperty("/ball2", _y , "318.9");
setProperty("/aimer2", _x , "60");
setProperty("/aimer2", _y , "318");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
pturn = "1";
p1_h4 = "-";
p2_h4 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
wall3x = getProperty("/wall3", _x);
wall3y = getProperty("/wall3", _y);
wall3width = getProperty("/wall3", _width) / "2";
wall3height = getProperty("/wall3", _height) / "2";
wall4x = getProperty("/wall4", _x);
wall4y = getProperty("/wall4", _y);
wall4width = getProperty("/wall4", _width) / "2";
wall4height = getProperty("/wall4", _height) / "2";
wallobsx = getProperty("/wallobs", _x);
wallobsy = getProperty("/wallobs", _y);
wallobswidth = getProperty("/wallobs", _width) / "2";
wallobsheight = getProperty("/wallobs", _height) / "2";
botrightx = "516";
botrighty = "371";
toprightx = "573";
toprighty = "127";
sandx = getProperty("/sand", _x);
sandy = getProperty("/sand", _y);
sandwidth = getProperty("/sand", _width) / "2";
sandheight = getProperty("/sand", _height) / "2";
Frame 115
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((wall4x - wall4width) < ballx) and (ballx < (wall4x + wall4width))) and (bally < (wall4y + wall4height))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall4y + wall4height) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wallobsx - wallobswidth) < ballx) and (ballx < (wallobsx + wallobswidth))) and (bally < (wallobsy + wallobsheight))) and ((wallobsy - wallobsheight) < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , bally + (ymov * "2"));
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx < ((wall3x + wall3width) + "5")) and (((wall3y - wall3height) < bally) and (bally < (wall3y + wall3height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (botrightx < ballx) {
botright_diff = ballx - botrightx;
if ((botrighty - botright_diff) < bally) {
p1_h4 = p1_h4 + "1";
setProperty("/ball", _x , (ballx - xmov) - "25");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
}
if (toprightx < ballx) {
topright_diff = ballx - toprightx;
if (bally < (toprighty + topright_diff)) {
xmovtemp = xmov;
ymovtemp = ymov;
ymov = xmovtemp;
xmov = ymovtemp;
setProperty("/ball", _y , bally + "5");
setProperty("/ball", _x , ballx - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
if ((((sandx - sandwidth) < ballx) and (ballx < (sandx + sandwidth))) and (bally < (sandy + sandheight))) {
ymov = ymov / "1.05";
xmov = xmov / "1.05";
}
if (ballx < "20") {
setProperty("/ball", _x , "60.6");
setProperty("/ball", _y , "318.9");
setProperty("/aimer", _x , "60");
setProperty("/aimer", _y , "317");
p1_h4 = p1_h4 + "1";
stopped = "1";
}
} else if (pturn == "2") {
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx2 < ((wall3x + wall3width) + "5")) and (((wall3y - wall3height) < bally2) and (bally2 < (wall3y + wall3height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx2) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (toprightx < ballx2) {
topright_diff = ballx2 - toprightx;
if (bally2 < (toprighty + topright_diff)) {
xmov2temp = xmov2;
ymov2temp = ymov2;
ymov2 = xmov2temp;
xmov2 = ymov2temp;
setProperty("/ball2", _y , bally2 + "5");
setProperty("/ball2", _x , ballx2 - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
if ((((wall4x - wall4width) < ballx2) and (ballx2 < (wall4x + wall4width))) and (bally2 < (wall4y + wall4height))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall4y + wall4height) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wallobsx - wallobswidth) < ballx2) and (ballx2 < (wallobsx + wallobswidth))) and (bally2 < (wallobsy + wallobsheight))) and ((wallobsy - wallobsheight) < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , bally2 + (ymov2 * "2"));
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (botrightx < ballx2) {
botright_diff = ballx2 - botrightx;
if ((botrighty - botright_diff) < bally2) {
p2_h4 = p2_h4 + "1";
setProperty("/ball2", _x , (ballx2 - xmov2) - "25");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
}
if ((((sandx - sandwidth) < ballx2) and (ballx2 < (sandx + sandwidth))) and (bally2 < (sandy + sandheight))) {
ymov2 = ymov2 / "1.05";
xmov2 = xmov2 / "1.05";
}
if (ballx2 < "20") {
setProperty("/ball2", _x , "60.6");
setProperty("/ball2", _y , "318.9");
setProperty("/aimer2", _x , "60");
setProperty("/aimer2", _y , "317");
p2_h4 = p2_h4 + "1";
stopped = "1";
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h4 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h4 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (118);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (118);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
if (p1done == "1") {
gotoAndPlay (118);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
p1_h4 = p1_h4 + "1";
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (118);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h4 = p1_h4 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h4 = p2_h4 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 116
gotoAndPlay (115);
Frame 120
startDrag ("/ship", true);
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "48.6");
setProperty("/ball", _y , "256.9");
setProperty("/aimer", _x , "47.3");
setProperty("/aimer", _y , "256.7");
setProperty("/ball2", _x , "48.6");
setProperty("/ball2", _y , "256.9");
setProperty("/aimer2", _x , "47.3");
setProperty("/aimer2", _y , "256.7");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
pturn = "1";
p1_h5 = "-";
p2_h5 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
hill1x = getProperty("/hill1", _x);
hill1width = (getProperty("/hill1", _width) / "2") - "20";
hill3x = getProperty("/hill3", _x);
hill3width = (getProperty("/hill3", _width) / "2") - "20";
hill2x = getProperty("/hill2", _x);
hill2y = getProperty("/hill2", _y);
hill2width = (getProperty("/hill2", _width) / "2") - "20";
Frame 121
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
if (((hill1x - hill1width) < ballx) and (ballx < (hill1x + hill1width))) {
} else if (((hill3x - hill3width) < ballx) and (ballx < (hill3x + hill3width))) {
} else if (((ball2hole < hill2width) and ("200" < bally)) and (bally < "320")) {
} else {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((hill1x - hill1width) < ballx) and (ballx < (hill1x + hill1width))) {
if (ballx < hill1x) {
xmov = xmov - "0.1";
}
if (hill1x < ballx) {
xmov = xmov + "0.1";
}
}
if (((hill3x - hill3width) < ballx) and (ballx < (hill3x + hill3width))) {
if (ballx < hill3x) {
xmov = xmov - "0.1";
}
if (hill3x < ballx) {
xmov = xmov + "0.1";
}
}
ball2hole = ballx - hill2x;
if (ball2hole < "0") {
ball2hole = ball2hole * (-"1");
}
if (ball2hole < hill2width) {
if (ballx < hill2x) {
xmov = xmov - "0";
} else if (hill2x < ballx) {
xmov = xmov + "0.03";
}
if (bally < hill2y) {
ymov = ymov - "0.03";
} else if (hill2y < bally) {
ymov = ymov + "0.03";
}
}
if (ballx < "20") {
setProperty("/ball", _x , "48.6");
setProperty("/ball", _y , "256.9");
setProperty("/aimer", _x , "47.3");
setProperty("/aimer", _y , "256.7");
p1_h5 = p1_h5 + "1";
stopped = "1";
}
} else if (pturn == "2") {
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
if (((hill1x - hill1width) < ballx2) and (ballx2 < (hill1x + hill1width))) {
} else if (((hill3x - hill3width) < ballx2) and (ballx2 < (hill3x + hill3width))) {
} else if (((ball2hole2 < hill2width) and ("200" < bally2)) and (bally2 < "320")) {
} else {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((rightwallx - rightwallwidth) - "5") < ballx2) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((hill1x - hill1width) < ballx2) and (ballx2 < (hill1x + hill1width))) {
if (ballx2 < hill1x) {
xmov2 = xmov2 - "0.1";
}
if (hill1x < ballx2) {
xmov2 = xmov2 + "0.1";
}
}
if (((hill3x - hill3width) < ballx2) and (ballx2 < (hill3x + hill3width))) {
if (ballx2 < hill3x) {
xmov2 = xmov2 - "0.1";
}
if (hill3x < ballx2) {
xmov2 = xmov2 + "0.1";
}
}
ball2hole2 = ballx2 - hill2x;
if (ball2hole2 < "0") {
ball2hole2 = ball2hole2 * (-"1");
}
if (ball2hole2 < hill2width) {
if (ballx2 < hill2x) {
xmov2 = xmov2 - "0.03";
} else if (hill2x < ballx2) {
xmov2 = xmov2 + "0.03";
}
if (bally2 < hill2y) {
ymov2 = ymov2 - "0.03";
} else if (hill2y < bally2) {
ymov2 = ymov2 + "0.03";
}
}
if (ballx2 < "20") {
setProperty("/ball2", _x , "48.6");
setProperty("/ball2", _y , "256.9");
setProperty("/aimer2", _x , "47.3");
setProperty("/aimer2", _y , "256.7");
p2_h5 = p2_h5 + "1";
stopped = "1";
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h5 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h5 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (123);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (123);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
if (p1done == "1") {
gotoAndPlay (123);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
p1_h5 = p1_h5 + "1";
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (123);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h5 = p1_h5 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h5 = p2_h5 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 122
gotoAndPlay (121);
Frame 126
startDrag ("/ship", true);
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "106.3");
setProperty("/ball", _y , "335.4");
setProperty("/aimer", _x , "105");
setProperty("/aimer", _y , "335.2");
setProperty("/ball2", _x , "106.3");
setProperty("/ball2", _y , "335.4");
setProperty("/aimer2", _x , "105");
setProperty("/aimer2", _y , "335.2");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
pturn = "1";
p1_h6 = "-";
p2_h6 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
leftwallx = getProperty("/leftwall", _x);
leftwally = getProperty("/leftwall", _y);
leftwallwidth = getProperty("/leftwall", _width) / "2";
leftwallheight = getProperty("/leftwall", _height) / "2";
topwall2x = getProperty("/topwall2", _x);
topwall2y = getProperty("/topwall2", _y);
topwall2width = getProperty("/topwall2", _width) / "2";
topwall2height = getProperty("/topwall2", _height) / "2";
botwall2x = getProperty("/botwall2", _x);
botwall2y = getProperty("/botwall2", _y);
botwall2width = getProperty("/botwall2", _width) / "2";
botwall2height = getProperty("/botwall2", _height) / "2";
rightwall2x = getProperty("/rightwall2", _x);
rightwall2y = getProperty("/rightwall2", _y);
rightwall2width = getProperty("/rightwall2", _width) / "2";
rightwall2height = getProperty("/rightwall2", _height) / "2";
leftwall2x = getProperty("/leftwall2", _x);
leftwall2y = getProperty("/leftwall2", _y);
leftwall2width = getProperty("/leftwall2", _width) / "2";
leftwall2height = getProperty("/leftwall2", _height) / "2";
Frame 127
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and ((((botwally - botwallheight) - "5") < bally) and (bally < (botwally + botwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx) and (ballx < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx < ((leftwallx + leftwallwidth) + "5")) and (((leftwally - leftwallheight) < bally) and (bally < (leftwally + leftwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (leftwallx + leftwallwidth) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((topwall2x - topwall2width) < ballx) and (ballx < (topwall2x + topwall2width))) and (bally < ((topwall2y + topwall2height) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwall2y + topwall2height) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwall2x - botwall2width) < ballx) and (ballx < (botwall2x + botwall2width))) and (((botwall2y - botwall2height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwall2y - botwall2height) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwall2x - rightwall2width) - "5") < ballx) and (ballx < ((rightwall2x + rightwall2width) + "5"))) and (((rightwall2y - rightwall2height) < bally) and (bally < (rightwall2y + rightwall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwall2x - rightwall2width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((ballx < ((leftwall2x + leftwall2width) + "5")) and (((leftwall2x - leftwall2width) - "15") < ballx)) and (((leftwall2y - leftwall2height) < bally) and (bally < (leftwall2y + leftwall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (leftwall2x + leftwall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (("315" < ballx) and (ballx < "330")) {
if (bally < "160") {
setProperty("/ball", _x , (leftwall2x + leftwall2width) + "5");
setProperty("/ball", _y , "235");
} else if ("190" < bally) {
setProperty("/ball", _x , (rightwall2x - rightwall2width) - "5");
setProperty("/ball", _y , "250");
xmov = (-"1") * xmov;
} else {
setProperty("/ball", _x , "500");
setProperty("/ball", _y , (topwall2y + topwall2height) + "5");
ymovtemp = ymov;
xmovtemp = xmov;
xmov = ymovtemp;
ymov = xmovtemp;
}
}
if ("350" < bally) {
setProperty("/ball", _x , "106.3");
setProperty("/ball", _y , "335.4");
setProperty("/aimer", _x , "105");
setProperty("/aimer", _y , "335.2");
p1_h6 = p1_h6 + "1";
stopped = "1";
}
} else if (pturn == "2") {
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx2) and (ballx2 < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx2 < ((leftwallx + leftwallwidth) + "5")) and (((leftwally - leftwallheight) < bally2) and (bally2 < (leftwally + leftwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (leftwallx + leftwallwidth) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((topwall2x - topwall2width) < ballx2) and (ballx2 < (topwall2x + topwall2width))) and (bally2 < ((topwall2y + topwall2height) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwall2y + topwall2height) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwall2x - botwall2width) < ballx2) and (ballx2 < (botwall2x + botwall2width))) and (((botwall2y - botwall2height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwall2y - botwall2height) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwall2x - rightwall2width) - "5") < ballx2) and (ballx2 < ((rightwall2x + rightwall2width) + "5"))) and (((rightwall2y - rightwall2height) < bally2) and (bally2 < (rightwall2y + rightwall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwall2x - rightwall2width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((ballx2 < ((leftwall2x + leftwall2width) + "5")) and (((leftwall2x - leftwall2width) - "15") < ballx2)) and (((leftwall2y - leftwall2height) < bally2) and (bally2 < (leftwall2y + leftwall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (leftwall2x + leftwall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (("315" < ballx2) and (ballx2 < "330")) {
if (bally2 < "160") {
setProperty("/ball2", _x , (leftwall2x + leftwall2width) + "5");
setProperty("/ball2", _y , "235");
} else if ("190" < bally2) {
setProperty("/ball2", _x , (rightwall2x - rightwall2width) - "5");
setProperty("/ball2", _y , "250");
xmov2 = (-"1") * xmov2;
} else {
setProperty("/ball2", _x , "500");
setProperty("/ball2", _y , (topwall2y + topwall2height) + "5");
ymovtemp2 = ymov2;
xmovtemp2 = xmov2;
xmov2 = ymovtemp2;
ymov2 = xmovtemp2;
}
}
if ("350" < bally2) {
setProperty("/ball2", _x , "106.3");
setProperty("/ball2", _y , "335.4");
setProperty("/aimer2", _x , "105");
setProperty("/aimer2", _y , "335.2");
p2_h6 = p2_h6 + "1";
stopped = "1";
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (131);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (131);
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
}
if (stopped == "1") {
stopped = "0";
inthehole = "0";
move = "0";
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
p1_h6 = p1_h6 + "1";
if (p1done == "1") {
gotoAndPlay (131);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (131);
}
if (pturn == "1") {
p1_h6 = p1_h6 + "1";
if (p1done == "0") {
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
p2_h6 = p2_h6 + "1";
if (p2done == "0") {
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
}
Frame 128
gotoAndPlay (127);
Frame 132
startDrag ("/ship", true);
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "316.2");
setProperty("/ball", _y , "342.3");
setProperty("/aimer", _x , "314.9");
setProperty("/aimer", _y , "342");
setProperty("/ball2", _x , "316.2");
setProperty("/ball2", _y , "342.3");
setProperty("/aimer2", _x , "314.9");
setProperty("/aimer2", _y , "342");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
pturn = "1";
p1_h7 = "-";
p2_h7 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
leftwallx = getProperty("/leftwall", _x);
leftwally = getProperty("/leftwall", _y);
leftwallwidth = getProperty("/leftwall", _width) / "2";
leftwallheight = getProperty("/leftwall", _height) / "2";
randomx = "100" + ("50" * random("9"));
randomy = "145" + ("35" * random("5"));
setProperty("/hole", _x , randomx);
setProperty("/hole", _y , randomy);
setProperty("/close", _visible , "0");
Frame 133
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and ((((botwally - botwallheight) - "5") < bally) and (bally < (botwally + botwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx) and (ballx < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx < ((leftwallx + leftwallwidth) + "5")) and (((leftwally - leftwallheight) < bally) and (bally < (leftwally + leftwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (leftwallx + leftwallwidth) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((ballx < (randomx + "50")) and ((randomx - "50") < ballx)) and (bally < (randomy + "50"))) and ((randomy - "50") < bally)) {
setProperty("/close", _visible , "1");
} else {
setProperty("/close", _visible , "0");
}
} else if (pturn == "2") {
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and (((botwally - botwallheight) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx2) and (ballx2 < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx2 < ((leftwallx + leftwallwidth) + "5")) and (((leftwally - leftwallheight) < bally2) and (bally2 < (leftwally + leftwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (leftwallx + leftwallwidth) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((ballx2 < (randomx + "50")) and ((randomx - "50") < ballx2)) and (bally2 < (randomy + "50"))) and ((randomy - "50") < bally2)) {
setProperty("/close", _visible , "1");
} else {
setProperty("/close", _visible , "0");
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (137);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (137);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
p1_h7 = p1_h7 + "1";
if (p1done == "1") {
gotoAndPlay (137);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (137);
}
if (pturn == "1") {
p1_h7 = p1_h7 + "1";
if (p1done == "0") {
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
p2_h7 = p2_h7 + "1";
if (p2done == "0") {
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 134
gotoAndPlay (133);
Frame 138
startDrag ("/ship", true);
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "46.2");
setProperty("/ball", _y , "296.3");
setProperty("/aimer", _x , "44.9");
setProperty("/aimer", _y , "296");
setProperty("/ball2", _x , "46.2");
setProperty("/ball2", _y , "296.3");
setProperty("/aimer2", _x , "44.9");
setProperty("/aimer2", _y , "296");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
pturn = "1";
p1_h8 = "-";
p2_h8 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
topwall2x = getProperty("/topwall2", _x);
topwall2y = getProperty("/topwall2", _y);
topwall2width = getProperty("/topwall2", _width) / "2";
topwall2height = getProperty("/topwall2", _height) / "2";
botwall2x = getProperty("/botwall2", _x);
botwall2y = getProperty("/botwall2", _y);
botwall2width = getProperty("/botwall2", _width) / "2";
botwall2height = getProperty("/botwall2", _height) / "2";
rightwall2x = getProperty("/rightwall2", _x);
rightwall2y = getProperty("/rightwall2", _y);
rightwall2width = getProperty("/rightwall2", _width) / "2";
rightwall2height = getProperty("/rightwall2", _height) / "2";
leftwall2x = getProperty("/leftwall2", _x);
leftwall2y = getProperty("/leftwall2", _y);
leftwall2width = getProperty("/leftwall2", _width) / "2";
leftwall2height = getProperty("/leftwall2", _height) / "2";
wall1x = getProperty("/obswall1", _x);
wall1y = getProperty("/obswall1", _y);
wall1width = getProperty("/obswall1", _width) / "2";
wall1height = getProperty("/obswall1", _height) / "2";
wall21x = getProperty("/obswall21", _x);
wall21y = getProperty("/obswall21", _y);
wall21width = getProperty("/obswall21", _width) / "2";
wall21height = getProperty("/obswall21", _height) / "2";
wall22x = getProperty("/obswall22", _x);
wall22y = getProperty("/obswall22", _y);
wall22width = getProperty("/obswall22", _width) / "2";
wall22height = getProperty("/obswall22", _height) / "2";
wall3x = getProperty("/obswall3", _x);
wall3y = getProperty("/obswall3", _y);
wall3width = getProperty("/obswall3", _width) / "2";
wall3height = getProperty("/obswall3", _height) / "2";
hill1x = getProperty("/hill1", _x);
hill1y = getProperty("/hill1", _y);
hill1width = getProperty("/hill1", _width) / "3";
hill2x = getProperty("/hill2", _x);
hill2width = getProperty("/hill2", _width) / "2";
sandx = getProperty("/sand", _x);
sandy = getProperty("/sand", _y);
sandwidth = getProperty("/sand", _width) / "2";
sandheight = getProperty("/sand", _height) / "2";
waterx = getProperty("/water", _x);
watery = getProperty("/water", _y);
waterwidth = getProperty("/water", _width) / "2";
waterheight = getProperty("/water", _height) / "2";
portal1x = getProperty("/portal1", _x);
portal1y = getProperty("/portal1", _y);
portal1width = getProperty("/portal1", _width) / "4";
portal2x = getProperty("/portal2", _x);
portal2y = getProperty("/portal2", _y);
portal2width = getProperty("/portal2", _width) / "4";
Frame 139
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
if (((ball2hole < hill1width) and ("235" < bally)) and (bally < "300")) {
} else if (((ballx < (hill2x + hill2width)) and ((hill2x - hill2width) < ballx)) and (bally < "235")) {
} else {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ("235" < bally) {
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and ((((botwally - botwallheight) - "5") < bally) and (bally < (botwally + botwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx) and (ballx < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((sandx - sandwidth) < ballx) and (ballx < (sandx + sandwidth))) and ((sandy - sandheight) < bally)) {
ymov = ymov / "1.05";
xmov = xmov / "1.05";
}
if ((((waterx - waterwidth) < ballx) and (ballx < (waterx + waterwidth))) and (bally < (watery + waterheight))) {
p1_h8 = p1_h8 + "1";
setProperty("/ball", _x , "150");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
if ((((portal1x - portal1width) < ballx) and (ballx < (portal1x + portal1width))) and (((portal1y - portal1width) < bally) and (bally < (portal1y + portal1width)))) {
setProperty("/ball", _x , portal2x);
setProperty("/ball", _y , portal2y);
xmov = xmov * (-"1");
tellTarget ("sounds") {
gotoAndPlay ("portal");
};
}
ball2hole = ballx - hill1x;
if (ball2hole < "0") {
ball2hole = ball2hole * (-"1");
}
if ((ball2hole < hill1width) and (bally < (hill1y + hill1width))) {
if (ballx < hill1x) {
xmov = xmov - "0.05";
} else if (hill1x < ballx) {
xmov = xmov + "0.05";
}
if (bally < hill1y) {
ymov = ymov - "0.05";
} else if (hill1y < bally) {
ymov = ymov + "0.05";
}
}
if (ballx < "15") {
setProperty("/ball", _x , "46.2");
setProperty("/ball", _y , "296.3");
setProperty("/aimer", _x , "44.9");
setProperty("/aimer", _y , "296");
p1_h8 = p1_h8 + "1";
stopped = "1";
}
} else if (bally < "235") {
if ((((topwall2x - topwall2width) < ballx) and (ballx < (topwall2x + topwall2width))) and (bally < ((topwall2y + topwall2height) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwall2y + topwall2height) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwall2x - botwall2width) < ballx) and (ballx < (botwall2x + botwall2width))) and (((botwall2y - botwall2height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwall2y - botwall2height) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwall2x - rightwall2width) - "5") < ballx) and (ballx < ((rightwall2x + rightwall2width) + "5"))) and (((rightwall2y - rightwall2height) < bally) and (bally < (rightwall2y + rightwall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwall2x - rightwall2width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((ballx < ((leftwall2x + leftwall2width) + "5")) and (((leftwall2x - leftwall2width) - "15") < ballx)) and (((leftwall2y - leftwall2height) < bally) and (bally < (leftwall2y + leftwall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (leftwall2x + leftwall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx < (hill2x + hill2width)) and ((hill2x - hill2width) < ballx)) {
xmov = xmov + "0.1";
}
if (((((wall1x - wall1width) - "5") < ballx) and (ballx < wall1x)) and (((wall1y - wall1height) < bally) and (bally < (wall1y + wall1height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall1x - wall1width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall1x + wall1width) + "5")) and (wall1x < ballx)) and (((wall1y - wall1height) < bally) and (bally < (wall1y + wall1height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall1x + wall1width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall1x + wall1width) + "5")) and (wall1x < ballx)) and (((wall1y - wall1height) - "5") < bally)) and (bally < ((wall1y - wall1height) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall1y - wall1height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall21x - wall21width) - "5") < ballx) and (ballx < wall21x)) and (((wall21y - wall21height) < bally) and (bally < (wall21y + wall21height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall21x - wall21width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall21x + wall21width) + "5")) and (wall21x < ballx)) and (((wall21y - wall21height) < bally) and (bally < (wall21y + wall21height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall21x + wall21width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall21x + wall21width) + "5")) and (wall21x < ballx)) and (bally < ((wall21y + wall21height) + "3"))) and (((wall21y + wall21height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall21y + wall21height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall22x - wall22width) - "5") < ballx) and (ballx < wall22x)) and (((wall22y - wall22height) < bally) and (bally < (wall22y + wall22height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall22x - wall22width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall22x + wall22width) + "5")) and (wall22x < ballx)) and (((wall22y - wall22height) < bally) and (bally < (wall22y + wall22height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall22x + wall22width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall22x + wall22width) + "5")) and (wall22x < ballx)) and (((wall22y - wall22height) - "5") < bally)) and (bally < ((wall22y - wall22height) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall22y - wall22height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall3x - wall3width) - "5") < ballx) and (ballx < wall3x)) and (((wall3y - wall3height) < bally) and (bally < (wall3y + wall3height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall3x - wall3width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall3x + wall3width) + "5")) and (wall3x < ballx)) and (((wall3y - wall3height) < bally) and (bally < (wall3y + wall3height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall3x + wall3width) + "5")) and (wall3x < ballx)) and (bally < ((wall3y + wall3height) + "3"))) and (((wall3y + wall3height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall3y + wall3height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
} else if (pturn == "2") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
if (((ball2hole2 < hill1width) and ("235" < bally2)) and (bally2 < "300")) {
} else if (((ballx2 < (hill2x + hill2width)) and ((hill2x - hill2width) < ballx2)) and (bally2 < "235")) {
} else {
stopped = "1";
tellTarget ("/ball2") {
stop();
};
}
}
if ("235" < bally2) {
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and ((((botwally - botwallheight) - "5") < bally2) and (bally2 < (botwally + botwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx2) and (ballx2 < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((sandx - sandwidth) < ballx2) and (ballx2 < (sandx + sandwidth))) and ((sandy - sandheight) < bally2)) {
ymov2 = ymov2 / "1.05";
xmov2 = xmov2 / "1.05";
}
if ((((waterx - waterwidth) < ballx2) and (ballx2 < (waterx + waterwidth))) and (bally2 < (watery + waterheight))) {
p1_h8 = p1_h8 + "1";
setProperty("/ball2", _x , "150");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
if ((((portal1x - portal1width) < ballx2) and (ballx2 < (portal1x + portal1width))) and (((portal1y - portal1width) < bally2) and (bally2 < (portal1y + portal1width)))) {
setProperty("/ball2", _x , portal2x);
setProperty("/ball2", _y , portal2y);
xmov2 = xmov2 * (-"1");
tellTarget ("sounds") {
gotoAndPlay ("portal");
};
}
ball2hole2 = ballx2 - hill1x;
if (ball2hole2 < "0") {
ball2hole2 = ball2hole2 * (-"1");
}
if ((ball2hole2 < hill1width) and (bally2 < (hill1y + hill1width))) {
if (ballx2 < hill1x) {
xmov2 = xmov2 - "0.05";
} else if (hill1x < ballx2) {
xmov2 = xmov2 + "0.05";
}
if (bally2 < hill1y) {
ymov2 = ymov2 - "0.05";
} else if (hill1y < bally2) {
ymov2 = ymov2 + "0.05";
}
}
if (ballx2 < "15") {
setProperty("/ball2", _x , "46.2");
setProperty("/ball2", _y , "296.3");
setProperty("/aimer2", _x , "44.9");
setProperty("/aimer2", _y , "296");
p1_h8 = p1_h8 + "1";
stopped = "1";
}
} else if (bally2 < "235") {
if ((((topwall2x - topwall2width) < ballx2) and (ballx2 < (topwall2x + topwall2width))) and (bally2 < ((topwall2y + topwall2height) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwall2y + topwall2height) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwall2x - botwall2width) < ballx2) and (ballx2 < (botwall2x + botwall2width))) and (((botwall2y - botwall2height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwall2y - botwall2height) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwall2x - rightwall2width) - "5") < ballx2) and (ballx2 < ((rightwall2x + rightwall2width) + "5"))) and (((rightwall2y - rightwall2height) < bally2) and (bally2 < (rightwall2y + rightwall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwall2x - rightwall2width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((ballx2 < ((leftwall2x + leftwall2width) + "5")) and (((leftwall2x - leftwall2width) - "15") < ballx2)) and (((leftwall2y - leftwall2height) < bally2) and (bally2 < (leftwall2y + leftwall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (leftwall2x + leftwall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((ballx2 < (hill2x + hill2width)) and ((hill2x - hill2width) < ballx2)) {
xmov2 = xmov2 + "0.1";
}
if (((((wall1x - wall1width) - "5") < ballx2) and (ballx2 < wall1x)) and (((wall1y - wall1height) < bally2) and (bally2 < (wall1y + wall1height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall1x - wall1width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall1x + wall1width) + "5")) and (wall1x < ballx2)) and (((wall1y - wall1height) < bally2) and (bally2 < (wall1y + wall1height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall1x + wall1width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall1x + wall1width) + "5")) and (wall1x < ballx2)) and (((wall1y - wall1height) - "5") < bally2)) and (bally2 < ((wall1y - wall1height) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall1y - wall1height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall21x - wall21width) - "5") < ballx2) and (ballx2 < wall21x)) and (((wall21y - wall21height) < bally2) and (bally2 < (wall21y + wall21height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall21x - wall21width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall21x + wall21width) + "5")) and (wall21x < ballx2)) and (((wall21y - wall21height) < bally2) and (bally2 < (wall21y + wall21height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall21x + wall21width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall21x + wall21width) + "5")) and (wall21x < ballx2)) and (bally2 < ((wall21y + wall21height) + "3"))) and (((wall21y + wall21height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall21y + wall21height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall22x - wall22width) - "5") < ballx2) and (ballx2 < wall22x)) and (((wall22y - wall22height) < bally2) and (bally2 < (wall22y + wall22height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall22x - wall22width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall22x + wall22width) + "5")) and (wall22x < ballx2)) and (((wall22y - wall22height) < bally2) and (bally2 < (wall22y + wall22height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall22x + wall22width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall22x + wall22width) + "5")) and (wall22x < ballx2)) and (((wall22y - wall22height) - "5") < bally2)) and (bally2 < ((wall22y - wall22height) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall22y - wall22height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall3x - wall3width) - "5") < ballx2) and (ballx2 < wall3x)) and (((wall3y - wall3height) < bally2) and (bally2 < (wall3y + wall3height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall3x - wall3width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall3x + wall3width) + "5")) and (wall3x < ballx2)) and (((wall3y - wall3height) < bally2) and (bally2 < (wall3y + wall3height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall3x + wall3width) + "5")) and (wall3x < ballx2)) and (bally2 < ((wall3y + wall3height) + "3"))) and (((wall3y + wall3height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall3y + wall3height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h8 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h8 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (141);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (141);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
p1_h8 = p1_h8 + "1";
if (p1done == "1") {
gotoAndPlay (141);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (141);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h8 = p1_h8 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h8 = p2_h8 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 140
gotoAndPlay (139);
Frame 144
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball2") {
stop();
};
setProperty("/ball", _x , "47.2");
setProperty("/ball", _y , "286.3");
setProperty("/aimer", _x , "45.9");
setProperty("/aimer", _y , "286");
setProperty("/ball2", _x , "47.2");
setProperty("/ball2", _y , "286.3");
setProperty("/aimer2", _x , "45.9");
setProperty("/aimer2", _y , "286");
if (players == "2") {
setProperty("/ball2", _visible , "1");
setProperty("/ball2", _alpha , "30");
} else if (players == "1") {
setProperty("/ball2", _visible , "0");
setProperty("/aimer2", _visible , "0");
}
setProperty("/ball", _visible , "1");
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
pturn = "1";
p1_h9 = "-";
p2_h9 = "-";
move = "0";
shotspeed = "5";
firsttime = "0";
p1done = "0";
p2done = "0";
stopped = "0";
topwallx = getProperty("/topwall", _x);
topwally = getProperty("/topwall", _y);
topwallwidth = getProperty("/topwall", _width) / "2";
topwallheight = getProperty("/topwall", _height) / "2";
botwallx = getProperty("/botwall", _x);
botwally = getProperty("/botwall", _y);
botwallwidth = getProperty("/botwall", _width) / "2";
botwallheight = getProperty("/botwall", _height) / "2";
rightwallx = getProperty("/rightwall", _x);
rightwally = getProperty("/rightwall", _y);
rightwallwidth = getProperty("/rightwall", _width) / "2";
rightwallheight = getProperty("/rightwall", _height) / "2";
wall1x = getProperty("/obswall1", _x);
wall1y = getProperty("/obswall1", _y);
wall1width = getProperty("/obswall1", _width) / "2";
wall1height = getProperty("/obswall1", _height) / "2";
wall1dir = "3";
wall2x = getProperty("/obswall2", _x);
wall2y = getProperty("/obswall2", _y);
wall2width = getProperty("/obswall2", _width) / "2";
wall2height = getProperty("/obswall2", _height) / "2";
wall2dir = -"2";
wall3x = getProperty("/obswall3", _x);
wall3y = getProperty("/obswall3", _y);
wall3width = getProperty("/obswall3", _width) / "2";
wall3height = getProperty("/obswall3", _height) / "2";
hill1x = getProperty("/hill1", _x);
hill1y = getProperty("/hill1", _y);
hill1width = getProperty("/hill1", _width) / "3";
sandx = getProperty("/sand", _x);
sandy = getProperty("/sand", _y);
sandwidth = getProperty("/sand", _width) / "2";
sandheight = getProperty("/sand", _height) / "2";
waterx = getProperty("/water", _x);
watery = getProperty("/water", _y);
waterwidth = getProperty("/water", _width) / "2";
waterheight = getProperty("/water", _height) / "2";
water21x = getProperty("/water21", _x);
water21y = getProperty("/water21", _y);
water21width = getProperty("/water21", _width) / "2";
water21height = getProperty("/water21", _height) / "2";
water22x = getProperty("/water22", _x);
water22y = getProperty("/water22", _y);
water22width = getProperty("/water22", _width) / "2";
water22height = getProperty("/water22", _height) / "2";
hill2x = getProperty("/hill2", _x);
hill2width = getProperty("/hill2", _width) / "2";
Frame 145
if (firsttime == "0") {
setProperty("/aimer2", _visible , "0");
firsttime = "1";
}
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
startDrag ("/ship", true);
wall1y = getProperty("/obswall1", _y);
if (botwally < ((wall1y + wall1height) + "15")) {
wall1dir = -"3";
} else if (((wall1y - wall1height) - "15") < topwally) {
wall1dir = "3";
}
setProperty("/obswall1", _y , wall1y + wall1dir);
startDrag ("/ship", true);
wall2y = getProperty("/obswall2", _y);
if (botwally < ((wall2y + wall2height) + "15")) {
wall2dir = -"2";
} else if (((wall2y - wall2height) - "15") < topwally) {
wall2dir = "2";
}
setProperty("/obswall2", _y , wall2y + wall2dir);
if (move == "1") {
var = "1";
while (var < shotspeed) {
var = var + "1";
if (pturn == "1") {
if (((xmov < "0.35") and ((-"0.35") < xmov)) and ((ymov < "0.35") and ((-"0.35") < ymov))) {
if ((((ball2hole < hill1width) and ("235" < bally)) and ((hill1y - hill1width) < bally)) and (bally < (hill1y + hill1width))) {
} else if (((hill2x - hill2width) < ballx) and (ballx < (hill2x + hill2width))) {
} else {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
}
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/ball", _x , ballx + xmov);
setProperty("/ball", _y , bally + ymov);
if ((((topwallx - topwallwidth) < ballx) and (ballx < (topwallx + topwallwidth))) and (bally < ((topwally + topwallheight) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
setProperty("/ball", _y , (topwally + topwallheight) + "10");
ymov = (-"1") * ymov;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx) and (ballx < (botwallx + botwallwidth))) and ((((botwally - botwallheight) - "5") < bally) and (bally < (botwally + botwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx) and (ballx < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally) and (bally < (rightwally + rightwallheight)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((sandx - sandwidth) < ballx) and (ballx < (sandx + sandwidth))) and ((sandy - sandheight) < bally)) {
ymov = ymov / "1.05";
xmov = xmov / "1.05";
}
if (((((waterx - waterwidth) < ballx) and (ballx < (waterx + waterwidth))) and (bally < (watery + waterheight))) and ((watery - waterheight) < bally)) {
p1_h9 = p1_h9 + "1";
setProperty("/ball", _x , "235");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
if (((((water21x - water21width) < ballx) and (ballx < (water21x + water21width))) and (bally < (water21y + water21height))) and ((water21y - water21height) < bally)) {
p1_h9 = p1_h9 + "1";
setProperty("/ball", _x , "235");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
if (((((water22x - water22width) < ballx) and (ballx < (water22x + water22width))) and (bally < (water22y + water22height))) and ((water22y - water22height) < bally)) {
p1_h9 = p1_h9 + "1";
setProperty("/ball", _x , "235");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
ball2hole = ballx - hill1x;
if (ball2hole < "0") {
ball2hole = ball2hole * (-"1");
}
if (((ball2hole < hill1width) and ((hill1y - hill1width) < bally)) and (bally < (hill1y + hill1width))) {
if (ballx < hill1x) {
xmov = xmov - "0.05";
} else if (hill1x < ballx) {
xmov = xmov + "0.05";
}
if (bally < hill1y) {
ymov = ymov - "0.05";
} else if (hill1y < bally) {
ymov = ymov + "0.05";
}
}
if (((hill2x - hill2width) < ballx) and (ballx < (hill2x + hill2width))) {
xmov = xmov + "0.35";
}
if (ballx < "15") {
setProperty("/ball", _x , "46.2");
setProperty("/ball", _y , "296.3");
setProperty("/aimer", _x , "44.9");
setProperty("/aimer", _y , "296");
p1_h9 = p1_h9 + "1";
stopped = "1";
}
if (((((wall1x - wall1width) - "5") < ballx) and (ballx < wall1x)) and (((wall1y - wall1height) < bally) and (bally < (wall1y + wall1height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall1x - wall1width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall1x + wall1width) + "5")) and (wall1x < ballx)) and (((wall1y - wall1height) < bally) and (bally < (wall1y + wall1height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall1x + wall1width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall1x + wall1width) + "5")) and ((wall1x - wall1width) < ballx)) and (((wall1y - wall1height) - "5") < bally)) and (bally < ((wall1y - wall1height) + "5"))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall1y - wall1height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall2x - wall2width) - "5") < ballx) and (ballx < wall2x)) and (((wall2y - wall2height) < bally) and (bally < (wall2y + wall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall2x - wall2width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall2x + wall2width) + "5")) and (wall2x < ballx)) and (((wall2y - wall2height) < bally) and (bally < (wall2y + wall2height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall2x + wall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall2x + wall2width) + "5")) and (wall2x < ballx)) and (bally < ((wall2y + wall2height) + "3"))) and (((wall2y + wall2height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall2y + wall2height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall3x - wall3width) - "5") < ballx) and (ballx < wall3x)) and (((wall3y - wall3height) < bally) and (bally < (wall3y + wall3height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall3x - wall3width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx < ((wall3x + wall3width) + "5")) and (wall3x < ballx)) and (((wall3y - wall3height) < bally) and (bally < (wall3y + wall3height)))) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
xmov = (-"1") * xmov;
setProperty("/ball", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx < ((wall3x + wall3width) + "5")) and (wall3x < ballx)) and (bally < ((wall3y + wall3height) + "3"))) and (((wall3y + wall3height) - "5") < bally)) {
ballangle = getProperty("/ball", _rotation);
setProperty("/ball", _rotation , ballangle + "180");
ymov = (-"1") * ymov;
setProperty("/ball", _y , (wall3y + wall3height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
} else if (pturn == "2") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/ball2", _x , ballx2 + xmov2);
setProperty("/ball2", _y , bally2 + ymov2);
if (((xmov2 < "0.35") and ((-"0.35") < xmov2)) and ((ymov2 < "0.35") and ((-"0.35") < ymov2))) {
if ((((ball2hole2 < hill1width) and ("235" < bally2)) and ((hill1y - hill1width) < bally2)) and (bally2 < (hill1y + hill1width))) {
} else if (((hill2x - hill2width) < ballx2) and (ballx2 < (hill2x + hill2width))) {
} else {
stopped = "1";
tellTarget ("/ball") {
stop();
};
}
}
if ((((topwallx - topwallwidth) < ballx2) and (ballx2 < (topwallx + topwallwidth))) and (bally2 < ((topwally + topwallheight) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
setProperty("/ball2", _y , (topwally + topwallheight) + "10");
ymov2 = (-"1") * ymov2;
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((botwallx - botwallwidth) < ballx2) and (ballx2 < (botwallx + botwallwidth))) and ((((botwally - botwallheight) - "5") < bally2) and (bally2 < (botwally + botwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (botwally - botwallheight) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((rightwallx - rightwallwidth) - "5") < ballx2) and (ballx2 < ((rightwallx + rightwallwidth) + "10"))) and (((rightwally - rightwallheight) < bally2) and (bally2 < (rightwally + rightwallheight)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (rightwallx - rightwallwidth) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if ((((sandx - sandwidth) < ballx2) and (ballx2 < (sandx + sandwidth))) and ((sandy - sandheight) < bally2)) {
ymov2 = ymov2 / "1.05";
xmov2 = xmov2 / "1.05";
}
if (((((waterx - waterwidth) < ballx2) and (ballx2 < (waterx + waterwidth))) and (bally2 < (watery + waterheight))) and ((watery - waterheight) < bally2)) {
p2_h9 = p2_h9 + "1";
setProperty("/ball2", _x , "235");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
if (((((water21x - water21width) < ballx2) and (ballx2 < (water21x + water21width))) and (bally2 < (water21y + water21height))) and ((water21y - water21height) < bally2)) {
p2_h9 = p2_h9 + "1";
setProperty("/ball2", _x , "235");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
if (((((water22x - water22width) < ballx2) and (ballx2 < (water22x + water22width))) and (bally2 < (water22y + water22height))) and ((water22y - water22height) < bally2)) {
p2_h9 = p2_h9 + "1";
setProperty("/ball2", _x , "235");
stopped = "1";
tellTarget ("/sounds") {
gotoAndPlay ("water");
};
}
ball2hole2 = ballx2 - hill1x;
if (ball2hole2 < "0") {
ball2hole2 = ball2hole2 * (-"1");
}
if (((ball2hole2 < hill1width) and ((hill1y - hill1width) < bally2)) and (bally2 < (hill1y + hill1width))) {
if (ballx2 < hill1x) {
xmov2 = xmov2 - "0.05";
} else if (hill1x < ballx2) {
xmov2 = xmov2 + "0.05";
}
if (bally2 < hill1y) {
ymov2 = ymov2 - "0.05";
} else if (hill1y < bally2) {
ymov2 = ymov2 + "0.05";
}
}
if (((hill2x - hill2width) < ballx2) and (ballx2 < (hill2x + hill2width))) {
xmov2 = xmov2 + "0.35";
}
if (ballx2 < "15") {
setProperty("/ball2", _x , "46.2");
setProperty("/ball2", _y , "296.3");
setProperty("/aimer2", _x , "44.9");
setProperty("/aimer2", _y , "296");
p2_h9 = p2_h9 + "1";
stopped = "1";
}
if (((((wall1x - wall1width) - "5") < ballx2) and (ballx2 < wall1x)) and (((wall1y - wall1height) < bally2) and (bally2 < (wall1y + wall1height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall1x - wall1width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall1x + wall1width) + "5")) and (wall1x < ballx2)) and (((wall1y - wall1height) < bally2) and (bally2 < (wall1y + wall1height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall1x + wall1width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall1x + wall1width) + "5")) and ((wall1x - wall1width) < ballx2)) and (((wall1y - wall1height) - "5") < bally2)) and (bally2 < ((wall1y - wall1height) + "5"))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall1y - wall1height) - "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall2x - wall2width) - "5") < ballx2) and (ballx2 < wall2x)) and (((wall2y - wall2height) < bally2) and (bally2 < (wall2y + wall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall2x - wall2width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall2x + wall2width) + "5")) and (wall2x < ballx2)) and (((wall2y - wall2height) < bally2) and (bally2 < (wall2y + wall2height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall2x + wall2width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall2x + wall2width) + "5")) and (wall2x < ballx2)) and (bally2 < ((wall2y + wall2height) + "3"))) and (((wall2y + wall2height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall2y + wall2height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
if (((((wall3x - wall3width) - "5") < ballx2) and (ballx2 < wall3x)) and (((wall3y - wall3height) < bally2) and (bally2 < (wall3y + wall3height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall3x - wall3width) - "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if (((ballx2 < ((wall3x + wall3width) + "5")) and (wall3x < ballx2)) and (((wall3y - wall3height) < bally2) and (bally2 < (wall3y + wall3height)))) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
xmov2 = (-"1") * xmov2;
setProperty("/ball2", _x , (wall3x + wall3width) + "5");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
} else if ((((ballx2 < ((wall3x + wall3width) + "5")) and (wall3x < ballx2)) and (bally2 < ((wall3y + wall3height) + "3"))) and (((wall3y + wall3height) - "5") < bally2)) {
ballangle2 = getProperty("/ball2", _rotation);
setProperty("/ball2", _rotation , ballangle2 + "180");
ymov2 = (-"1") * ymov2;
setProperty("/ball2", _y , (wall3y + wall3height) + "6");
tellTarget ("sounds") {
gotoAndPlay ("wall");
};
}
}
if (inthehole1 == "1") {
p1done = "1";
inthehole1 = "0";
if (p1_h9 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
if (inthehole2 == "1") {
p2done = "1";
inthehole2 = "0";
if (p2_h9 == "1") {
tellTarget ("/sounds") {
gotoAndPlay ("crowd");
};
}
}
}
x = "1";
while (x < "7") {
x = x + "1";
xmov = xmov / ("100" / "99");
ymov = ymov / ("100" / "99");
xmov2 = xmov2 / ("100" / "99");
ymov2 = ymov2 / ("100" / "99");
}
if ((players == "1") and (p1done == "1")) {
gotoAndPlay (149);
} else if (((players == "2") and (p1done == "1")) and (p2done == "1")) {
gotoAndPlay (149);
}
if (stopped == "1") {
tellTarget ("/ball") {
stop();
};
tellTarget ("/ball") {
stop();
};
xmov = "0";
ymov = "0";
xmov2 = "0";
ymov2 = "0";
tellTarget ("/powermeter") {
gotoAndStop (1);
};
shotspeed = "0";
if (players == "1") {
if (p1done == "1") {
gotoAndPlay (149);
} else {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
p1_h9 = p1_h9 + "1";
}
} else if (players == "2") {
if ((p1done == "1") and (p2done == "1")) {
gotoAndPlay (149);
}
if (pturn == "1") {
if (p1done == "0") {
p1_h9 = p1_h9 + "1";
}
if (p2done == "0") {
pturn = "2";
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
setProperty("/ball", _alpha , "30");
setProperty("/ball2", _alpha , "100");
} else if (p2done == "1") {
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
}
} else if (pturn == "2") {
if (p2done == "0") {
p2_h9 = p2_h9 + "1";
}
if (p1done == "0") {
pturn = "1";
ballx = getProperty("/ball", _x);
bally = getProperty("/ball", _y);
setProperty("/aimer", _x , ballx);
setProperty("/aimer", _y , bally);
setProperty("/aimer", _visible , "1");
setProperty("/ball", _alpha , "100");
setProperty("/ball2", _alpha , "30");
} else if (p1done == "1") {
ballx2 = getProperty("/ball2", _x);
bally2 = getProperty("/ball2", _y);
setProperty("/aimer2", _x , ballx2);
setProperty("/aimer2", _y , bally2);
setProperty("/aimer2", _visible , "1");
}
}
}
stopped = "0";
inthehole = "0";
move = "0";
}
}
Frame 146
gotoAndPlay (145);
Frame 149
setProperty("/scorecard", _visible , "1");
stop();
Symbol 9 MovieClip Frame 35
gotoAndPlay (1);
Symbol 29 Button
on (release) {
gotoAndPlay (96);
}
Symbol 31 Button
on (release) {
players = "1";
setProperty("/playerpick", _x , "559");
}
Symbol 32 Button
on (release) {
players = "2";
setProperty("/playerpick", _x , "605");
}
Symbol 47 MovieClip Frame 1
holex = _x;
holey = _y;
holediameter = _width / "2.5";
if ((((((holex - holediameter) < ..:ballx) and (..:ballx < (holex + holediameter))) and (((holey - holediameter) < ..:bally) and (..:bally < (holey + holediameter)))) and (..:xmov < "4")) and (..:ymov < "4")) {
Set("..:inthehole1", "1");
Set("..:stopped", "1");
setProperty("../ball", _visible , "0");
setProperty("/ball", _x , ballx - "15");
gotoAndPlay (4);
}
if ((((((holex - holediameter) < ..:ballx2) and (..:ballx2 < (holex + holediameter))) and (((holey - holediameter) < ..:bally2) and (..:bally2 < (holey + holediameter)))) and (..:xmov2 < "4")) and (..:ymov2 < "4")) {
Set("..:inthehole2", "1");
Set("..:stopped", "1");
setProperty("../ball2", _visible , "0");
setProperty("/ball2", _x , ballx2 - "15");
gotoAndPlay (10);
}
Symbol 47 MovieClip Frame 2
gotoAndPlay (1);
Symbol 47 MovieClip Frame 8
gotoAndPlay (1);
Symbol 47 MovieClip Frame 14
gotoAndPlay (1);
Symbol 52 Button
on (release) {
setProperty("/scorecard", _visible , "1");
}
Symbol 56 MovieClip Frame 80
gotoAndPlay (1);
Symbol 71 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 2
Set("..:shotspeed", "1.5");
Symbol 71 MovieClip Frame 3
Set("..:shotspeed", "2");
Symbol 71 MovieClip Frame 4
Set("..:shotspeed", "2.5");
Symbol 71 MovieClip Frame 5
Set("..:shotspeed", "3");
Symbol 71 MovieClip Frame 6
Set("..:shotspeed", "3.5");
Symbol 71 MovieClip Frame 7
Set("..:shotspeed", "4");
Symbol 71 MovieClip Frame 8
Set("..:shotspeed", "4.5");
Symbol 71 MovieClip Frame 10
Set("..:shotspeed", "5");
Symbol 71 MovieClip Frame 11
Set("..:shotspeed", "5.5");
Symbol 71 MovieClip Frame 12
Set("..:shotspeed", "6");
Symbol 71 MovieClip Frame 13
Set("..:shotspeed", "6.5");
Symbol 71 MovieClip Frame 14
Set("..:shotspeed", "7");
Symbol 71 MovieClip Frame 15
Set("..:shotspeed", "8");
Symbol 71 MovieClip Frame 16
Set("..:shotspeed", "9");
Symbol 71 MovieClip Frame 18
Set("..:shotspeed", "10");
Symbol 71 MovieClip Frame 20
Set("..:shotspeed", "9");
Symbol 71 MovieClip Frame 21
Set("..:shotspeed", "8");
Symbol 71 MovieClip Frame 22
Set("..:shotspeed", "7");
Symbol 71 MovieClip Frame 23
Set("..:shotspeed", "6.5");
Symbol 71 MovieClip Frame 24
Set("..:shotspeed", "6");
Symbol 71 MovieClip Frame 25
Set("..:shotspeed", "5.5");
Symbol 71 MovieClip Frame 26
Set("..:shotspeed", "5");
Symbol 71 MovieClip Frame 28
Set("..:shotspeed", "4.5");
Symbol 71 MovieClip Frame 29
Set("..:shotspeed", "4");
Symbol 71 MovieClip Frame 30
Set("..:shotspeed", "3.5");
Symbol 71 MovieClip Frame 31
Set("..:shotspeed", "3");
Symbol 71 MovieClip Frame 32
Set("..:shotspeed", "2.5");
Symbol 71 MovieClip Frame 33
Set("..:shotspeed", "2");
Symbol 71 MovieClip Frame 34
gotoAndPlay (2);
Set("..:shotspeed", "1.5");
Symbol 82 MovieClip Frame 1
Set("..:balldiameter", _width / "2");
stop();
Symbol 82 MovieClip Frame 6
gotoAndPlay (2);
Symbol 84 MovieClip Frame 1
Set("..:balldiameter", _width / "2");
stop();
Symbol 84 MovieClip Frame 6
gotoAndPlay (2);
Symbol 102 Button
on (release) {
_visible = "0";
}
Symbol 125 MovieClip Frame 1
p1total = (((((((..:p1_h1 + ..:p1_h2) + ..:p1_h3) + ..:p1_h4) + ..:p1_h5) + ..:p1_h6) + ..:p1_h7) + ..:p1_h8) + ..:p1_h9;
p2total = (((((((..:p2_h1 + ..:p2_h2) + ..:p2_h3) + ..:p2_h4) + ..:p2_h5) + ..:p2_h6) + ..:p2_h7) + ..:p2_h8) + ..:p2_h9;
Symbol 125 MovieClip Frame 2
gotoAndPlay (1);
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 9
gotoAndStop (1);
Symbol 130 MovieClip Frame 35
gotoAndStop (1);
Symbol 130 MovieClip Frame 139
gotoAndStop (1);
Symbol 130 MovieClip Frame 144
gotoAndStop (1);
Symbol 130 MovieClip Frame 167
gotoAndStop (1);
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 2
stop();
Symbol 137 Button
on (release) {
if (..:move == "0") {
tellTarget ("../sounds") {
gotoAndPlay ("hit");
};
tellTarget ("../powermeter") {
stop();
};
tellTarget ("../ball") {
gotoAndPlay (2);
};
Set("..:move", "1");
_visible = "0";
if (..:abs_mouse_x >= ..:abs_mouse_y) {
Set("..:xmov", ..:shotspeed * xsign);
Set("..:ymov", ((..:shotspeed * ..:abs_mouse_y) / ..:abs_mouse_x) * ysign);
} else {
Set("..:ymov", ..:shotspeed * ysign);
Set("..:xmov", (..:shotspeed * (..:abs_mouse_x / ..:abs_mouse_y)) * xsign);
}
setProperty("../ball", _x , gunx);
setProperty("../ball", _y , guny);
}
}
on (press) {
if (..:move == "0") {
setProperty("../powermeter", _visible , "1");
tellTarget ("../powermeter") {
gotoAndPlay (2);
};
tellTarget ("/hole") {
gotoAndPlay (1);
};
}
}
on (rollOver) {
tellTarget ("aimerthing") {
gotoAndStop (2);
}
}
on (rollOut) {
tellTarget ("aimerthing") {
gotoAndStop (1);
}
}
Symbol 138 MovieClip Frame 1
gunx = _x;
guny = _y;
sx = getProperty("../ship", _x);
sy = getProperty("../ship", _y);
mouse_x = getProperty("../ship", _x) - gunx;
mouse_y = getProperty("../ship", _y) - guny;
if (mouse_x < "0") {
Set("..:abs_mouse_x", mouse_x + (mouse_x * (-"2")));
xsign = -"1";
} else {
Set("..:abs_mouse_x", mouse_x);
xsign = "1";
}
if (mouse_y < "0") {
Set("..:abs_mouse_y", mouse_y + (mouse_y * (-"2")));
ysign = -"1";
} else {
Set("..:abs_mouse_y", mouse_y);
ysign = "1";
}
input = (..:abs_mouse_x * ..:abs_mouse_x) + (..:abs_mouse_y * ..:abs_mouse_y);
call("sqrt");
hyp = output;
sin_theta = ..:abs_mouse_y / hyp;
counter = "0";
found = "0";
while (!found) {
if (sin_theta >= (substring(..:sine_lookup_table, (counter * "6") + "1", "5"))) {
angle = counter;
} else {
found = "1";
}
counter = counter + "1";
}
if (sx < gunx) {
angle = ("90" - angle) + "90";
}
if (guny < sy) {
angle = angle + "180";
} else {
angle = ("90" - angle) + "90";
}
_rotation = angle;
Symbol 138 MovieClip Frame 2
gotoAndPlay (1);
Symbol 138 MovieClip Frame 9
n = "1";
counter = "0";
while (counter < "11") {
n = n - (((n * n) - input) / ("2" * n));
counter = counter + "1";
}
output = n;
Symbol 139 Button
on (release) {
if (..:move == "0") {
tellTarget ("../sounds") {
gotoAndPlay ("hit");
};
tellTarget ("../powermeter") {
stop();
};
tellTarget ("../ball2") {
gotoAndPlay (2);
};
Set("..:move", "1");
if (..:abs_mouse_x2 >= ..:abs_mouse_y2) {
Set("..:xmov2", ..:shotspeed * xsign2);
Set("..:ymov2", ((..:shotspeed * ..:abs_mouse_y2) / ..:abs_mouse_x2) * ysign2);
} else {
Set("..:ymov2", ..:shotspeed * ysign2);
Set("..:xmov2", (..:shotspeed * (..:abs_mouse_x2 / ..:abs_mouse_y2)) * xsign2);
}
setProperty("../ball2", _x , gunx);
setProperty("../ball2", _y , guny);
}
_visible = "0";
}
on (press) {
if (..:move == "0") {
setProperty("../powermeter", _visible , "1");
tellTarget ("../powermeter") {
gotoAndPlay (2);
};
tellTarget ("/hole") {
gotoAndPlay (1);
};
}
}
on (rollOver) {
tellTarget ("aimerthing") {
gotoAndStop (2);
}
}
on (rollOut) {
tellTarget ("aimerthing") {
gotoAndStop (1);
}
}
Symbol 140 MovieClip Frame 1
gunx = _x;
guny = _y;
sx = getProperty("../ship", _x);
sy = getProperty("../ship", _y);
mouse_x2 = getProperty("../ship", _x) - gunx;
mouse_y2 = getProperty("../ship", _y) - guny;
if (mouse_x2 < "0") {
Set("..:abs_mouse_x2", mouse_x2 + (mouse_x2 * (-"2")));
xsign2 = -"1";
} else {
Set("..:abs_mouse_x2", mouse_x2);
xsign2 = "1";
}
if (mouse_y2 < "0") {
Set("..:abs_mouse_y2", mouse_y2 + (mouse_y2 * (-"2")));
ysign2 = -"1";
} else {
Set("..:abs_mouse_y2", mouse_y2);
ysign2 = "1";
}
input = (..:abs_mouse_x2 * ..:abs_mouse_x2) + (..:abs_mouse_y2 * ..:abs_mouse_y2);
call("sqrt");
hyp2 = output;
sin_theta = ..:abs_mouse_y2 / hyp2;
counter = "0";
found = "0";
while (!found) {
if (sin_theta >= (substring(..:sine_lookup_table, (counter * "6") + "1", "5"))) {
angle2 = counter;
} else {
found = "1";
}
counter = counter + "1";
}
if (sx < gunx) {
angle2 = ("90" - angle2) + "90";
}
if (guny < sy) {
angle2 = angle2 + "180";
} else {
angle2 = ("90" - angle2) + "90";
}
_rotation = angle2;
Symbol 140 MovieClip Frame 2
gotoAndPlay (1);
Symbol 140 MovieClip Frame 9
n = "1";
counter = "0";
while (counter < "11") {
n = n - (((n * n) - input) / ("2" * n));
counter = counter + "1";
}
output = n;
Symbol 184 MovieClip Frame 1
holex = _x;
holey = _y;
holediameter = _width / "2.5";
if ((((holex - holediameter) < ..:ballx) and (..:ballx < (holex + holediameter))) and (((holey - holediameter) < ..:bally) and (..:bally < (holey + holediameter)))) {
Set("..:inthehole1", "1");
Set("..:stopped", "1");
setProperty("../ball", _visible , "0");
setProperty("../ball", _y , bally + "30");
gotoAndPlay (4);
}
if ((((holex - holediameter) < ..:ballx2) and (..:ballx2 < (holex + holediameter))) and (((holey - holediameter) < ..:bally2) and (..:bally2 < (holey + holediameter)))) {
Set("..:inthehole2", "1");
Set("..:stopped", "1");
setProperty("../ball2", _visible , "0");
setProperty("../ball2", _y , bally2 + "30");
gotoAndPlay (10);
}
Symbol 184 MovieClip Frame 2
gotoAndPlay (1);
Symbol 184 MovieClip Frame 3
gotoAndPlay (1);
Symbol 184 MovieClip Frame 8
gotoAndPlay (1);
Symbol 184 MovieClip Frame 14
gotoAndPlay (1);