Frame 1
aa = getBytesTotal();
ab = getBytesLoaded();
ac = Math.round((ab / aa) * 12);
_root.loadline.gotoAndStop(ac);
Instance of Symbol 70 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (random(100) < 100) {
gotoAndPlay (2);
}
}
Frame 2
if (ab >= aa) {
_root.gotoAndPlay(3);
} else {
gotoAndPlay (1);
}
Frame 3
stop();
Instance of Symbol 70 MovieClip "kokos" in Frame 3
onClipEvent (load) {
default_hero_speed = 20;
hero_speed = 0;
hero_move_x = 0;
hero_speed_multiply = 1;
hero_bounce = 0.8;
hero_max_speed = 30;
hero_min_speed = 2;
scroll_min = 200;
scroll_max = 200;
jump_min = 100;
jump_max = 200;
gravity = 1;
scroll_speed = 0;
scroll_speed_a = 0;
gravity_a = 2.5E-5;
default_hero_speed_a = 0.0005;
scroll_map = 0;
also_can_jump = 0;
is_jump_from_user = false;
def_x_scale = _xscale;
obj_life = 600;
is_hit_test = false;
to_next_bird = 100;
birds_count = 0;
is_game_over = false;
scroll_speed_trunc = 0;
scroll_add_speed = 0;
scroll_map_speed = 0;
score = 0;
is_was_fall = false;
is_game_over_over = false;
stay_count = 0;
is_feet_show = false;
was_feet_sound = false;
game_over_speed = 30;
news_game_starts = 500;
_root.char_0.number = 0;
_root.char_1.number = 0;
_root.char_2.number = 0;
_root.char_3.number = 0;
_root.char_4.number = 0;
_root.createEmptyMovieClip("objects_clip", _root.getNextHighestDepth());
kokos_snd = new Sound(this);
birds = new Array();
birds2 = new Array();
birds_speed = new Array();
objs = new Array();
stats = new Array();
objs_life = new Array();
objs_count = 0;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 240;
_root.objects_clip[obj_name]._y = 460;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 270;
_root.objects_clip[obj_name]._y = 260;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 140;
_root.objects_clip[obj_name]._y = 60;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
to_next_object = 0;
this.swapDepths(_root.getNextHighestDepth());
_root.start_bg.swapDepths(_root.getNextHighestDepth());
duplicateMovieClip ("_root.mask", "mask_for_start", _root.getNextHighestDepth());
_root.start_bg.setMask(_root.mask_for_start);
duplicateMovieClip ("_root.mask", "mask_for_objs", _root.getNextHighestDepth());
_root.objects_clip.setMask(_root.mask_for_objs);
_root.start_bg.start_button.onPress = function () {
do_pause = false;
_root.start_bg.gotoAndPlay("die");
Mouse.hide();
kokos_snd.attachSound("ready");
kokos_snd.start(0, 1);
};
do_pause = true;
}
onClipEvent (keyUp) {
if (is_game_over_over) {
_x = 280;
_y = 240;
_root.start_bg._x = 320;
_root.start_bg._y = 240;
_root.game_over._x = 1000;
i = 0;
while (i < 5) {
_root["char_" + i]._x = _root["char_" + i]._x - 220;
_root["char_" + i]._y = 28;
_root["char_" + i].number = 0;
_root["char_" + i].play();
i++;
}
_root.feet.gotoAndPlay(1);
Mouse.show();
default_hero_speed = 20;
hero_speed = 0;
hero_move_x = 0;
hero_speed_multiply = 1;
hero_bounce = 0.8;
hero_max_speed = 30;
hero_min_speed = 2;
scroll_min = 200;
scroll_max = 200;
jump_min = 100;
jump_max = 200;
gravity = 1;
scroll_speed = 0;
scroll_speed_a = 0;
gravity_a = 2.5E-5;
default_hero_speed_a = 0.0005;
scroll_map = 0;
also_can_jump = 0;
is_jump_from_user = false;
obj_life = 600;
is_hit_test = false;
to_next_bird = 100;
birds_count = 0;
is_game_over = false;
scroll_speed_trunc = 0;
scroll_add_speed = 0;
scroll_map_speed = 0;
score = 0;
is_was_fall = false;
is_game_over_over = false;
stay_count = 0;
is_feet_show = false;
was_feet_sound = false;
game_over_speed = 30;
news_game_starts = 500;
kokos_snd = new Sound(this);
while (objs.length) {
removeMovieClip(objs.shift());
removeMovieClip(stats.shift());
objs_life.shift();
}
while (birds.length) {
removeMovieClip(birds.shift());
}
while (birds2.length) {
removeMovieClip(birds2.shift());
}
birds = new Array();
birds2 = new Array();
birds_speed = new Array();
objs = new Array();
stats = new Array();
objs_life = new Array();
objs_count = 0;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 240;
_root.objects_clip[obj_name]._y = 460;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 270;
_root.objects_clip[obj_name]._y = 260;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 140;
_root.objects_clip[obj_name]._y = 60;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
to_next_object = 0;
this.swapDepths(_root.getNextHighestDepth());
_root.start_bg.swapDepths(_root.getNextHighestDepth());
duplicateMovieClip ("_root.mask", "mask_for_start", _root.getNextHighestDepth());
_root.start_bg.setMask(_root.mask_for_start);
duplicateMovieClip ("_root.mask", "mask_for_objs", _root.getNextHighestDepth());
_root.objects_clip.setMask(_root.mask_for_objs);
_root.start_bg.start_button.onPress = function () {
do_pause = false;
_root.start_bg.gotoAndPlay("die");
Mouse.hide();
kokos_snd.attachSound("ready");
kokos_snd.start(0, 1);
};
do_pause = true;
}
}
onClipEvent (mouseDown) {
if (is_game_over_over) {
_x = 280;
_y = 240;
_root.start_bg._x = 320;
_root.start_bg._y = 240;
_root.game_over._x = 1000;
i = 0;
while (i < 5) {
_root["char_" + i]._x = _root["char_" + i]._x - 220;
_root["char_" + i]._y = 28;
_root["char_" + i].number = 0;
_root["char_" + i].play();
i++;
}
_root.feet.gotoAndPlay(1);
Mouse.show();
default_hero_speed = 20;
hero_speed = 0;
hero_move_x = 0;
hero_speed_multiply = 1;
hero_bounce = 0.8;
hero_max_speed = 30;
hero_min_speed = 2;
scroll_min = 200;
scroll_max = 200;
jump_min = 100;
jump_max = 200;
gravity = 1;
scroll_speed = 0;
scroll_speed_a = 0;
gravity_a = 2.5E-5;
default_hero_speed_a = 0.0005;
scroll_map = 0;
also_can_jump = 0;
is_jump_from_user = false;
obj_life = 600;
is_hit_test = false;
to_next_bird = 100;
birds_count = 0;
is_game_over = false;
scroll_speed_trunc = 0;
scroll_add_speed = 0;
scroll_map_speed = 0;
score = 0;
is_was_fall = false;
is_game_over_over = false;
stay_count = 0;
is_feet_show = false;
was_feet_sound = false;
game_over_speed = 30;
news_game_starts = 500;
kokos_snd = new Sound(this);
while (objs.length) {
removeMovieClip(objs.shift());
removeMovieClip(stats.shift());
objs_life.shift();
}
while (birds.length) {
removeMovieClip(birds.shift());
}
while (birds2.length) {
removeMovieClip(birds2.shift());
}
birds = new Array();
birds2 = new Array();
birds_speed = new Array();
objs = new Array();
stats = new Array();
objs_life = new Array();
objs_count = 0;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 240;
_root.objects_clip[obj_name]._y = 460;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 270;
_root.objects_clip[obj_name]._y = 260;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 140;
_root.objects_clip[obj_name]._y = 60;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
to_next_object = 0;
this.swapDepths(_root.getNextHighestDepth());
_root.start_bg.swapDepths(_root.getNextHighestDepth());
duplicateMovieClip ("_root.mask", "mask_for_start", _root.getNextHighestDepth());
_root.start_bg.setMask(_root.mask_for_start);
duplicateMovieClip ("_root.mask", "mask_for_objs", _root.getNextHighestDepth());
_root.objects_clip.setMask(_root.mask_for_objs);
_root.start_bg.start_button.onPress = function () {
do_pause = false;
_root.start_bg.gotoAndPlay("die");
Mouse.hide();
kokos_snd.attachSound("ready");
kokos_snd.start(0, 1);
};
do_pause = true;
}
}
onClipEvent (enterFrame) {
if (do_pause) {
return(undefined);
}
if (is_game_over_over) {
if (game_over_speed != 0) {
game_over_speed = game_over_speed - 1;
i = 0;
while (i < 5) {
_root["char_" + i]._y = _root["char_" + i]._y + game_over_speed;
i++;
}
_root.game_over._y = _root.game_over._y + game_over_speed;
if (((game_over_speed > 0) && (_root.game_over._y > 260)) || ((game_over_speed < 0) && (_root.game_over._y < 220))) {
game_over_speed = (-game_over_speed) / 2;
if (Math.abs(game_over_speed) < 1) {
game_over_speed = 0;
}
}
}
news_game_starts--;
if (news_game_starts <= 0) {
_x = 280;
_y = 240;
_root.start_bg._x = 320;
_root.start_bg._y = 240;
_root.game_over._x = 1000;
i = 0;
while (i < 5) {
_root["char_" + i]._x = _root["char_" + i]._x - 220;
_root["char_" + i]._y = 28;
_root["char_" + i].number = 0;
_root["char_" + i].play();
i++;
}
_root.feet.gotoAndPlay(1);
Mouse.show();
default_hero_speed = 20;
hero_speed = 0;
hero_move_x = 0;
hero_speed_multiply = 1;
hero_bounce = 0.8;
hero_max_speed = 30;
hero_min_speed = 2;
scroll_min = 200;
scroll_max = 200;
jump_min = 100;
jump_max = 200;
gravity = 1;
scroll_speed = 0;
scroll_speed_a = 0;
gravity_a = 2.5E-5;
default_hero_speed_a = 0.0005;
scroll_map = 0;
also_can_jump = 0;
is_jump_from_user = false;
obj_life = 600;
is_hit_test = false;
to_next_bird = 100;
birds_count = 0;
is_game_over = false;
scroll_speed_trunc = 0;
scroll_add_speed = 0;
scroll_map_speed = 0;
score = 0;
is_was_fall = false;
is_game_over_over = false;
stay_count = 0;
is_feet_show = false;
was_feet_sound = false;
game_over_speed = 30;
news_game_starts = 500;
kokos_snd = new Sound(this);
while (objs.length) {
removeMovieClip(objs.shift());
removeMovieClip(stats.shift());
objs_life.shift();
}
while (birds.length) {
removeMovieClip(birds.shift());
}
while (birds2.length) {
removeMovieClip(birds2.shift());
}
birds = new Array();
birds2 = new Array();
birds_speed = new Array();
objs = new Array();
stats = new Array();
objs_life = new Array();
objs_count = 0;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 240;
_root.objects_clip[obj_name]._y = 460;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 270;
_root.objects_clip[obj_name]._y = 260;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip[obj_name]._x = 140;
_root.objects_clip[obj_name]._y = 60;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
objs_count++;
to_next_object = 0;
this.swapDepths(_root.getNextHighestDepth());
_root.start_bg.swapDepths(_root.getNextHighestDepth());
duplicateMovieClip ("_root.mask", "mask_for_start", _root.getNextHighestDepth());
_root.start_bg.setMask(_root.mask_for_start);
duplicateMovieClip ("_root.mask", "mask_for_objs", _root.getNextHighestDepth());
_root.objects_clip.setMask(_root.mask_for_objs);
_root.start_bg.start_button.onPress = function () {
do_pause = false;
_root.start_bg.gotoAndPlay("die");
Mouse.hide();
kokos_snd.attachSound("ready");
kokos_snd.start(0, 1);
};
do_pause = true;
}
return(undefined);
}
if (is_game_over) {
if (_y > 650) {
kokos_snd.attachSound("upal");
kokos_snd.start(0, 1);
is_game_over_over = true;
_root.game_over._x = 320;
_root.game_over._y = 0;
i = 0;
while (i < 5) {
_root["char_" + i]._x = _root["char_" + i]._x + 220;
_root["char_" + i]._y = _root["char_" + i]._y + -10;
i++;
}
} else {
_y = (_y + hero_speed);
hero_speed = hero_speed + gravity;
if (Math.abs(hero_speed) >= hero_max_speed) {
hero_speed = hero_max_speed * (hero_speed / Math.abs(hero_speed));
}
}
return(undefined);
}
scroll_add_speed = scroll_add_speed + scroll_speed;
scroll_speed_trunc = 0;
if (int(scroll_add_speed) > 0) {
scroll_speed_trunc = int(scroll_add_speed);
scroll_add_speed = scroll_add_speed - scroll_speed_trunc;
}
_y = (_y + scroll_speed_trunc);
scroll_map = 0;
hit_test_index = -1;
hit_test_bird_index = -1;
is_hit_test = false;
prev_y = _y;
i = 0;
while ((i < hero_speed) && (!is_hit_test)) {
j = 0;
while (j < objs.length) {
if (_root.kokos_down.hitTest(objs[j])) {
_y = (objs[j]._y - objs[j]._height);
is_hit_test = true;
hit_test_index = j;
score = score + int((objs_count * hero_speed) / 50);
break;
}
j++;
}
if (!is_hit_test) {
j = 0;
while (j < birds.length) {
if (birds[j]._currentframe <= 19) {
_root.bird_hit._x = birds[j]._x;
_root.bird_hit._y = birds[j]._y;
if (_root.kokos_down.hitTest(_root.bird_hit)) {
_y = (birds[j]._y - 20);
is_hit_test = true;
hit_test_bird_index = j;
score = score + int((objs_count * hero_speed) / 50);
break;
}
}
j++;
}
}
_root.bird_hit._x = 700;
_root.kokos_down._y = _root.kokos_down._y + 1;
i++;
}
if ((_y >= scroll_max) && (is_hit_test)) {
scroll_map = scroll_max - _y;
_y = scroll_max;
} else if (!is_hit_test) {
_y = (prev_y + hero_speed);
if (_y < scroll_min) {
scroll_map = scroll_min - _y;
_y = scroll_min;
} else if (_y > scroll_max) {
scroll_map = scroll_max - _y;
_y = scroll_max;
}
} else if (hit_test_bird_index == -1) {
hero_speed = (-Math.abs(hero_speed)) * hero_bounce;
if (Math.abs(hero_speed) < hero_min_speed) {
hero_speed = 0;
} else {
gotoAndPlay ("jump");
if ((hero_speed_multiply > 1) && (random(100) < 20)) {
kokos_snd.attachSound("jump_" + random(6));
kokos_snd.start(0, 1);
}
}
also_can_jump = 10;
stay_count = 0;
hit_test_index = -1;
}
if (_root.plat_crash._x < 640) {
_root.plat_crash._y = _root.plat_crash._y + (scroll_speed_trunc + scroll_map);
}
i = 0;
while (i < objs.length) {
objs_life[i]--;
objs[i]._y = objs[i]._y + (scroll_speed_trunc + scroll_map);
if (hit_test_index == i) {
_y = (objs[i]._y - objs[i]._height);
hero_speed = (-Math.abs(hero_speed)) * hero_bounce;
if (Math.abs(hero_speed) < hero_min_speed) {
hero_speed = 0;
} else {
gotoAndPlay ("jump");
if ((hero_speed_multiply > 1) && (random(100) < 20)) {
kokos_snd.attachSound("jump_" + random(6));
kokos_snd.start(0, 1);
}
if ((_root.plat_crash._currentframe == 28) && (hero_speed_multiply > 1)) {
_root.plat_crash._x = _root.kokos_down._x;
_root.plat_crash._y = _root.kokos_down._y;
_root.plat_crash.gotoAndPlay(1);
}
}
also_can_jump = 10;
}
if (objs_life[i] < -300) {
objs[i]._y = objs[i]._y - (objs_life[i] + 250);
} else if (objs_life[i] < 0) {
objs[i]._x = objs[i]._x + (random(3) - 1);
}
i++;
}
i = 0;
while (i < birds.length) {
birds[i]._x = birds[i]._x + birds_speed[i];
birds[i]._y = birds[i]._y + (scroll_speed_trunc + scroll_map);
if (hit_test_bird_index == i) {
_y = (birds[i]._y - 20);
hero_speed = (-Math.abs(hero_speed)) * hero_bounce;
if (Math.abs(hero_speed) < hero_min_speed) {
hero_speed = 0;
} else {
gotoAndPlay ("jump");
if ((hero_speed_multiply > 1) && (random(100) < 20)) {
kokos_snd.attachSound("jump_" + random(6));
kokos_snd.start(0, 1);
}
}
also_can_jump = 10;
birds[i].gotoAndPlay("die");
}
if (((birds[i]._x > 640) || (birds[i]._y > 1500)) || (birds[i]._x < 0)) {
removeMovieClip(birds.splice(i, 1));
birds_speed.splice(i, 1);
i--;
}
i++;
}
i = 0;
while (i < stats.length) {
stats[i]._y = objs[i]._y;
stats[i]._x = objs[i]._x;
i++;
}
if (objs[0]._y > 1500) {
removeMovieClip(objs.shift());
removeMovieClip(stats.shift());
objs_life.shift();
}
if (_currentframe == 1) {
if (Key.isDown(37) && (hero_speed)) {
hero_move_x = hero_move_x - 6;
}
if (Key.isDown(39) && (hero_speed)) {
hero_move_x = hero_move_x + 6;
}
}
if (hero_move_x != 0) {
_x = (_x + hero_move_x);
if (_x < (_width / 2)) {
_x = (_width / 2);
}
if (_x > (640 - (_width / 2))) {
_x = (640 - (_width / 2));
}
if (hero_move_x > 0) {
this._xscale = -def_x_scale;
} else {
this._xscale = def_x_scale;
}
hero_move_x = 0;
}
to_next_object = to_next_object - (scroll_speed_trunc + scroll_map);
if (to_next_object <= 0) {
if (random(2 * objs_count) <= ((2 * objs_count) - 20)) {
birds_count++;
objs_count++;
bird_index = 1;
if (random(100) <= ((2 * objs_count) - 100)) {
bird_index = 2;
}
obj_name = (("bird" + bird_index) + "_") + birds_count;
_root.objects_clip.attachMovie("bird" + bird_index, obj_name, _root.objects_clip.getNextHighestDepth());
rnd1 = random(2);
if (rnd1) {
rnd1 = 1;
} else {
rnd1 = -1;
}
if (birds.length) {
if (objs.length && (objs[objs.length - 1]._y < birds[birds.length - 1]._y)) {
last_x = objs[objs.length - 1]._x;
} else if (birds.length) {
last_x = birds[birds.length - 1]._x;
} else {
last_x = objs[objs.length - 1]._x;
}
}
pos_x = last_x + (((170 + (objs_count / 2)) + ((1 + (objs_count / 25)) * random(10))) * rnd1);
if (pos_x < 0) {
pos_x = random(10) * 10;
}
if (pos_x > 520) {
pos_x = 520 - (random(10) * 10);
}
if (objs_count > 150) {
pos_x = random(400) + 120;
}
_root.objects_clip[obj_name]._x = pos_x;
_root.objects_clip[obj_name]._y = -100;
if (pos_x < 320) {
if (bird_index == 1) {
birds_speed.push(0.6);
} else {
birds_speed.push((100 + (objs_count / 5)) / 50);
}
_root.objects_clip[obj_name]._xscale = -_root.objects_clip[obj_name]._xscale;
} else if (bird_index == 1) {
birds_speed.push(-0.6);
} else {
birds_speed.push((-100 - (objs_count / 5)) / 50);
}
birds.push(_root.objects_clip[obj_name]);
} else {
objs_count++;
obj_name = "object1_plat_" + objs_count;
plat_name = "object1_" + objs_count;
_root.objects_clip.attachMovie("object1", obj_name, _root.objects_clip.getNextHighestDepth());
_root.objects_clip.attachMovie("object1_plat", plat_name, _root.objects_clip.getNextHighestDepth());
rnd1 = random(2);
if (rnd1) {
rnd1 = 1;
} else {
rnd1 = -1;
}
if (birds.length && (objs[objs.length - 1]._y > birds[birds.length - 1]._y)) {
last_x = birds[birds.length - 1]._x;
} else if (objs.length) {
last_x = objs[objs.length - 1]._x;
} else {
last_x = birds[birds.length - 1]._x;
}
pos_x = last_x + (((170 + (objs_count / 2)) + ((1 + (objs_count / 25)) * random(10))) * rnd1);
if (pos_x < 0) {
pos_x = random(10) * 10;
}
if (pos_x > 520) {
pos_x = 520 - (random(10) * 10);
}
_root.objects_clip[obj_name]._x = pos_x;
_root.objects_clip[obj_name]._y = -150;
_root.objects_clip[plat_name]._x = _root.objects_clip[obj_name]._x;
_root.objects_clip[plat_name]._y = _root.objects_clip[obj_name]._y;
objs.push(_root.objects_clip[plat_name]);
stats.push(_root.objects_clip[obj_name]);
objs_life.push(obj_life);
}
if (objs_count < 40) {
to_next_object = (((1 + (objs_count / 20)) * 100) + random(80)) - 40;
} else {
to_next_object = 300 - random(40);
}
}
if (Key.isDown(32)) {
if (also_can_jump) {
hero_speed = (-default_hero_speed) * hero_speed_multiply;
if (hero_speed > hero_max_speed) {
hero_speed = hero_max_speed;
}
hero_speed_multiply = hero_speed_multiply + 0.2;
if (hero_speed_multiply > 1.4) {
hero_speed_multiply = 1.4;
}
also_can_jump = 0;
is_jump_from_user = true;
}
}
if (!(is_hit_test && (hero_speed == 0))) {
hero_speed = hero_speed + gravity;
if (Math.abs(hero_speed) >= hero_max_speed) {
hero_speed = hero_max_speed * (hero_speed / Math.abs(hero_speed));
}
}
_root.kokos_down._y = _y;
_root.kokos_down._x = _x;
if (also_can_jump > 1) {
also_can_jump--;
} else if (also_can_jump == 1) {
if (!is_jump_from_user) {
hero_speed_multiply = 1;
}
also_can_jump = 0;
} else {
is_jump_from_user = false;
}
_root.bg_01._y = _root.bg_01._y + ((scroll_speed_trunc + scroll_map) * 0.2);
_root.bg_02._y = _root.bg_02._y + ((scroll_speed_trunc + scroll_map) * 0.2);
if ((scroll_speed_trunc + scroll_map) > 0) {
if (_root.bg_01._y > 480) {
_root.bg_01._y = _root.bg_02._y - _root.bg_02._height;
}
if (_root.bg_02._y > 480) {
_root.bg_02._y = _root.bg_01._y - _root.bg_01._height;
}
}
if ((scroll_speed_trunc + scroll_map) < 0) {
if (_root.bg_01._y < -480) {
_root.bg_01._y = _root.bg_02._y + _root.bg_02._height;
}
if (_root.bg_02._y < -480) {
_root.bg_02._y = _root.bg_01._y + _root.bg_01._height;
}
}
scroll_speed = scroll_speed + scroll_speed_a;
gravity = gravity + gravity_a;
default_hero_speed = default_hero_speed + default_hero_speed_a;
hero_max_speed = default_hero_speed + 10;
if (_root.char_0.number != (score % 10)) {
_root.char_0.number = score % 10;
_root.char_0.play();
}
if (_root.char_1.number != int((score % 100) / 10)) {
_root.char_1.number = int((score % 100) / 10);
_root.char_1.play();
}
if (_root.char_2.number != int((score % 1000) / 100)) {
_root.char_2.number = int((score % 1000) / 100);
_root.char_2.play();
}
if (_root.char_3.number != int((score % 10000) / 1000)) {
_root.char_3.number = int((score % 10000) / 1000);
_root.char_3.play();
}
if (_root.char_4.number != int((score % 100000) / 10000)) {
_root.char_4.number = int((score % 100000) / 10000);
_root.char_4.play();
}
if (to_next_object > 2000) {
if (!is_was_fall) {
is_was_fall = true;
kokos_snd.attachSound("fall");
kokos_snd.start(0, 1);
}
is_game_over = true;
}
stay_count++;
if ((objs_count > 29) && (!(objs_count % 30))) {
is_feet_show = true;
_root.feet._x = 0;
_root.feet._y = -100;
was_feet_sound = false;
}
if (is_feet_show) {
_root.feet._y = _root.feet._y + (scroll_speed + scroll_map);
if ((_root.feet._y > 240) && (!was_feet_sound)) {
was_feet_sound = true;
kokos_snd.attachSound("yahoo");
kokos_snd.start(0, 2);
}
if (_root.feet._y > 1500) {
is_feet_show = false;
_root.feet.nextFrame();
}
}
}
Symbol 39 MovieClip [bird2] Frame 16
gotoAndPlay (1);
Symbol 39 MovieClip [bird2] Frame 98
_x = 1000;
stop();
Symbol 54 MovieClip [bird1] Frame 19
gotoAndPlay (1);
Symbol 54 MovieClip [bird1] Frame 93
_x = 1000;
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
snd = new Sound(this);
snd.attachSound("jump" + (random(2) + 1));
snd.start(0, 1);
Symbol 70 MovieClip Frame 9
gotoAndPlay (1);
Symbol 85 MovieClip Frame 28
_x = 1000;
stop();
Instance of Symbol 88 MovieClip in Symbol 112 MovieClip Frame 1
onClipEvent (load) {
_parent.htp_window.close_button.onPress = function () {
_parent.htp_window._x = 500;
};
_parent.htp_button.onPress = function () {
_parent.htp_window._x = 0;
};
_parent.quit_button.onPress = function () {
fscommand ("quit");
};
}
Symbol 112 MovieClip Frame 2
gotoAndPlay (1);
Symbol 112 MovieClip Frame 50
_x = 1000;
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 3
stop();
Symbol 136 MovieClip Frame 4
stop();
Symbol 136 MovieClip Frame 5
stop();
Symbol 136 MovieClip Frame 6
stop();
Symbol 136 MovieClip Frame 7
stop();
Symbol 136 MovieClip Frame 8
stop();
Symbol 136 MovieClip Frame 9
stop();
Symbol 136 MovieClip Frame 10
stop();
Symbol 149 MovieClip Frame 1
if (number == 0) {
stop();
}
Symbol 149 MovieClip Frame 5
if (number == 1) {
stop();
}
Symbol 149 MovieClip Frame 10
if (number == 2) {
stop();
}
Symbol 149 MovieClip Frame 15
if (number == 3) {
stop();
}
Symbol 149 MovieClip Frame 20
if (number == 4) {
stop();
}
Symbol 149 MovieClip Frame 25
if (number == 5) {
stop();
}
Symbol 149 MovieClip Frame 30
if (number == 6) {
stop();
}
Symbol 149 MovieClip Frame 35
if (number == 7) {
stop();
}
Symbol 149 MovieClip Frame 40
if (number == 8) {
stop();
}
Symbol 149 MovieClip Frame 45
if (number == 9) {
stop();
}