Frame 1
stop();
function initSound() {
sMonkeyLand = new Sound(soundLandMC);
sMonkeyLand2 = new Sound(soundLandMC);
sMonkeyLand.attachSound("sMonkeyLand");
sMonkeyLand2.attachSound("sMonkeyLand2");
carab1 = new Sound(MCmusic);
carab1.attachSound("sCarab01");
carab2 = new Sound(MCmusic);
carab2.attachSound("sCarab02");
carab3 = new Sound(MCmusic);
carab3.attachSound("sCarab03");
carab4 = new Sound(MCmusic);
carab4.attachSound("sCarab04");
carab5 = new Sound(MCmusic);
carab5.attachSound("sCarab05");
}
function playSound(which) {
if (which == "land") {
r = random(2);
volume = random(80) + 20;
if (r == 1) {
sMonkeyLand.setVolume(volume);
sMonkeyLand.start();
} else {
sMonkeyLand2.setVolume(volume);
sMonkeyLand2.start();
}
} else if (which == "music") {
volume = 100;
r = random(3) + 3;
temp = eval ("carab" + String(r));
with (temp) {
setVolume(volume);
start();
}
} else if (which == "start") {
stopMusic();
volume = 100;
carab4.setVolume(volume);
carab4.start();
} else if (which == "menu") {
stopMusic();
volume = 100;
carab1.setVolume(volume);
carab1.start();
} else if (which == "end") {
stopMusic();
volume = 100;
carab2.setVolume(volume);
carab2.start();
}
}
function randomMusic() {
r = random(300);
if (r == 5) {
playSound("music");
}
}
function stopMusic() {
carab1.stop();
carab2.stop();
carab3.stop();
carab4.stop();
carab5.stop();
}
Frame 2
initSound();
initGame();
playSound("menu");
gotoAndPlay (51);
function initGame() {
barrellcount = 0;
lives = 3;
barrell = 0;
coconut = 0;
score = 0;
}
function startgame() {
menu.scoretext.text = String(score);
mode = "move";
monkey0.gotoAndPlay("still");
}
function resetgame() {
if (lives == 0) {
menu.resetmenu();
gotoAndPlay (15);
}
barrell = 0;
coconut = 0;
mode = "move";
monkey0.gotoAndPlay("still");
}
function fSendCocoNum() {
tUrl = "../counter.php?";
tUrl = (((tUrl + "game=") + 6) + "&num=") + _root.score;
loadVariablesNum (tUrl, 0);
}
function resetmove() {
tbarrellstate = eval (("barrell" + String(barrell)) + ".barrellState");
if (tbarrellstate == 0) {
killmonkey();
} else {
playSound("land");
stillmonkey();
tbarrelltype = eval (("barrell" + String(barrell)) + ".barrellType");
if (tbarrelltype == 2) {
temp = eval ("barrell" + String(barrell));
with (temp) {
if (barrellShake == 0) {
tnt.gotoAndPlay("shake");
barrellPlay = 1;
barrellShake = 1;
barrellState = 1;
}
}
}
}
}
function killmonkey(bang) {
mode = "kill";
menu.removelife();
temp = eval ("monkey" + String(barrell));
if (coconut == 0) {
with (temp) {
gotoAndPlay("kill");
blackmonkey._visible = 0;
if (bang == 1) {
blackmonkey._visible = 1;
}
}
} else {
with (temp) {
gotoAndPlay("killc");
blackmonkeyc._visible = 0;
if (bang == 1) {
blackmonkeyc._visible = 1;
}
}
}
}
function stillmonkey() {
temp = eval ("monkey" + String(barrell));
if (coconut == 0) {
with (temp) {
gotoAndPlay("still");
}
} else {
with (temp) {
gotoAndPlay("stillc");
}
}
}
function getkeys() {
if (mode == "play") {
tbarrell = -1;
dir = "none";
if (Key.isDown(39)) {
tbarrell = barrell - 1;
if (tbarrell < 0) {
tbarrell = 0;
} else {
dir = "right";
}
} else if (Key.isDown(37)) {
tbarrell = barrell + 1;
if (tbarrell > 6) {
tbarrell = 6;
} else {
dir = "left";
}
}
if (tbarrell != -1) {
if (dir != "none") {
mode = "move";
sdir = "jump" + String(dir);
temp = eval ("monkey" + String(barrell));
barrell = tbarrell;
if (dir == "left") {
if (coconut == 0) {
tellTarget (temp) {
stop();
gotoAndPlay ("jumpleft");
};
} else {
tellTarget (temp) {
stop();
gotoAndPlay ("jumpleftc");
};
}
} else if (dir == "right") {
if (coconut == 0) {
tellTarget (temp) {
stop();
gotoAndPlay ("jumpright");
};
} else {
tellTarget (temp) {
stop();
gotoAndPlay ("jumprightc");
};
}
}
}
}
}
}
function randomBarrells() {
freq = 200;
r = random(freq) + 1;
if (r < 6) {
tbs = eval (("barrell" + String(r)) + ".barrellPlay");
if (tbs == 0) {
temp = eval ("barrell" + String(r));
with (temp) {
if (barrellshake == 0) {
playbarrell();
}
}
}
}
}
function barrellsink(bnum, bang) {
if (barrell == bnum) {
if (mode == "play") {
killmonkey(bang);
}
}
}
function dropnuts() {
coconut = 0;
menu.addscore();
}
Instance of Symbol 29 MovieClip in Frame 2
onClipEvent (load) {
gotoAndPlay (20);
}
Instance of Symbol 29 MovieClip in Frame 9
onClipEvent (load) {
sounding = "yes";
gotoAndPlay (1);
}
Frame 15
this.fSendCocoNum();
this.playSound("end");
Frame 32
stop();
Frame 50
stop();
Instance of Symbol 74 MovieClip in Frame 51
onClipEvent (load) {
this.gotoAndPlay("start");
}
Instance of Symbol 74 MovieClip in Frame 51
onClipEvent (load) {
this.gotoAndPlay("start");
}
Frame 72
stop();
Frame 73
initGame();
playSound("start");
Instance of Symbol 74 MovieClip in Frame 81
onClipEvent (load) {
this.gotoAndPlay("stop");
}
Instance of Symbol 74 MovieClip in Frame 81
onClipEvent (load) {
this.gotoAndPlay("stop");
}
Frame 96
stop();
startgame();
Instance of Symbol 130 MovieClip "menu" in Frame 96
onClipEvent (enterFrame) {
_parent.getkeys();
_parent.randomBarrells();
_parent.randomMusic();
timer();
}
Instance of Symbol 74 MovieClip in Frame 96
onClipEvent (load) {
this.gotoAndPlay("bulid");
}
Instance of Symbol 74 MovieClip in Frame 96
onClipEvent (load) {
this.gotoAndPlay("bulid");
}
Symbol 26 MovieClip Frame 56
_parent.play();
Symbol 29 MovieClip Frame 1
sWaterSpray = new Sound(this);
sWaterSpray.attachSound("sWaterSpray");
sWaterwashing = new Sound(this);
sWaterwashing.attachSound("sWaterwashing");
Symbol 29 MovieClip Frame 36
if (sounding == "yes") {
sWaterSpray.setVolume(random(50) + 30);
sWaterSpray.start();
}
Symbol 29 MovieClip Frame 72
if (sounding == "yes") {
sWaterwashing.setVolume(random(40) + 20);
sWaterwashing.start();
}
Symbol 29 MovieClip Frame 99
this.gotoAndPlay("start");
Symbol 34 MovieClip Frame 13
r = random(5);
if (r == 2) {
} else {
gotoAndPlay (1);
}
Symbol 41 MovieClip Frame 1
r = random(35);
if (r < 2) {
gotoAndPlay (10);
} else if (r > 30) {
gotoAndPlay (25);
}
Symbol 41 MovieClip Frame 9
gotoAndPlay (1);
Symbol 41 MovieClip Frame 24
gotoAndPlay (1);
Symbol 41 MovieClip Frame 44
gotoAndPlay (1);
Symbol 51 MovieClip Frame 1
play();
Symbol 51 MovieClip Frame 64
stop();
Symbol 52 MovieClip Frame 63
stop();
Symbol 55 MovieClip Frame 1
function playsound(which) {
if (which == "move") {
volume = random(40) + 20;
sBarrellSink.setVolume(volume);
sBarrellSink.start();
} else if (which == "click") {
volume = random(30) + 20;
sWaterwashing.setVolume(volume);
sWaterwashing.start();
}
}
sWaterwashing = new Sound(this);
sWaterwashing.attachSound("sWaterwashing");
sBarrellSink = new Sound(this);
sBarrellSink.attachSound("sBarrellSink");
this.playsound("move");
myButton.onPress = function () {
playsound("click");
_root.playSound("menu");
_root.gotoAndPlay("menu");
};
Symbol 55 MovieClip Frame 2
stop();
Symbol 58 MovieClip Frame 1
this.scoretextMenu.text = String(_root.score);
Symbol 74 MovieClip Frame 2
play();
Symbol 74 MovieClip Frame 38
Symbol 74 MovieClip Frame 66
stop();
Symbol 74 MovieClip Frame 75
play();
Symbol 74 MovieClip Frame 90
stop();
Symbol 77 MovieClip Frame 1
myButton.onPress = function () {
playsound("click");
_root.gotoAndPlay("start");
};
stop();
function playsound(which) {
if (which == "move") {
volume = random(40) + 20;
sBarrellSink.setVolume(volume);
sBarrellSink.start();
} else if (which == "click") {
volume = random(30) + 20;
sWaterwashing.setVolume(volume);
sWaterwashing.start();
}
}
sWaterwashing = new Sound(this);
sWaterwashing.attachSound("sWaterwashing");
sBarrellSink = new Sound(this);
sBarrellSink.attachSound("sBarrellSink");
this.playsound("move");
Symbol 80 MovieClip Frame 1
function playsound(which) {
if (which == "move") {
volume = random(40) + 20;
sBarrellSink.setVolume(volume);
sBarrellSink.start();
} else if (which == "click") {
volume = random(30) + 20;
sWaterwashing.setVolume(volume);
sWaterwashing.start();
}
}
sWaterwashing = new Sound(this);
sWaterwashing.attachSound("sWaterwashing");
sBarrellSink = new Sound(this);
sBarrellSink.attachSound("sBarrellSink");
myButton.onPress = function () {
playsound("click");
_root.gotoAndPlay("instruct");
};
stop();
Symbol 84 MovieClip Frame 15
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 10
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 43
gotoAndStop (1);
Symbol 92 MovieClip Frame 44
_parent.barrellShake = 1;
Symbol 92 MovieClip Frame 64
_parent.playsound("shake");
Symbol 92 MovieClip Frame 103
_parent.barrellState = 0;
_parent.barrellPlay = 1;
_parent._parent.barrellsink(_parent.barrellnum, 1);
_parent.playsound("bang");
Symbol 92 MovieClip Frame 111
_parent.barrellShake = 0;
_parent._parent.barrellsink(_parent.barrellnum);
_parent.gotoAndPlay("new");
gotoAndStop (1);
Symbol 94 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 44
gotoAndStop (1);
Symbol 99 MovieClip Frame 1
function playsound(which) {
if (which == "movetop") {
r = random(2);
volume = random(40) + 20;
sWaterwashing.setVolume(volume);
sWaterwashing.start();
if (r == 1) {
sBarrellSurfaceLight.setVolume(volume);
sBarrellSurfaceLight.start();
} else {
sBarrellSurface.setVolume(volume);
sBarrellSurface.start();
}
} else if (which == "move") {
volume = random(30) + 20;
sBarrellSink.setVolume(volume);
sBarrellSink.start();
} else if (which == "moveDown") {
volume = random(40) + 40;
sBarrellAbove.setVolume(volume);
sBarrellAbove.start();
} else if (which == "moveUp") {
volume = random(40) + 40;
sBarrellUnder.setVolume(volume);
sBarrellUnder.start();
} else if (which == "shake") {
volume = random(30) + 50;
sBarrellRumble.setVolume(volume);
sBarrellRumble.start();
} else if (which == "bang") {
volume = random(30) + 50;
sExplosion.setVolume(volume);
sExplosion.start();
}
}
sBarrellSurfaceLight = new Sound(this);
sBarrellSurfaceLight.attachSound("sBarrellSurfaceLight");
sBarrellSurface = new Sound(this);
sBarrellSurface.attachSound("sBarrellSurface");
sWaterwashing = new Sound(this);
sWaterwashing.attachSound("sWaterwashing");
sBarrellSink = new Sound(this);
sBarrellSink.attachSound("sBarrellSink");
sBarrellAbove = new Sound(this);
sBarrellAbove.attachSound("sBarrellAbove");
sBarrellUnder = new Sound(this);
sBarrellUnder.attachSound("sBarrellUnder");
sExplosion = new Sound(this);
sExplosion.attachSound("sExplosion");
sBarrellRumble = new Sound(this);
sBarrellRumble.attachSound("sBarrellRumble");
function playbarrell() {
gotoAndPlay (3);
barrellPlay = 1;
}
function initBarrell() {
barrellState = 1;
barrellPlay = 0;
barrellShake = 0;
_parent.barrellcount = _parent.barrellcount + 1;
barrellnum = _parent.barrellcount;
setInvisible();
randomBarrell();
setVisible();
gotoAndPlay (127);
}
function randomBarrell() {
setInvisible();
r = random(3) + 1;
barrellType = r;
setVisible();
}
function setInvisible() {
normal._visible = 0;
tnt._visible = 0;
xxx._visible = 0;
}
function setVisible() {
if (barrellType == 1) {
normal._visible = 1;
} else if (barrellType == 2) {
tnt._visible = 1;
} else if (barrellType == 3) {
xxx._visible = 1;
}
}
initBarrell();
Symbol 99 MovieClip Frame 2
setInvisible();
setVisible();
stop();
Symbol 99 MovieClip Frame 3
barrellPlay = 1;
Symbol 99 MovieClip Frame 4
playsound("moveDown");
Symbol 99 MovieClip Frame 8
normal.gotoAndPlay("wobble");
xxx.gotoAndPlay("wobble");
tnt.gotoAndPlay("wobble");
Symbol 99 MovieClip Frame 28
barrellState = 0;
_parent.barrellsink(barrellnum);
Symbol 99 MovieClip Frame 29
playsound("move");
Symbol 99 MovieClip Frame 33
barrellShake = 0;
tnt.gotoAndStop("start");
_parent.barrellsink(barrellnum);
Symbol 99 MovieClip Frame 63
normal.gotoAndPlay("wobble");
xxx.gotoAndPlay("wobble");
tnt.gotoAndPlay("wobble");
Symbol 99 MovieClip Frame 72
playsound("moveUp");
Symbol 99 MovieClip Frame 78
randomBarrell();
Symbol 99 MovieClip Frame 90
playsound("move");
Symbol 99 MovieClip Frame 110
barrellState = 1;
Symbol 99 MovieClip Frame 112
playsound("movetop");
Symbol 99 MovieClip Frame 126
barrellPlay = 0;
gotoAndStop (2);
Symbol 99 MovieClip Frame 127
randomBarrell();
barrellPlay = 1;
barrellState = 0;
Symbol 99 MovieClip Frame 151
playsound("move");
Symbol 99 MovieClip Frame 168
playsound("movetop");
Symbol 99 MovieClip Frame 169
barrellState = 1;
Symbol 99 MovieClip Frame 185
if (barrellShake == 0) {
barrellPlay = 0;
}
gotoAndStop (2);
Symbol 106 MovieClip Frame 1
play();
Symbol 106 MovieClip Frame 26
_parent._parent.dropnuts();
_parent.goToAndPlay("still");
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 7
play();
monkey.play();
Symbol 107 MovieClip Frame 10
stop();
_parent.mode = "play";
Symbol 107 MovieClip Frame 13
play();
Symbol 107 MovieClip Frame 23
_parent.resetmove();
gotoAndStop (1);
Symbol 107 MovieClip Frame 24
stop();
monkeydrop.play();
Symbol 112 MovieClip Frame 1
r = random(10);
if (r == 4) {
gotoAndPlay (10);
} else if (r > 7) {
gotoAndPlay (25);
}
Symbol 112 MovieClip Frame 9
gotoAndPlay (1);
Symbol 112 MovieClip Frame 24
gotoAndPlay (1);
Symbol 112 MovieClip Frame 44
gotoAndPlay (1);
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 8
monkey.setRGB(8912896);
play();
monkey.play();
Symbol 119 MovieClip Frame 12
stop();
_parent.mode = "play";
Symbol 119 MovieClip Frame 23
_parent.resetmove();
gotoAndStop (1);
Symbol 119 MovieClip Frame 40
_parent.resetmove();
gotoAndStop (1);
Symbol 119 MovieClip Frame 47
play();
monkeyc.play();
Symbol 119 MovieClip Frame 51
stop();
_parent.mode = "play";
Symbol 119 MovieClip Frame 62
_parent.resetmove();
gotoAndStop (1);
Symbol 119 MovieClip Frame 78
_parent.resetmove();
gotoAndStop (1);
Symbol 119 MovieClip Frame 143
_parent.resetgame();
gotoAndStop (1);
Symbol 119 MovieClip Frame 144
Symbol 119 MovieClip Frame 206
_parent.resetgame();
gotoAndStop (1);
Symbol 121 MovieClip Frame 1
gotoAndPlay (9);
Symbol 121 MovieClip Frame 9
play();
Symbol 121 MovieClip Frame 29
_parent._parent.coconut = 1;
_parent.goToAndPlay("stillc");
_parent._parent.mode = "play";
Symbol 122 MovieClip Frame 1
gotoAndStop (31);
Symbol 122 MovieClip Frame 2
stop();
Symbol 122 MovieClip Frame 5
play();
Symbol 122 MovieClip Frame 8
stop();
_parent.mode = "play";
Symbol 122 MovieClip Frame 19
_parent.resetmove();
gotoAndStop (2);
Symbol 122 MovieClip Frame 31
stop();
Symbol 129 MovieClip Frame 1
stop();
Symbol 129 MovieClip Frame 7
play();
Symbol 129 MovieClip Frame 45
stop();
Symbol 130 MovieClip Frame 1
function resetmenu() {
time = 30;
ttimer.text = String(time);
framecount = 0;
scoretext.text = String(_parent.score);
_parent.lives = 3;
i = 1;
while (i < 4) {
resetlife(i);
i++;
}
}
function addscore() {
_parent.score = _parent.score + 1;
scoretext.text = String(_parent.score);
framecount = 0;
time = time + 10;
ttimer.text = String(time);
}
function removelife() {
temp = eval ("life" + String(_parent.lives));
with (temp) {
gotoAndPlay("play");
}
_parent.lives = _parent.lives - 1;
}
function resetlife(tlife) {
temp = eval ("life" + String(tlife));
with (temp) {
gotoAndStop("reset");
}
}
function timer() {
framecount = framecount + 1;
if (framecount == 30) {
time = --time;
framecount = 0;
ttimer.text = String(time);
if (time == 0) {
resetmenu();
_parent.gotoAndPlay("score");
}
}
}
resetmenu();
Symbol 130 MovieClip Frame 30
stop();