Combined Code
movieClip 10 {
frame 1 {
stop();
}
}
instance of movieClip 10 {
onClipEvent (enterFrame) {
getthedate = new Date();
_root.min = getthedate.getMinutes();
_root.hr = getthedate.getHours();
if (_root.min < 10) {
_root.min = '0' + _root.min;
}
if (12 < _root.hr) {
_root.hr -= 12;
gotoAndStop(1);
} else {
if (_root.hr == 12) {
gotoAndStop(1);
} else {
gotoAndStop(2);
}
}
}
}
button 18 {
on (release) {
getURL('http://www.hyro.com', '_blank');
}
}
frame 15 {
stop();
bleep = new Sound(_root);
bleep.attachSound('bleep');
game_over = 'no';
}
button 23 {
on (release) {
bleep.start(0, 1);
gotoAndStop(16);
}
}
frame 16 {
function coco_hit(num) {
coco_active = 'no';
if (boat_frame == num) {
this['coconut_' + num].gotoAndStop(1);
tellTarget ('boat') {
gotoAndPlay('hit' + num);
}
} else {
this['coconut_' + num].play();
}
}
function gameover(outcome) {
game_over = 'yes';
monkey_looper.gotoAndStop(1);
monkey.gotoAndStop(1);
para_1.Stop();
para_2.Stop();
para_3.Stop();
para_4.Stop();
para_1.looper.gotoAndStop(1);
para_2.looper.gotoAndStop(1);
para_3.looper.gotoAndStop(1);
para_4.looper.gotoAndStop(1);
heli.looper.gotoAndStop(1);
coconut_2.looper.gotoAndStop(1);
coconut_3.looper.gotoAndStop(1);
if (outcome eq 'bad') {
gameover_screen.gotoAndStop(2);
} else {
gameover_screen.gotoAndStop(3);
}
}
function coco_throw(num) {
var ran_num = random(100) + 1;
if (!(coco_active eq 'yes')) {
if (ran_num < 20) {
coco_active = 'yes';
tellTarget (''coconut_' + num') {
gotoAndStop(2);
}
}
}
}
function para_jump(num) {
var ran_num = random(100) + 1;
if (ran_num < 25 + level) {
launch_para(num);
}
}
function launch_para(num) {
if (!(eval('para_active_' + num) eq 'yes')) {
this['para_' + num].gotoAndStop(2);
eval('para_active_' + num) = 'yes';
}
}
function para_land(num) {
eval('para_active_' + num) = 'no';
if (boat_frame == num) {
boat.boat.gotoAndPlay(2);
score += 1;
if (score == save_limit) {
gameover('good');
}
if (level < level_limit) {
level = int(score / level_cutoff);
}
this['para_' + num].gotoAndStop(1);
} else {
this['para_' + num].gotoAndPlay('dead');
lives -= 1;
tellTarget ('lives') {
nextFrame();
}
if (lives == 0) {
gameover('bad');
}
}
}
}
frame 16 {
boat_frame = 1;
heli_frame = 1;
save_limit = 80;
level_limit = 5;
level_cutoff = 10;
score = 0;
level = 0;
lives = 3;
stop();
}
movieClip 30 {
frame 2 {
play();
gotoAndPlay(2 + _root.level);
}
frame 10 {
_parent.gotoAndStop(_parent._currentframe + 1);
gotoAndPlay(2);
}
}
movieClip 31 {
frame 1 {
stop();
}
frame 6 {
_root.para_land(1);
}
}
movieClip 32 {
frame 1 {
stop();
}
frame 6 {
_root.para_land(2);
}
}
movieClip 33 {
frame 1 {
stop();
}
frame 6 {
_root.para_land(3);
}
}
movieClip 34 {
frame 1 {
stop();
}
frame 6 {
_root.para_land(4);
}
}
movieClip 36 {
frame 2 {
gotoAndPlay(2 + _root.level);
}
frame 10 {
_root.para_jump(_root.heli_frame);
_root.heli_frame += 1;
_parent.gotoAndStop(_root.heli_frame);
gotoAndPlay(2);
}
}
movieClip 37 {
frame 1 {
stop();
}
frame 5 {
gotoAndStop(1);
_root.heli_frame = 1;
}
}
movieClip 41 {
frame 1 {
stop();
}
}
button 43 {
on (keyPress '<Right>') {
if (_root.boat_frame < 4) {
_root.boat_frame += 1;
gotoAndStop(_root.boat_frame);
}
}
on (keyPress '<Left>') {
if (1 < _root.boat_frame) {
_root.boat_frame -= 1;
gotoAndStop(_root.boat_frame);
}
}
}
movieClip 45 {
frame 1 {
stop();
}
}
movieClip 47 {
frame 1 {
stop();
}
frame 13 {
gotoAndStop(2);
}
frame 22 {
gotoAndStop(3);
}
}
movieClip 53 {
frame 1 {
stop();
}
frame 2 {
_root.coco_throw(3);
}
frame 4 {
_root.coco_throw(2);
}
}
movieClip 54 {
frame 2 {
gotoAndPlay(2 + _root.level);
}
frame 9 {
if (_root.game_over eq 'yes') {
gotoAndStop(1);
}
}
frame 10 {
_root.bleep.start(0, 1);
num = random(2) + 1;
if (num == 1) {
if (_root.monkey._currentframe == 1) {
tellTarget ('_root.monkey') {
gotoAndStop(2);
}
} else {
tellTarget ('_root.monkey') {
gotoAndStop(1);
}
}
} else {
if (_root.monkey._currentframe == 2) {
tellTarget ('_root.monkey') {
gotoAndStop(4);
}
} else {
tellTarget ('_root.monkey') {
gotoAndStop(3);
}
}
}
gotoAndPlay(2);
}
}
movieClip 56 {
frame 2 {
gotoAndPlay(2 + _root.level);
}
frame 10 {
_parent.gotoAndStop(_parent._currentframe + 1);
gotoAndPlay(2);
}
}
movieClip 57 {
frame 1 {
stop();
}
frame 5 {
_root.coco_hit(3);
}
}
movieClip 58 {
frame 1 {
stop();
}
frame 5 {
_root.coco_hit(2);
}
}
movieClip 60 {
frame 1 {
stop();
}
}
button 69 {
on (release) {
tellTarget ('_root') {
gotoAndPlay(1);
}
}
}
movieClip 72 {
frame 1 {
stop();
}
}