Frame 1
stop();
Instance of Symbol 12 MovieClip "loadBarHousing" in Frame 1
onClipEvent (load) {
loadAmount = _root._totalframes;
if (_root._framesloaded == loadAmount) {
_root.gotoAndStop("options");
}
}
onClipEvent (enterFrame) {
if (_root._framesloaded == loadAmount) {
_root.gotoAndStop("options");
} else {
total = Math.round(_root.getBytesTotal() / 1024);
bloaded = Math.round(_root.getBytesLoaded() / 1024);
percent = Math.round((bloaded / total) * 100);
_root.loadBar._width = _width * (percent / 100);
}
}
Frame 2
function go_compstart() {
_root.comp1maxr = 180;
_root.comp2maxr = 0;
tg1y = _root.gorilla1._y;
tg2y = _root.gorilla2._y;
tb2y = _root.building2._y;
tb3y = _root.building3._y;
tb4y = _root.building4._y;
tb5y = _root.building5._y;
tb6y = _root.building6._y;
tb7y = _root.building7._y;
if (70 < _root.wind) {
_root.aicomp.p2vel = 800;
} else if (40 < _root.wind) {
_root.aicomp.p2vel = 650;
} else {
_root.aicomp.p2vel = 500;
}
if (_root.wind < -70) {
_root.aicomp.p1vel = 800;
} else if (_root.wind < -40) {
_root.aicomp.p1vel = 650;
} else {
_root.aicomp.p1vel = 500;
}
if (tb2y < tg1y) {
if ((tg1y - tb2y) < 20) {
_root.comp1maxr = 160;
} else if ((tg1y - tb2y) < 30) {
_root.comp1maxr = 150;
} else if ((tg1y - tb2y) < 40) {
_root.comp1maxr = 135;
} else if ((tg1y - tb2y) < 50) {
_root.comp1maxr = 120;
} else if ((tg1y - tb2y) < 60) {
_root.comp1maxr = 115;
} else if ((tg1y - tb2y) < 70) {
_root.comp1maxr = 110;
} else if ((tg1y - tb2y) < 80) {
_root.comp1maxr = 105;
} else if ((tg1y - tb2y) < 90) {
_root.comp1maxr = 105;
} else if ((tg1y - tb2y) < 100) {
_root.comp1maxr = 105;
} else {
_root.comp2maxr = 100;
}
}
if (tb3y < tg1y) {
if (((tg1y - tb3y) < 25) && (160 < _root.comp1maxr)) {
_root.comp1maxr = 160;
} else if (((tg1y - tb3y) < 30) && (155 < _root.comp1maxr)) {
_root.comp1maxr = 155;
} else if (((tg1y - tb3y) < 45) && (150 < _root.comp1maxr)) {
_root.comp1maxr = 150;
} else if (((tg1y - tb3y) < 55) && (145 < _root.comp1maxr)) {
_root.comp1maxr = 145;
} else if (((tg1y - tb3y) < 65) && (140 < _root.comp1maxr)) {
_root.comp1maxr = 140;
} else if (((tg1y - tb3y) < 80) && (135 < _root.comp1maxr)) {
_root.comp1maxr = 135;
} else if (((tg1y - tb3y) < 100) && (130 < _root.comp1maxr)) {
_root.comp1maxr = 130;
} else if (((tg1y - tb3y) < 120) && (125 < _root.comp1maxr)) {
_root.comp1maxr = 125;
} else if (((tg1y - tb3y) < 130) && (120 < _root.comp1maxr)) {
_root.comp1maxr = 120;
} else if (115 < _root.comp1maxr) {
_root.comp1maxr = 115;
}
}
if (tb4y < tg1y) {
if (((tg1y - tb4y) < 70) && (145 < _root.comp1maxr)) {
_root.comp1maxr = 145;
} else if (((tg1y - tb4y) < 100) && (140 < _root.comp1maxr)) {
_root.comp1maxr = 140;
} else if (((tg1y - tb4y) < 150) && (130 < _root.comp1maxr)) {
_root.comp1maxr = 130;
} else if (120 < _root.comp1maxr) {
_root.comp1maxr = 120;
}
}
if (150 < _root.comp1maxr) {
if (40 < _root.wind) {
_root.comp1maxr = random(15) + 105;
} else if (_root.wind < -40) {
_root.comp1maxr = random(15) + 135;
} else {
_root.comp1maxr = random(15) + 125;
}
}
if (tb7y < tg2y) {
if ((tg2y - tb7y) < 20) {
_root.comp2maxr = 20;
} else if ((tg2y - tb7y) < 30) {
_root.comp2maxr = 30;
} else if ((tg2y - tb7y) < 40) {
_root.comp2maxr = 45;
} else if ((tg2y - tb7y) < 50) {
_root.comp2maxr = 60;
} else if ((tg2y - tb7y) < 60) {
_root.comp2maxr = 65;
} else if ((tg2y - tb7y) < 70) {
_root.comp2maxr = 70;
} else if ((tg2y - tb7y) < 80) {
_root.comp2maxr = 75;
} else if ((tg2y - tb7y) < 90) {
_root.comp2maxr = 75;
} else if ((tg2y - tb7y) < 100) {
_root.comp2maxr = 75;
} else {
_root.comp2maxr = 80;
}
}
if (tb6y < tg2y) {
if (((tg2y - tb6y) < 25) && (_root.comp2maxr < 20)) {
_root.comp2maxr = 20;
} else if (((tg2y - tb6y) < 30) && (_root.comp2maxr < 25)) {
_root.comp2maxr = 25;
} else if (((tg2y - tb6y) < 45) && (_root.comp2maxr < 30)) {
_root.comp2maxr = 30;
} else if (((tg2y - tb6y) < 55) && (_root.comp2maxr < 35)) {
_root.comp2maxr = 35;
} else if (((tg2y - tb6y) < 65) && (_root.comp2maxr < 40)) {
_root.comp2maxr = 40;
} else if (((tg2y - tb6y) < 80) && (_root.comp2maxr < 45)) {
_root.comp2maxr = 45;
} else if (((tg2y - tb6y) < 100) && (_root.comp2maxr < 50)) {
_root.comp2maxr = 50;
} else if (((tg2y - tb6y) < 120) && (_root.comp2maxr < 55)) {
_root.comp2maxr = 55;
} else if (((tg2y - tb6y) < 130) && (_root.comp2maxr < 60)) {
_root.comp2maxr = 60;
} else if (_root.comp2maxr < 65) {
_root.comp2maxr = 65;
}
}
if (tb5y < tg2y) {
if (((tg2y - tb5y) < 70) && (_root.comp2maxr < 35)) {
_root.comp2maxr = 35;
} else if (((tg2y - tb5y) < 100) && (_root.comp2maxr < 40)) {
_root.comp2maxr = 40;
} else if (((tg2y - tb5y) < 150) && (_root.comp2maxr < 50)) {
_root.comp2maxr = 50;
} else if (_root.comp2maxr < 60) {
_root.comp2maxr = 60;
}
}
if (_root.comp2maxr < 30) {
if (_root.wind < -40) {
_root.comp2maxr = random(15) + 60;
} else if (40 < _root.wind) {
_root.comp2maxr = random(15) + 30;
} else {
_root.comp2maxr = random(15) + 40;
}
}
_root.aicomp.p1rotation = _root.comp1maxr;
_root.aicomp.p2rotation = _root.comp2maxr;
_root.aicomp.bananax = 0;
_root.aicomp.bananay = 0;
}
function aigetc() {
tempbanx = Math.round(_root.banana._x);
tempbany = Math.round(_root.banana._y);
if ((pturn == 1) && (p1comp == 1)) {
_root.aicomp.bananax = tempbanx;
_root.aicomp.bananay = tempbany;
if ((tempbanx < 100) && ((_root.aicomp.p1rotation - 5) >= _root.comp1maxr)) {
_root.aicomp.p1rotation = _root.aicomp.p1rotation - 5;
} else if ((tempbanx < 165) && ((_root.aicomp.p1rotation - 5) >= _root.comp1maxr)) {
_root.aicomp.p1rotation = _root.aicomp.p1rotation - 5;
} else if ((tempbanx < 225) && ((_root.aicomp.p1rotation - 5) >= _root.comp1maxr)) {
_root.aicomp.p1rotation = _root.aicomp.p1rotation - 5;
} else if ((tempbanx < (_root.gorilla2._x - 200)) && (_root.comp1maxv >= (_root.aicomp.p1vel + 200))) {
_root.aicomp.p1vel = _root.aicomp.p1vel + 200;
} else if ((tempbanx < (_root.gorilla2._x - 150)) && (_root.comp1maxv >= (_root.aicomp.p1vel + 100))) {
_root.aicomp.p1vel = _root.aicomp.p1vel + 100;
} else if ((tempbanx < (_root.gorilla2._x - 50)) && (_root.comp1maxv >= (_root.aicomp.p1vel + 50))) {
_root.aicomp.p1vel = _root.aicomp.p1vel + 50;
} else if ((tempbanx < (_root.gorilla2._x - 20)) && (_root.comp1maxv >= (_root.aicomp.p1vel + 20))) {
_root.aicomp.p1vel = _root.aicomp.p1vel + 20;
} else if ((tempbanx < _root.gorilla2._x) && (_root.comp1maxv >= (_root.aicomp.p1vel + 10))) {
_root.aicomp.p1vel = _root.aicomp.p1vel + 10;
} else if ((tempbanx < _root.gorilla2._x) && (_root.aicomp.p1vel == _root.comp1maxv)) {
_root.aicomp.p1rotation = _root.aicomp.p1rotation + 3;
} else if (_root.gorilla2._x < tempbanx) {
if (tempbany < (_root.gorilla2._y - 100)) {
_root.aicomp.p1vel = _root.aicomp.p1vel - 100;
} else if (tempbany < (_root.gorilla2._y - 50)) {
_root.aicomp.p1vel = _root.aicomp.p1vel - 50;
} else if (tempbany < _root.gorilla2._y) {
_root.aicomp.p1vel = _root.aicomp.p1vel - 20;
} else {
_root.aicomp.p1vel = _root.aicomp.p1vel - 10;
}
}
} else if ((pturn == 2) && (p2comp == 1)) {
_root.aicomp.bananax = tempbanx;
_root.aicomp.bananay = tempbany;
if ((450 < tempbanx) && (_root.comp2maxr >= (_root.aicomp.p2rotation + 5))) {
_root.aicomp.p2rotation = _root.aicomp.p2rotation + 5;
} else if ((387 < tempbanx) && (_root.comp2maxr >= (_root.aicomp.p2rotation + 5))) {
_root.aicomp.p2rotation = _root.aicomp.p2rotation + 5;
} else if ((330 < tempbanx) && (_root.comp2maxr >= (_root.aicomp.p2rotation + 5))) {
_root.aicomp.p2rotation = _root.aicomp.p2rotation + 5;
} else if (((_root.gorilla1._x + 200) < tempbanx) && (_root.comp2maxv >= (_root.aicomp.p2vel + 200))) {
_root.aicomp.p2vel = _root.aicomp.p2vel + 200;
} else if (((_root.gorilla1._x + 150) < tempbanx) && (_root.comp2maxv >= (_root.aicomp.p2vel + 100))) {
_root.aicomp.p2vel = _root.aicomp.p2vel + 100;
} else if (((_root.gorilla1._x + 50) < tempbanx) && (_root.comp2maxv >= (_root.aicomp.p2vel + 50))) {
_root.aicomp.p2vel = _root.aicomp.p2vel + 50;
} else if (((_root.gorilla1._x + 20) < tempbanx) && (_root.comp2maxv >= (_root.aicomp.p2vel + 20))) {
_root.aicomp.p2vel = _root.aicomp.p2vel + 20;
} else if ((_root.gorilla1._x < tempbanx) && (_root.comp2maxv >= (_root.aicomp.p2vel + 10))) {
_root.aicomp.p2vel = _root.aicomp.p2vel + 10;
} else if ((_root.gorilla1._x < tempbanx) && (_root.aicomp.p2vel == _root.comp2maxv)) {
_root.aicomp.p2rotation = _root.aicomp.p2rotation - 3;
} else if (tempbanx < _root.gorilla1._x) {
if (tempbany < (_root.gorilla1._y - 100)) {
_root.aicomp.p2vel = _root.aicomp.p2vel - 100;
} else if (tempbany < (_root.gorilla1._y - 50)) {
_root.aicomp.p2vel = _root.aicomp.p2vel - 50;
} else if (tempbany < _root.gorilla1._y) {
_root.aicomp.p2vel = _root.aicomp.p2vel - 20;
} else {
_root.aicomp.p2vel = _root.aicomp.p2vel - 10;
}
}
}
}
function do_moon() {
moon._x = random(400) + 50;
moon._y = random(60) + 20;
while (((moon._x < 370) && (180 < moon._x)) && (moon._y < 70)) {
moon._x = random(400) + 50;
moon._y = random(60) + 20;
}
moon.gotoAndPlay("reset_it");
}
function go_lights() {
building1.go_lights();
building2.go_lights();
building3.go_lights();
building4.go_lights();
building5.go_lights();
building6.go_lights();
building7.go_lights();
building8.go_lights();
}
function checkc() {
if (!length(p1name)) {
Selection.setFocus("p1name");
} else if (!length(p2name)) {
Selection.setFocus("p2name");
}
}
function do_wind() {
wind = random(100);
if ((random(2) + 1) == 1) {
wind = -wind;
windbar._x = 258;
windbar._rotation = 180;
windarrow._rotation = 180;
windbar._width = Math.abs(wind);
windarrow._x = windbar._x - (windbar._width - 5);
} else {
windbar._x = 290;
windbar._rotation = 0;
windarrow._rotation = 0;
windbar._width = Math.abs(wind);
windarrow._x = windbar._x + (windbar._width - 5);
}
wind_display = Math.abs(wind);
}
function new_round() {
gorilla1._x = 10.9 + (gorilla1._width / 2);
gorilla2._x = 488.3 + (gorilla2._width / 2);
p1arrow._rotation = 90;
p1vel = 500;
p2arrow._rotation = 90;
p2vel = 500;
do_moon();
do_wind();
go_lights();
go_compstart();
}
function set_banana(num) {
if (num == 1) {
banana._x = (gorilla1._x + (gorilla1._width / 2)) + 2;
banana._y = (gorilla1._y - (gorilla1._height / 2)) + 3;
banana._rotation = 155;
} else if (num == 2) {
banana._x = (gorilla2._x - (gorilla2._width / 2)) - 4;
banana._y = (gorilla2._y - (gorilla2._width / 2)) - 5;
banana._rotation = -110;
}
}
function change_turn() {
shooting = false;
banana.gravity = 0;
banana.xspeed = 0;
banana.yspeed = 0;
banana.rotate = "";
banana.wind = 0;
if (pturn == 1) {
set_banana(2);
pturn = 2;
turn_status = p2name + "'s\nTurn";
} else if (pturn == 2) {
set_banana(1);
pturn = 1;
turn_status = p1name + "'s\nTurn";
}
}
stop();
comp1maxr = 180;
comp1maxv = 1000;
comp2maxr = 0;
comp2maxv = 1000;
if (!p1comp) {
p1comp = 0;
}
if (!p2comp) {
p2comp = 0;
}
if (p1comp == 1) {
c1check._alpha = 100;
p1name = "Computer 1";
} else {
c1check._alpha = 0;
p1name = "";
}
if (p2comp == 1) {
c2check._alpha = 100;
p2name = "Computer 2";
} else {
c2check._alpha = 0;
p2name = "";
}
if (!points) {
points = 5;
gravity = 0.2;
Selection.setFocus("p1name");
}
p1score = 0;
p2score = 0;
Instance of Symbol 86 MovieClip "building1" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(160) + 160);
_root.gorilla1._y = _y - (_root.gorilla1._height / 2);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building8" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(160) + 160);
_root.gorilla2._y = _y - (_root.gorilla2._height / 2);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building2" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(160) + 160);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building3" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(200) + 100);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building5" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(200) + 100);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building4" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(200) + 100);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building6" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(200) + 100);
}
go_lights();
}
Instance of Symbol 86 MovieClip "building7" in Frame 3
onClipEvent (load) {
function go_lights() {
xdim = [5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1, 5.7, 23.9, 43.1];
ydim = [4, 4, 4, 36, 36, 36, 68, 68, 68, 100, 100, 100, 132, 132, 132, 164, 164, 164, 196, 196, 196, 228, 228, 228, 260, 260, 260, 292, 292, 292];
i = 0;
while (i < 30) {
rn = random(10) + 1;
if (rn < 7) {
tile = "wdk";
} else {
tile = "wlt";
}
attachMovie(tile, tile + i, i);
setProperty(tile + i, _x , xdim[i]);
setProperty(tile + i, _y , ydim[i]);
i++;
}
_y = (random(160) + 160);
}
go_lights();
}
Instance of Symbol 88 MovieClip "banana" in Frame 3
onClipEvent (load) {
_root.pturn = random(2) + 1;
_root.change_turn();
_root.do_wind();
xspeed = 0;
yspeed = 0;
left = -10;
right = 560;
top = 0;
bottom = 400;
friction = 0.992;
gravity = 0;
wind = 0;
}
onClipEvent (enterFrame) {
if (((((((this.hitTest(_root.building1.heart) || (this.hitTest(_root.building2.heart))) || (this.hitTest(_root.building3.heart))) || (this.hitTest(_root.building4.heart))) || (this.hitTest(_root.building5.heart))) || (this.hitTest(_root.building6.heart))) || (this.hitTest(_root.building7.heart))) || (this.hitTest(_root.building8.heart))) {
_root.bexp._x = _x + (xspeed / 3);
_root.bexp._y = _y + (yspeed / 3);
_root.bexp._rotation = _rotation;
_root.aigetc();
_y = -20000;
_root.bexp.gotoAndPlay(2);
xspeed = 0;
yspeed = 0;
} else if (this.hitTest(_root.gorilla1.heart)) {
_y = -20000;
gravity = 0;
rotate = "";
yspeed = 0;
xspeed = 0;
_root.gorilla1.gotoAndPlay("explode");
} else if (this.hitTest(_root.gorilla2.heart)) {
_y = -20000;
gravity = 0;
rotate = "";
yspeed = 0;
xspeed = 0;
_root.gorilla2.gotoAndPlay("explode");
}
if (this.hitTest(_root.moon.heart) && (mhit != 1)) {
mhit = 1;
_root.moon.gotoAndPlay(2);
}
_x = (_x + Number(xspeed));
if ((_x < left) || (right < _x)) {
_root.aigetc();
_root.change_turn();
} else {
xspeed = xspeed * friction;
xspeed = xspeed + wind;
}
_y = (_y + Number(yspeed));
if (bottom < _y) {
_root.aigetc();
_root.change_turn();
} else {
if ((((_y < (top - 15)) && (_x < right)) && (left < _x)) && (-15000 < _y)) {
_root.osarrow._x = _x;
} else {
_root.osarrow._x = -200;
}
yspeed = (yspeed + gravity) * friction;
}
if (rotate == "p1") {
_rotation = (_rotation + 25);
} else if (rotate == "p2") {
_rotation = (_rotation - 25);
}
}
Instance of Symbol 90 MovieClip "aicomp" in Frame 3
onClipEvent (load) {
p2rotation = 90;
p2vel = 500;
p1rotation = 90;
p1vel = 500;
_root.go_compstart();
}
onClipEvent (enterFrame) {
if (((_root.p2comp == 1) && (_root.pturn == 2)) && (_root.shooting == false)) {
if (_root.p2arrow._rotation < p2rotation) {
_root.p2arrow._rotation++;
} else if (p2rotation < _root.p2arrow._rotation) {
_root.p2arrow._rotation--;
} else if (_root.p2arrow._rotation == p2rotation) {
if (_root.p2vel < p2vel) {
_root.p2vel = _root.p2vel + 5;
} else if (p2vel < _root.p2vel) {
_root.p2vel = _root.p2vel - 5;
} else if (_root.p2vel == p2vel) {
if (_root.shooting == false) {
_root.shooting = true;
_root.banana.wind = _root.wind / 1000;
_root.banana.gravity = _root.gravity;
_root.angle = ((-_root.p2ang) * Math.PI) / 180;
_root.banana.xspeed = (-(_root.p2vel / 45)) * Math.cos(_root.angle);
_root.banana.yspeed = (_root.p2vel / 45) * Math.sin(_root.angle);
_root.banana.rotate = "p2";
_root.gorilla2.explode.gotoAndPlay(2);
}
}
_root.p2vbar._height = (_root.p2vel * (_root.p2vhousing._height * 0.92)) / 1000;
}
}
if (((_root.p1comp == 1) && (_root.pturn == 1)) && (_root.shooting == false)) {
if (_root.p1arrow._rotation < p1rotation) {
_root.p1arrow._rotation++;
} else if (p1rotation < _root.p1arrow._rotation) {
_root.p1arrow._rotation--;
} else if (_root.p1arrow._rotation == p1rotation) {
if (_root.p1vel < p1vel) {
_root.p1vel = _root.p1vel + 5;
} else if (p1vel < _root.p1vel) {
_root.p1vel = _root.p1vel - 5;
} else if (_root.p1vel == p1vel) {
if (_root.shooting == false) {
_root.shooting = true;
_root.banana.wind = _root.wind / 1000;
_root.banana.gravity = _root.gravity;
_root.angle = ((-_root.p1ang) * Math.PI) / 180;
_root.banana.xspeed = (-(_root.p1vel / 45)) * Math.cos(_root.angle);
_root.banana.yspeed = (_root.p1vel / 45) * Math.sin(_root.angle);
_root.banana.rotate = "p1";
_root.gorilla1.explode.gotoAndPlay(2);
}
}
_root.p1vbar._height = (_root.p1vel * (_root.p1vhousing._height * 0.92)) / 1000;
}
}
}
Instance of Symbol 103 MovieClip "p1arrow" in Frame 3
onClipEvent (load) {
_rotation = 90;
}
onClipEvent (enterFrame) {
if (al && (0 < _rotation)) {
_rotation = (_rotation-1);
} else if (ar && (_rotation < 180)) {
_rotation = (_rotation+1);
}
_root.p1ang = _rotation;
}
onClipEvent (keyDown) {
if (((_root.p1comp == 0) && (_root.shooting == false)) && (_root.pturn == 1)) {
if (Key.getCode() == 65) {
al = true;
}
if (Key.getCode() == 68) {
ar = true;
}
}
}
onClipEvent (keyUp) {
if (_root.p1comp == 0) {
if (Key.getCode() == 65) {
al = false;
}
if (Key.getCode() == 68) {
ar = false;
}
}
}
Instance of Symbol 107 MovieClip "p1vbar" in Frame 3
onClipEvent (load) {
_root.p1vel = 500;
}
onClipEvent (enterFrame) {
if (vu && (_root.p1vel < 1000)) {
_root.p1vel = _root.p1vel + 5;
} else if (vd && (0 < _root.p1vel)) {
_root.p1vel = _root.p1vel - 5;
}
_height = ((_root.p1vel * (_root.p1vhousing._height * 0.92)) / 1000);
}
onClipEvent (keyDown) {
if (((_root.p1comp == 0) && (_root.shooting == false)) && (_root.pturn == 1)) {
if (Key.getCode() == 87) {
vu = true;
}
if (Key.getCode() == 83) {
vd = true;
}
}
}
onClipEvent (keyUp) {
if (_root.p1comp == 0) {
if (Key.getCode() == 87) {
vu = false;
}
if (Key.getCode() == 83) {
vd = false;
}
}
}
Instance of Symbol 103 MovieClip "p2arrow" in Frame 3
onClipEvent (load) {
_rotation = 90;
}
onClipEvent (enterFrame) {
if (al && (0 < _rotation)) {
_rotation = (_rotation-1);
} else if (ar && (_rotation < 180)) {
_rotation = (_rotation+1);
}
_root.p2ang = _rotation;
}
onClipEvent (keyDown) {
if (((_root.p2comp == 0) && (_root.shooting == false)) && (_root.pturn == 2)) {
if (Key.getCode() == 37) {
al = true;
}
if (Key.getCode() == 39) {
ar = true;
}
}
}
onClipEvent (keyUp) {
if (_root.p2comp == 0) {
if (Key.getCode() == 37) {
al = false;
}
if (Key.getCode() == 39) {
ar = false;
}
}
}
Instance of Symbol 107 MovieClip "p2vbar" in Frame 3
onClipEvent (load) {
_root.p2vel = 500;
}
onClipEvent (enterFrame) {
if (vu && (_root.p2vel < 1000)) {
_root.p2vel = _root.p2vel + 5;
} else if (vd && (0 < _root.p2vel)) {
_root.p2vel = _root.p2vel - 5;
}
_height = ((_root.p2vel * (_root.p2vhousing._height * 0.92)) / 1000);
}
onClipEvent (keyDown) {
if (((_root.p2comp == 0) && (_root.shooting == false)) && (_root.pturn == 2)) {
if (Key.getCode() == 38) {
vu = true;
}
if (Key.getCode() == 40) {
vd = true;
}
}
}
onClipEvent (keyUp) {
if (_root.p2comp == 0) {
if (Key.getCode() == 38) {
vu = false;
}
if (Key.getCode() == 40) {
vd = false;
}
}
}
Instance of Symbol 136 MovieClip "moon" in Frame 3
onClipEvent (load) {
_root.do_moon();
}
Symbol 38 Button
on (release) {
play();
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 11
stop();
_root.helpm = 2;
Symbol 41 MovieClip Frame 19
_root.helpm = 0;
Symbol 48 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 2
_parent._x = _parent._x - (_root.banana.xspeed / 2);
_parent._y = _parent._y - (_root.banana.yspeed / 5);
Symbol 48 MovieClip Frame 3
_parent._x = _parent._x - (_root.banana.xspeed / 2.5);
_parent._y = _parent._y - (_root.banana.yspeed / 6);
Symbol 48 MovieClip Frame 4
_parent._x = _parent._x - (_root.banana.xspeed / 3);
_parent._y = _parent._y - (_root.banana.yspeed / 7);
Symbol 48 MovieClip Frame 5
_parent._x = _parent._x + (_root.banana.xspeed / 2);
_parent._y = _parent._y + (_root.banana.yspeed / 5);
Symbol 48 MovieClip Frame 6
_parent._x = _parent._x + (_root.banana.xspeed / 2.5);
_parent._y = _parent._y + (_root.banana.yspeed / 6);
Symbol 48 MovieClip Frame 7
_parent._x = _parent._x + (_root.banana.xspeed / 3);
_parent._y = _parent._y + (_root.banana.yspeed / 7);
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 13
_root.p2score++;
if (_root.p2score == _root.points) {
_root.pturn = -1;
_root.uWin.gotoAndPlay(2);
} else {
_root.new_round();
_root.change_turn();
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 13
_root.p1score++;
if (_root.p1score == _root.points) {
_root.pturn = -1;
_root.uWin.gotoAndPlay(2);
} else {
_root.new_round();
_root.change_turn();
}
Symbol 65 Button
on (release, keyPress "<Enter>") {
if ((p1comp == 0) && (!length(p1name))) {
Selection.setFocus("p1name");
} else if ((p2comp == 0) && (!length(p2name))) {
Selection.setFocus("p2name");
} else {
if (p1comp == 1) {
p1name = "Computer 1";
}
if (p2comp == 1) {
p2name = "Computer 2";
}
helpm = 0;
gotoAndStop (3);
}
}
on (keyPress "<Tab>") {
if (Selection.getFocus() == "_level0.p1name") {
Selection.setFocus("p2name");
} else if (Selection.getFocus() == "_level0.p2name") {
Selection.setFocus("p1name");
}
}
Symbol 66 Button
on (release) {
if (points < 9) {
points++;
}
checkc();
}
Symbol 67 Button
on (release) {
if (1 < points) {
points--;
}
checkc();
}
Symbol 71 Button
on (release) {
if ((p1comp == 0) && (p2comp == 0)) {
if (gravity < 0.45) {
gravity = gravity + 0.05;
}
}
checkc();
}
Symbol 72 Button
on (release) {
if ((p1comp == 0) && (p2comp == 0)) {
if (0.1 < gravity) {
gravity = gravity - 0.05;
}
}
checkc();
}
Symbol 78 Button
on (release) {
if ((helpm != 1) && (helpm != 2)) {
helpm = 1;
helpmenu.gotoAndPlay(2);
} else if (helpm == 2) {
helpmenu.gotoAndPlay("leave");
}
}
Symbol 80 Button
on (press) {
if (p1comp == 1) {
c1check._alpha = 0;
p1name = "";
p1comp = 0;
} else if (p1comp == 0) {
gravity = 0.2;
c1check._alpha = 100;
p1name = "Computer 1";
p1comp = 1;
}
}
Symbol 82 Button
on (press) {
if (p2comp == 1) {
c2check._alpha = 0;
p2name = "";
p2comp = 0;
} else if (p2comp == 0) {
gravity = 0.2;
c2check._alpha = 100;
p2name = "Computer 2";
p2comp = 1;
}
}
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 14
_root.change_turn();
Symbol 95 Button
on (press) {
if (((p1comp == 0) && (shooting == false)) && (_root.pturn == 1)) {
p1arrow.ar = true;
}
}
on (release, dragOut, releaseOutside) {
if (p1comp == 0) {
p1arrow.ar = false;
}
}
Symbol 96 Button
on (press) {
if (((p1comp == 0) && (shooting == false)) && (_root.pturn == 1)) {
p1arrow.al = true;
}
}
on (release, dragOut, releaseOutside) {
if (p1comp == 0) {
p1arrow.al = false;
}
}
Symbol 97 Button
on (press) {
if (((p1comp == 0) && (shooting == false)) && (_root.pturn == 1)) {
p1vbar.vd = true;
}
}
on (release, dragOut, releaseOutside) {
if (p1comp == 0) {
p1vbar.vd = false;
}
}
Symbol 98 Button
on (press) {
if (((p1comp == 0) && (shooting == false)) && (_root.pturn == 1)) {
p1vbar.vu = true;
}
}
on (release, dragOut, releaseOutside) {
if (p1comp == 0) {
p1vbar.vu = false;
}
}
Symbol 110 Button
on (release, keyPress "<Space>") {
if ((pturn == 1) && (p1comp == 0)) {
if (shooting == false) {
shooting = true;
banana.wind = wind / 1000;
banana.gravity = _root.gravity;
angle = ((-p1ang) * Math.PI) / 180;
banana.xspeed = (-(p1vel / 45)) * Math.cos(angle);
banana.yspeed = (p1vel / 45) * Math.sin(angle);
banana.rotate = "p1";
gorilla1.explode.gotoAndPlay(2);
}
}
}
on (keyPress "o") {
gotoAndStop (2);
}
on (keyPress "n") {
pturn = random(2) + 1;
new_round();
change_turn();
}
Symbol 111 Button
on (press) {
if (((p2comp == 0) && (shooting == false)) && (_root.pturn == 2)) {
p2arrow.ar = true;
}
}
on (release, dragOut, releaseOutside) {
if (p2comp == 0) {
p2arrow.ar = false;
}
}
Symbol 112 Button
on (press) {
if (((p2comp == 0) && (shooting == false)) && (_root.pturn == 2)) {
p2arrow.al = true;
}
}
on (release, dragOut, releaseOutside) {
if (p2comp == 0) {
p2arrow.al = false;
}
}
Symbol 113 Button
on (press) {
if (((p2comp == 0) && (shooting == false)) && (_root.pturn == 2)) {
p2vbar.vd = true;
}
}
on (release, dragOut, releaseOutside) {
if (p2comp == 0) {
p2vbar.vd = false;
}
}
Symbol 114 Button
on (press) {
if (((p2comp == 0) && (shooting == false)) && (_root.pturn == 2)) {
p2vbar.vu = true;
}
}
on (release, dragOut, releaseOutside) {
if (p2comp == 0) {
p2vbar.vu = false;
}
}
Symbol 117 Button
on (release, keyPress "<Enter>") {
if ((pturn == 2) && (p2comp == 0)) {
if (shooting == false) {
shooting = true;
banana.wind = wind / 1000;
banana.gravity = _root.gravity;
angle = ((-p2ang) * Math.PI) / 180;
banana.xspeed = (-(p2vel / 45)) * Math.cos(angle);
banana.yspeed = (p2vel / 45) * Math.sin(angle);
banana.rotate = "p2";
gorilla2.explode.gotoAndPlay(2);
}
}
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 72
_root.banana.mhit = 0;
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 2
if (_root.p1score == _root.points) {
winName = _root.p1name;
score1 = _root.p1score;
score2 = _root.p2score;
} else if (_root.p2score == _root.points) {
winName = _root.p2name;
score1 = _root.p2score;
score2 = _root.p1score;
}
status = winName + " wins!";
status2 = (("FINAL SCORE: " + score1) + " - ") + score2;
Symbol 147 MovieClip Frame 125
_root.gotoAndStop("options");