Frame 2
stop();
Frame 3
attachMovie("music_control", "music_control", 1);
music_control._x = 5;
music_control._y = 5;
options_background = "blue";
Frame 4
function itemHandler1(obj, item) {
getURL ("http://www.orangefoxgames.com", "_blank");
}
function itemHandler2(obj, item) {
getURL ("http://orangefoxgames.com/forum", "_blank");
}
function itemHandler3(obj, item) {
_quality = "HIGH";
}
function itemHandler4(obj, item) {
_quality = "MEDIUM";
}
function itemHandler5(obj, item) {
_quality = "LOW";
}
function random_number(l, h) {
var _local1 = Math.round(Math.random() * (h - l)) + l;
return(_local1);
}
stop();
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item1 = new ContextMenuItem("Visit the OFG website", itemHandler1);
myMenu.customItems.push(item1);
item2 = new ContextMenuItem("Visit the OFG forum", itemHandler2);
myMenu.customItems.push(item2);
item3 = new ContextMenuItem("High quality", itemHandler3);
myMenu.customItems.push(item3);
item4 = new ContextMenuItem("Medium quality", itemHandler4);
myMenu.customItems.push(item4);
item5 = new ContextMenuItem("Low quality", itemHandler5);
myMenu.customItems.push(item5);
myMenu.customItems[2].separatorBefore = true;
_root.menu = myMenu;
Stage.showMenu = true;
Frame 5
stop();
overc_1.gotoAndStop(2);
overc_4.gotoAndStop(2);
overc_7.gotoAndStop(2);
_root.game_mode = "httt";
_root.game_time = 60;
_root.game_ball = 0;
Frame 6
function initialize_game() {
background.gotoAndStop(options_background);
switch (game_mode) {
case "httt" :
mode_text.text = "HOP TO THE TOP";
break;
case "p" :
mode_text.text = "PRACTICE";
break;
case "ss" :
mode_text.text = "SUICIDE SPRINT";
break;
case "h" :
mode_text.text = "HELI";
}
_root.clicked_submit = false;
_root.timer_text._visible = false;
_root.screen_width = Stage.width - 100;
_root.screen_height = Stage.height;
_root.platforms_holder = new Array();
_root.platforms_live = new Array();
_root.current_powerup = "none";
_root.current_character_phase = 1;
_root.key_left = false;
pu_time_left_holder._visible = false;
_root.key_right = false;
_root.key_up = false;
_root.jumping = false;
_root.fall_amount = 0;
_root.player_y = 1;
_root.jump_mode = "";
_root.pu_spring_mode = "";
_root.next_depth = 10;
attachMovie("count_down", "cd", next_depth);
cd._x = 150;
cd._y = 300;
next_depth++;
_root.pu_powerball_mode = false;
_root.score = 0;
score_text.text = 0;
_root.upto_platform = 0;
_root.remove_powerup_time = 0;
_root.player_speed = 8;
_root.mode = "regular";
_root.away_amount = 10;
_root.mode_direction = "down";
_root.hitting_platform = false;
_root.pu_helicopter_mode = "";
_root.pu_bomb_mode = "";
_root.pu_freeze_mode = "";
_root.pu_cannon_speed = 0;
_root.pu_cannon_mode = "";
_root.powerups_info = [["h", 100, 15, 10, false], ["c", 100, 15, 10, false], ["p", 100, 15, 10, false], ["s", 100, 15, 10, false], ["f", 100, 15, 10, false], ["b", 100, 15, 10, false], ["l", 100, 15, 10, false]];
first_xg = random_number(44, screen_width - 50);
add_virtual_platform(first_xg);
make_platform_above(0);
l = 0;
if (game_mode == "p") {
l = 10000;
} else {
l = 2000;
}
var _local2 = 0;
while (_local2 < l) {
first_x = random_number(44, screen_width - 50);
add_virtual_platform(first_x);
_local2++;
}
attachMovie("obj_ball_holder_" + _root.game_ball, "player", next_depth);
player._xscale = 77;
player._yscale = 77;
player._x = first_xg;
player._y = (screen_height / 2) - 30;
next_depth++;
player.swapDepths(50000);
if (game_mode == "h") {
mode = "pu_helicopter";
pu_helicopter_mode = "create";
}
if (game_mode == "p") {
score_text._visible = false;
}
}
function move_world() {
hitting_platform = false;
var _local2 = 0;
while (_local2 < platforms_live.length) {
if (player.ball.hit_point.hitTest(_root["platform_" + platforms_live[_local2].platform_name].platform)) {
hitting_platform = true;
fall_amount = jump_amount;
cur_hit = _local2;
}
if (platforms_live[0].platform_y > 60) {
make_platform_above(45);
}
if (_root["platform_" + platforms_live[platforms_live.length - 1].platform_name]._y > (screen_height + 25)) {
remove_live_platform(platforms_live.length - 1);
}
if ((platforms_live[platforms_live.length - 1].platform_y < (screen_height - 60)) && (upto_platform > 6)) {
make_platform_under(45);
}
if (platforms_live[0].platform_y < -60) {
remove_live_platform(0);
_root.upto_platform--;
}
if ((player.ball.hit_point.hitTest(_root["platform_" + platforms_live[_local2].platform_name].powerup) && (mode == "regular")) && (!pu_powerball_mode)) {
remove_powerup(_local2);
platforms_holder[platforms_live[_local2].platform_number].powerup = -1;
switch (platforms_live[_local2].platform_powerup) {
case 0 :
mode = "pu_helicopter";
pu_helicopter_mode = "create";
break;
case 1 :
mode = "pu_cannon";
pu_cannon_mode = "create";
break;
case 2 :
player.attachMovie("obj_powerup_powerball", "powerball", next_depth);
player.powerball._x = -10;
player.powerball._y = -10;
pu_powerball_mode = true;
remove_powerup_time = getTimer() + 3000;
pu_time_left_holder._visible = true;
pu_time_left_holder.pu_left_text.text = "3";
break;
case 3 :
mode = "pu_spring";
pu_spring_mode = "create";
break;
case 4 :
mode = "pu_freeze";
pu_freeze_mode = "create";
break;
case 5 :
mode = "pu_bomb";
pu_bomb_mode = "create";
break;
case 6 :
score = score - 5;
score_text.text = score;
}
}
if (_root["platform_" + platforms_live[_local2].platform_name]._y >= player._y) {
if (!platforms_holder[platforms_live[_local2].platform_number].counted) {
platforms_holder[platforms_live[_local2].platform_number].counted = true;
score++;
score_text.text = score;
}
}
_local2++;
}
switch (mode) {
case "regular" :
if ((key_up && (!jumping)) && (hitting_platform)) {
jumping = true;
key_up = false;
jump_mode = "take_off";
_root.jump_amount = 16;
}
if (jumping) {
switch (jump_mode) {
case "take_off" :
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + jump_amount;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
player_y = player_y + jump_amount;
jump_amount = jump_amount - 1;
if (!hitting_platform) {
jump_mode = "going_up";
}
break;
case "going_up" :
if ((jump_amount <= 0) || (hitting_platform)) {
if (hitting_platform && (!pu_powerball_mode)) {
jump_mode = "fall";
}
if (jump_amount <= 0) {
jump_mode = "going_down";
jump_amount = 1;
}
if (hitting_platform && (pu_powerball_mode)) {
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + jump_amount;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
player_y = player_y + jump_amount;
jump_amount = jump_amount - 1.3;
}
} else {
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + jump_amount;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
player_y = player_y + jump_amount;
if (!pu_powerball_mode) {
jump_amount = jump_amount - 1.3;
} else {
if (jump_amount <= 1) {
jump_mode = "going_down";
}
jump_amount = jump_amount - 0.5;
}
}
break;
case "going_down" :
if (hitting_platform && (_root["platform_" + platforms_live[cur_hit].platform_name]._y > player._y)) {
jumping = false;
key_up = false;
} else {
_local2 = 0;
while (_local2 < platforms_live.length) {
away_amount = jump_amount;
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y - away_amount;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
player_y = player_y - away_amount;
_local2++;
}
if (jump_amount < 16) {
jump_amount = jump_amount + 1.3;
}
}
break;
case "fall" :
if (hitting_platform) {
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y - 10;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
} else {
jumping = false;
key_up = false;
}
}
}
if ((!hitting_platform) && (!jumping)) {
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y - fall_amount;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
if (fall_amount < 16) {
fall_amount++;
}
}
if (pu_powerball_mode) {
if (getTimer() >= remove_powerup_time) {
pu_powerball_mode = false;
pu_time_left_holder._visible = false;
removeMovieClip(_root.player.powerball);
} else {
pu_time_left_holder.pu_left_text.text = Math.ceil((remove_powerup_time - getTimer()) / 1000);
}
}
move_player();
break;
case "pu_helicopter" :
switch (pu_helicopter_mode) {
case "create" :
player.attachMovie("obj_powerup_heli", "pu_helicopter", next_depth);
player.pu_helicopter._width = 44.4;
player.pu_helicopter._height = 28.3;
player.pu_helicopter._y = -30;
_root.pu_helicopter_up_speed = 0;
_root.pu_helicopter_up_direction = "";
_root.pu_helicopter_across_speed = 0;
_root.pu_helicopter_across_direction = "";
pu_helicopter_mode = "fly";
if (game_mode != "h") {
remove_powerup_time = getTimer() + 3000;
pu_time_left_holder._visible = true;
} else {
remove_powerup_time = getTimer() + 200000;
}
pu_time_left_holder.pu_left_text.text = "3";
break;
case "fly" :
if (hitting_platform) {
pu_helicopter_up_speed = 10;
if (pu_helicopter_up_direction == "up") {
pu_helicopter_up_direction = "down";
} else {
pu_helicopter_up_direction = "up";
}
if (pu_helicopter_across_direction == "left") {
pu_helicopter_across_direction = "right";
} else {
pu_helicopter_across_direction = "left";
}
}
if (key_up && (!key_down)) {
if (pu_helicopter_up_speed == 0) {
pu_helicopter_up_direction = "up";
pu_helicopter_up_speed = 8;
}
if (pu_helicopter_up_direction == "down") {
pu_helicopter_up_speed = pu_helicopter_up_speed - 1;
if (pu_helicopter_up_speed < 0) {
pu_helicopter_up_speed = 0;
}
} else if (pu_helicopter_up_speed < 8) {
pu_helicopter_up_speed++;
}
}
if (key_down && (!key_up)) {
if (pu_helicopter_up_speed == 0) {
pu_helicopter_up_direction = "down";
pu_helicopter_up_speed = 8;
}
if (pu_helicopter_up_direction == "up") {
pu_helicopter_up_speed = pu_helicopter_up_speed - 1;
if (pu_helicopter_up_speed < 0) {
pu_helicopter_up_speed = 0;
}
} else if (pu_helicopter_up_speed < 8) {
pu_helicopter_up_speed++;
}
}
if ((!key_down) && (!key_up)) {
pu_helicopter_up_speed = pu_helicopter_up_speed - 1;
if (pu_helicopter_up_speed < 0) {
pu_helicopter_up_speed = 0;
}
}
_local2 = 0;
while (_local2 < platforms_live.length) {
if (pu_helicopter_up_direction == "up") {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + pu_helicopter_up_speed;
} else {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y - pu_helicopter_up_speed;
}
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
if (key_left && (!key_right)) {
if (player._x > 16) {
if (pu_helicopter_across_speed == 0) {
pu_helicopter_across_direction = "left";
pu_helicopter_across_speed = 8;
}
if (pu_helicopter_across_direction == "right") {
pu_helicopter_across_speed = pu_helicopter_across_speed - 2;
if (pu_helicopter_across_speed < 0) {
pu_helicopter_across_speed = 0;
}
} else if (pu_helicopter_across_speed < 8) {
pu_helicopter_across_speed++;
}
} else {
pu_helicopter_across_speed = 10;
pu_helicopter_across_direction = "right";
}
}
if (key_right && (!key_left)) {
if (player._x < (screen_width - 18)) {
if (pu_helicopter_across_speed == 0) {
pu_helicopter_across_direction = "right";
pu_helicopter_across_speed = 8;
}
if (pu_helicopter_across_direction == "left") {
pu_helicopter_across_speed = pu_helicopter_across_speed - 2;
if (pu_helicopter_across_speed < 0) {
pu_helicopter_across_speed = 0;
}
} else if (pu_helicopter_across_speed < 8) {
pu_helicopter_across_speed++;
}
} else {
pu_helicopter_across_speed = 10;
pu_helicopter_across_direction = "left";
}
}
if ((!key_left) && (!key_right)) {
pu_helicopter_across_speed = pu_helicopter_across_speed - 1;
if (pu_helicopter_across_speed < 0) {
pu_helicopter_across_speed = 0;
}
}
if (pu_helicopter_across_direction == "left") {
if ((player._x - pu_helicopter_across_speed) > 0) {
player._x = player._x - pu_helicopter_across_speed;
}
} else if ((player._x - pu_helicopter_across_speed) < (screen_width - 15)) {
player._x = player._x + pu_helicopter_across_speed;
}
if (((player._x + 10) > 296) && (key_up)) {
pu_helicopter_up_speed = 2;
}
if (((player._x - 10) < 0) && (key_up)) {
pu_helicopter_up_speed = 2;
}
if (getTimer() >= remove_powerup_time) {
_root.player.pu_helicopter.gotoAndStop(13);
removeMovieClip(_root.player.pu_helicopter);
pu_time_left_holder._visible = false;
mode = "regular";
} else {
pu_time_left_holder.pu_left_text.text = Math.ceil((remove_powerup_time - getTimer()) / 1000);
}
}
break;
case "pu_cannon" :
switch (pu_cannon_mode) {
case "create" :
var _local3 = 0;
_local2 = 0;
while (_local2 < platforms_live.length) {
if (((platforms_live[_local2].platform_y - player._y) <= 50) && (platforms_live[_local2].platform_y > player._y)) {
_local3 = platforms_live[_local2].platform_y;
}
_local2++;
}
attachMovie("obj_powerup_cannon", "pu_cannon", next_depth);
player._visible = false;
pu_cannon._x = player._x;
pu_cannon._y = _local3 - 25;
next_depth++;
pu_cannon.bar._xscale = 1;
_root.pu_cannon_bar_direction = "right";
pu_cannon_mode = "move_bar";
pu_time_left_holder.pu_left_text.text = "PRESS SPACEBAR!";
pu_time_left_holder._visible = true;
break;
case "move_bar" :
switch (pu_cannon_bar_direction) {
case "right" :
if (pu_cannon.bar._xscale <= 82) {
pu_cannon.bar._xscale = pu_cannon.bar._xscale + 20;
} else {
pu_cannon_bar_direction = "left";
}
break;
case "left" :
if (pu_cannon.bar._xscale >= 21) {
pu_cannon.bar._xscale = pu_cannon.bar._xscale - 20;
} else {
pu_cannon_bar_direction = "right";
}
}
break;
case "fire" :
pu_time_left_holder.pu_left_text.text = "";
pu_time_left_holder._visible = false;
pu_cannon.play();
if (pu_cannon._currentframe == 14) {
player._visible = true;
pu_cannon_mode = "move";
}
break;
case "move" :
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + pu_cannon_speed;
pu_cannon._y = pu_cannon._y + pu_cannon_speed;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
pu_cannon_speed = pu_cannon_speed * 0.9;
if (pu_cannon_speed > 1) {
break;
}
removeMovieClip(pu_cannon);
mode = "regular";
pu_cannon_mode = "";
}
case "pu_spring" :
switch (pu_spring_mode) {
case "create" :
_local3 = 0;
_local2 = 0;
while (_local2 < platforms_live.length) {
if (((platforms_live[_local2].platform_y - player._y) <= 50) && (platforms_live[_local2].platform_y > player._y)) {
_local3 = platforms_live[_local2].platform_y;
}
_local2++;
}
attachMovie("obj_powerup_spring", "pu_spring", next_depth);
pu_spring._x = player._x;
pu_spring._y = _local3 - 15;
next_depth++;
_root.pu_spring_speed = 30;
pu_spring_mode = "move";
break;
case "move" :
_local2 = 0;
while (_local2 < platforms_live.length) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + pu_spring_speed;
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
pu_spring._y = pu_spring._y + pu_spring_speed;
pu_spring_speed = pu_spring_speed * 0.9;
if (pu_spring_speed > 1) {
break;
}
removeMovieClip(pu_spring);
mode = "regular";
pu_spring_mode = "";
}
break;
case "pu_freeze" :
switch (pu_freeze_mode) {
case "create" :
player.attachMovie("obj_powerup_freeze", "pu_freeze", next_depth);
player.pu_freeze._y = 0;
pu_freeze_mode = "freeze";
remove_powerup_time = getTimer() + 3000;
pu_time_left_holder._visible = true;
pu_time_left_holder.pu_left_text.text = "3";
break;
case "freeze" :
if (getTimer() >= remove_powerup_time) {
removeMovieClip(_root.player.pu_freeze);
pu_time_left_holder._visible = false;
mode = "regular";
} else {
pu_time_left_holder.pu_left_text.text = Math.ceil((remove_powerup_time - getTimer()) / 1000);
}
}
break;
case "pu_bomb" :
switch (pu_bomb_mode) {
case "create" :
player._visible = false;
_local3 = 0;
_local2 = 0;
while (_local2 < platforms_live.length) {
if (((platforms_live[_local2].platform_y - player._y) <= 50) && (platforms_live[_local2].platform_y > player._y)) {
_local3 = platforms_live[_local2].platform_y;
}
_local2++;
}
attachMovie("obj_powerup_bomb", "pu_bomb", next_depth);
pu_bomb.gotoAndPlay(2);
pu_bomb._x = player._x;
pu_bomb._y = _local3 - 15;
next_depth++;
_root.pu_bomb_speed = 25;
pu_time_left_holder.pu_left_text.text = "PRESS SPACEBAR!";
pu_time_left_holder._visible = true;
pu_bomb_mode = "move_arrow";
break;
case "move" :
_local2 = 0;
while (_local2 < platforms_live.length) {
if (pu_bomb_direction == 0) {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y + pu_bomb_speed;
} else {
_root["platform_" + platforms_live[_local2].platform_name]._y = _root["platform_" + platforms_live[_local2].platform_name]._y - pu_bomb_speed;
}
platforms_live[_local2].platform_y = _root["platform_" + platforms_live[_local2].platform_name]._y;
_local2++;
}
if (pu_bomb_direction == 0) {
pu_bomb._y = pu_bomb._y + pu_bomb_speed;
pu_bomb_speed = pu_bomb_speed * 0.9;
} else {
pu_bomb._y = pu_bomb._y - pu_bomb_speed;
pu_bomb_speed = pu_bomb_speed * 1.1;
}
if (!((pu_bomb_speed <= 1) || (pu_bomb_speed >= 60))) {
break;
}
pu_time_left_holder.pu_left_text.text = "";
pu_time_left_holder._visible = false;
removeMovieClip(pu_bomb);
mode = "regular";
pu_bomb_mode = "";
}
}
if (((time_left <= 0) && (timer_text._visible)) && (game_mode != "p")) {
game_over();
}
if (getTimer() >= timer_next_time) {
timer_next_time = getTimer() + 1000;
time_left--;
timer_text.text = time_left;
}
}
function move_player() {
if (key_left && (player._x > 16)) {
player._x = player._x - player_speed;
}
if (key_right && (player._x < (screen_width - 18))) {
player._x = player._x + player_speed;
}
}
function add_virtual_platform(x) {
if ((((platforms_holder.length % 7) == 0) && (platforms_holder.length != 0)) && (game_mode != "h")) {
platforms_holder.push({platform_x:x, powerup:random_number(0, powerups_info.length - 1), powerup_x:random_number(-39, 39), counted:false});
} else {
platforms_holder.push({platform_x:x, powerup:-1, counted:false});
}
}
function make_platform_above(platform_number) {
if (upto_platform == 0) {
attachMovie("obj_floor_holder", "platform_" + next_depth, next_depth);
_root["platform_" + next_depth]._x = 1;
} else {
attachMovie("obj_platform_0", "platform_" + next_depth, next_depth);
_root["platform_" + next_depth]._x = platforms_holder[upto_platform].platform_x;
}
var _local2 = -1;
if (platform_number != 0) {
_root["platform_" + next_depth]._y = platforms_live[0].platform_y - 80;
} else {
_root["platform_" + next_depth]._y = (platforms_holder[platform_number - 1].platform_y = screen_height / 2);
}
if (platforms_holder[upto_platform].powerup != -1) {
add_live_powerup(next_depth, powerups_info[platforms_holder[upto_platform].powerup][0], platforms_holder[upto_platform].powerup_x);
_local2 = platforms_holder[upto_platform].powerup;
}
platforms_live.push({platform_name:next_depth, platform_y:_root["platform_" + next_depth]._y, platform_powerup:_local2, platform_number:upto_platform});
platforms_live.sortOn("platform_y", Array.NUMERIC);
upto_platform++;
next_depth++;
}
function make_platform_under(platform_number) {
if (((upto_platform - platforms_live.length) - 1) == 0) {
attachMovie("obj_floor_holder", "platform_" + next_depth, next_depth);
_root["platform_" + next_depth]._x = 1;
} else {
attachMovie("obj_platform_0", "platform_" + next_depth, next_depth);
_root["platform_" + next_depth]._x = platforms_holder[(upto_platform - platforms_live.length) - 1].platform_x;
}
_root["platform_" + next_depth]._y = platforms_live[platforms_live.length - 1].platform_y + 80;
var _local2 = -1;
if (platforms_holder[(upto_platform - platforms_live.length) - 1].powerup != -1) {
add_live_powerup(next_depth, powerups_info[platforms_holder[(upto_platform - platforms_live.length) - 1].powerup][0]);
_local2 = platforms_holder[(upto_platform - platforms_live.length) - 1].powerup;
}
platforms_live.push({platform_name:next_depth, platform_y:_root["platform_" + next_depth]._y, platform_powerup:_local2, platform_number:(upto_platform - platforms_live.length) - 1});
platforms_live.sortOn("platform_y", Array.NUMERIC);
next_depth++;
}
function remove_live_platform(platform_number) {
removeMovieClip(_root["platform_" + platforms_live[platform_number].platform_name]);
platforms_live.splice(platform_number, 1);
}
function add_live_powerup(platform_number, powerup, powerup_x) {
_root["platform_" + platform_number].attachMovie("obj_powerup_symbol_" + powerup, "powerup", next_depth);
_root["platform_" + platform_number].powerup._x = powerup_x;
_root["platform_" + platform_number].powerup._y = -24;
}
function remove_powerup(platform_number) {
removeMovieClip(_root["platform_" + platforms_live[platform_number].platform_name].powerup);
}
function game_over() {
_root.player.pu_helicopter.gotoAndStop(13);
removeMovieClip(go_box);
removeMovieClip(pu_cannon);
removeMovieClip(pu_bomb);
removeMovieClip(pu_spring);
removeMovieClip(cd);
_root.timer_text._visible = false;
var _local3 = "";
timer_text._visible = false;
if (game_mode == "ss") {
if (player.ball.hit_point.hitTest(_root["platform_" + platforms_live[platforms_live.length - 1].platform_name].platform) && (platforms_live[platforms_live.length - 1].platform_number == 0)) {
} else {
_local3 = "You did not reach the bottom. Your score has been set to 0.";
score = 0;
}
}
removeMovieClip(player);
var _local2 = 0;
while (_local2 < platforms_live.length) {
remove_live_platform(_local2);
_local2--;
_local2++;
}
attachMovie("game_over_hoptotop", "go_box", next_depth);
go_box._x = 36;
go_box._y = 80;
go_box.score_go = score;
go_box.message_go = _local3;
next_depth++;
}
function reset_game() {
removeMovieClip(go_box);
}
stop();
initialize_game();
Instance of Symbol 320 MovieClip in Frame 6
onClipEvent (enterFrame) {
_root.move_world();
if (Key.isDown(37)) {
_root.key_left = true;
} else {
_root.key_left = false;
}
if (Key.isDown(39)) {
_root.key_right = true;
} else {
_root.key_right = false;
}
if (Key.isDown(38)) {
_root.key_up = true;
} else {
_root.key_up = false;
}
if (Key.isDown(40)) {
_root.key_down = true;
} else {
_root.key_down = false;
}
}
Instance of Symbol 322 MovieClip in Frame 6
on (keyPress "<Up>") {
_root.key_up = true;
}
on (keyPress "<Space>") {
switch (_root.mode) {
case "pu_cannon" :
if (_root.pu_cannon_mode == "move_bar") {
_root.pu_cannon_speed = int(_root.pu_cannon.bar._xscale / 2);
_root.pu_cannon_mode = "fire";
}
break;
case "pu_bomb" :
_root.pu_bomb.stop();
if (_root.pu_bomb_mode != "move_arrow") {
break;
}
if (_root.pu_bomb._currentframe <= 2) {
_root.pu_bomb_direction = 0;
} else {
_root.pu_bomb_direction = 1;
}
_root.pu_bomb_speed = 30;
_root.pu_bomb_mode = "move";
_root.player._visible = true;
_root.pu_bomb.gotoAndPlay(6);
}
if (_root.go_box._visible) {
if ((_root.go_box._currentframe != 2) || (_root.clicked_submit)) {
_root.reset_game();
_root.gotoAndStop("reset");
}
}
}
Frame 7
stop();
first_show = random_number(1, 2);
if (first_show == 1) {
temp_y = graphics._y;
graphics._y = programmer._y;
programmer._y = temp_y;
}
Frame 8
stop();
overc_4.gotoAndStop(2);
overc_7.gotoAndStop(2);
_root.game_mode = "h";
_root.game_time = 60;
_root.game_ball = 0;
Frame 9
stop();
overc_70.gotoAndStop(2);
_root.game_mode = "p";
_root.game_time = 0;
_root.game_ball = 0;
Frame 10
stop();
Frame 11
function do_switch_bg() {
bg_option_blue.filters = [];
bg_option_green.filters = [];
bg_option_red.filters = [];
bg_option_yellow.filters = [];
glow.blurX = 19;
glow.blurY = 19;
glow.strength = 1.6;
glow.quality = 1;
glow.color = 16777215 /* 0xFFFFFF */;
switch (options_background) {
case "blue" :
bg_option_blue.filters = [glow];
return;
case "green" :
bg_option_green.filters = [glow];
return;
case "red" :
bg_option_red.filters = [glow];
return;
case "yellow" :
bg_option_yellow.filters = [glow];
}
}
stop();
glow = new flash.filters.GlowFilter();
do_switch_bg();
Frame 12
removeMovieClip(go_box);
gotoAndStop ("game");
Symbol 21 MovieClip [obj_powerup_bomb] Frame 5
gotoAndPlay (1);
Symbol 25 MovieClip [obj_powerup_freeze] Frame 15
stop();
Symbol 31 MovieClip [obj_powerup_spring] Frame 13
stop();
Symbol 56 MovieClip [obj_powerup_cannon] Frame 1
stop();
Symbol 56 MovieClip [obj_powerup_cannon] Frame 22
stop();
Symbol 60 MovieClip [obj_powerup_heli] Frame 12
gotoAndPlay (1);
Symbol 68 MovieClip [obj_platform_0] Frame 1
stop();
Symbol 75 MovieClip [obj_ball_holder_0] Frame 1
stop();
Symbol 79 MovieClip [obj_ball_holder_1] Frame 1
stop();
Symbol 83 MovieClip [obj_ball_holder_2] Frame 1
stop();
Symbol 91 MovieClip [obj_ball_holder_3] Frame 1
stop();
Symbol 96 MovieClip [obj_floor_holder] Frame 1
stop();
Symbol 107 MovieClip Frame 58
stop();
_root.time_left = _root.game_time;
_root.timer_next_time = getTimer() + 1000;
_root.timer_text.text = _root.time_left;
if (_root.game_mode != "p") {
_root.timer_text._visible = true;
}
_parent.removeMovieClip();
Symbol 108 MovieClip [count_down] Frame 1
stop();
Instance of Symbol 107 MovieClip in Symbol 108 MovieClip [count_down] Frame 1
onClipEvent (enterFrame) {
_root.key_up = false;
_root.key_down = false;
}
Symbol 113 Button
on (release) {
gotoAndStop (2);
}
Symbol 115 Button
on (release) {
_root.gotoAndStop("reset");
}
Symbol 121 Button
on (release) {
if (!_root.clicked_submit) {
_root.clicked_submit = true;
mode_code = "";
mode_code = _root.game_mode + _root.game_time;
url = "http://www.orangefoxgames.com/high_scores_pwhrdf/submit_high_score_httt.php";
myLoadVars = new LoadVars();
myLoadVars.score_name = high_score_name;
myLoadVars.score_score = _root.score;
myLoadVars.mode_code = mode_code;
myLoadVars.check_code = "dontyouhaveanythingtodogetahobbyyoulowlife";
returnedVars = new LoadVars();
myLoadVars.sendAndLoad(url, returnedVars, "POST");
resultText = "Sending score...";
returnedVars.onLoad = function () {
resultText = "Score submitted!";
};
} else {
resultText = "Score already submitted";
}
getURL ((("http://www.orangefoxgames.com/view_scores_hop_to_the_top.php?b=" + mode_code) + "&cachebuster=") + new Date().getTime(), "_blank");
}
Symbol 128 MovieClip [game_over_hoptotop] Frame 1
stop();
myLoadVars = new LoadVars();
myLoadVars.giveurl = _root._url;
myLoadVars.game_id = 8;
myLoadVars.sendAndLoad("http://www.orangefoxgames.com/admin/tracker.php?cachebuster=" + new Date().getTime(), myLoadVars, "POST");
_root.clicked_submit = false;
Symbol 128 MovieClip [game_over_hoptotop] Frame 2
stop();
switch (_root.game_mode) {
case "httt" :
show_game_mode = "Hop To The Top";
break;
case "ss" :
show_game_mode = "Suicide Sprint";
break;
case "h" :
show_game_mode = "Heli";
}
show_game_time = _root.game_time;
Symbol 131 Button
on (release) {
stopAllSounds();
if (this._currentframe > 1) {
this.prevFrame();
} else {
this.gotoAndStop(3);
}
}
Symbol 134 Button
on (release) {
stopAllSounds();
gotoAndStop (1);
}
Symbol 137 Button
on (release) {
stopAllSounds();
if (this._currentframe < 3) {
this.play();
} else {
this.gotoAndStop(1);
}
}
Symbol 140 Button
on (release) {
stopAllSounds();
gotoAndStop (4);
}
Symbol 145 MovieClip [music_control] Frame 1
stop();
Symbol 145 MovieClip [music_control] Frame 2
stop();
Symbol 145 MovieClip [music_control] Frame 3
stop();
Symbol 145 MovieClip [music_control] Frame 4
stop();
stopAllSounds();
Symbol 152 MovieClip [obj_powerup_symbol_f] Frame 1
stop();
Symbol 161 MovieClip [obj_powerup_symbol_h] Frame 1
stop();
Symbol 164 MovieClip [obj_powerup_symbol_c] Frame 1
stop();
Symbol 177 Button
on (release) {
_root.play();
}
Symbol 178 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
_root.gotoAndPlay("ofg_intro");
}
Symbol 178 MovieClip Frame 2
gotoAndPlay (1);
Symbol 194 MovieClip Frame 159
_root.attachMovie("music_control", "music_control", 1);
_root.music_control._x = 5;
_root.music_control._y = 5;
_root.options_background = "blue";
_root.gotoAndPlay("menu");
Symbol 195 Button
on (release) {
getURL ("http://www.orangefoxgames.com", "_blank");
}
Symbol 223 MovieClip Frame 14
stop();
Symbol 224 Button
on (release) {
gotoAndStop ("about");
}
Symbol 229 MovieClip Frame 14
stop();
Symbol 230 Button
on (release) {
gotoAndStop ("controls");
}
Symbol 233 MovieClip Frame 14
stop();
Symbol 234 Button
on (release) {
gotoAndStop ("heli_select");
}
Symbol 241 MovieClip Frame 14
stop();
Symbol 242 Button
on (release) {
getURL ("http://www.orangefoxgames.com/view_scores_hop_to_the_top.php", "_blank");
}
Symbol 249 MovieClip Frame 14
stop();
Symbol 250 Button
on (release) {
gotoAndStop ("options");
}
Symbol 253 MovieClip Frame 14
stop();
Symbol 254 Button
on (release) {
gotoAndStop ("game_select");
}
Symbol 257 MovieClip Frame 14
stop();
Symbol 258 Button
on (release) {
gotoAndStop ("practice_select");
}
Symbol 266 Button
on (release) {
getURL ("http://www.orangefoxgames.com", "_blank");
}
Symbol 271 Button
on (release) {
_root.game_time = 45;
overc_3.gotoAndStop(2);
overc_4.gotoAndStop(1);
overc_5.gotoAndStop(1);
overc_6.gotoAndStop(1);
}
Symbol 273 Button
on (release) {
_root.game_time = 60;
overc_4.gotoAndStop(2);
overc_3.gotoAndStop(1);
overc_5.gotoAndStop(1);
overc_6.gotoAndStop(1);
}
Symbol 275 Button
on (release) {
_root.game_time = 90;
overc_5.gotoAndStop(2);
overc_4.gotoAndStop(1);
overc_3.gotoAndStop(1);
overc_6.gotoAndStop(1);
}
Symbol 277 Button
on (release) {
_root.game_time = 120;
overc_6.gotoAndStop(2);
overc_4.gotoAndStop(1);
overc_5.gotoAndStop(1);
overc_3.gotoAndStop(1);
}
Symbol 281 Button
on (release) {
gotoAndStop ("game");
}
Symbol 288 Button
on (release) {
_root.game_mode = "ss";
overc_1.gotoAndStop(1);
overc_2.gotoAndStop(2);
}
Symbol 293 Button
on (release) {
_root.game_mode = "httt";
overc_2.gotoAndStop(1);
overc_1.gotoAndStop(2);
}
Symbol 295 Button
on (release) {
_root.game_ball = 0;
overc_7.gotoAndStop(2);
overc_8.gotoAndStop(1);
overc_9.gotoAndStop(1);
overc_10.gotoAndStop(1);
}
Symbol 296 Button
on (release) {
_root.game_ball = 1;
overc_8.gotoAndStop(2);
overc_7.gotoAndStop(1);
overc_9.gotoAndStop(1);
overc_10.gotoAndStop(1);
}
Symbol 297 Button
on (release) {
_root.game_ball = 2;
overc_9.gotoAndStop(2);
overc_8.gotoAndStop(1);
overc_7.gotoAndStop(1);
overc_10.gotoAndStop(1);
}
Symbol 298 Button
on (release) {
_root.game_ball = 3;
overc_10.gotoAndStop(2);
overc_8.gotoAndStop(1);
overc_9.gotoAndStop(1);
overc_7.gotoAndStop(1);
}
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 2
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 2
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
stop();
Symbol 312 Button
on (release) {
gotoAndStop ("menu");
}
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 2
stop();
Symbol 317 MovieClip Frame 3
stop();
Symbol 317 MovieClip Frame 4
stop();
Symbol 344 Button
on (release) {
_root.game_over();
_root.reset_game();
gotoAndStop ("menu");
}
Symbol 348 Button
on (release) {
getURL ("http://www.orangefoxgames.com/hop_to_the_top_tips_and_tricks.php", "_blank");
}
Symbol 354 MovieClip Frame 1
stop();
Symbol 358 Button
on (release) {
_root.game_over();
_root.reset_game();
_root.gotoAndStop("reset");
}
Symbol 370 Button
on (release) {
getURL ("http://www.myspace.com/onwendy1", "_blank");
}
Symbol 380 Button
on (release) {
_root.game_ball = 0;
overc_70.gotoAndStop(2);
overc_80.gotoAndStop(1);
overc_90.gotoAndStop(1);
overc_100.gotoAndStop(1);
}
Symbol 381 Button
on (release) {
_root.game_ball = 1;
overc_80.gotoAndStop(2);
overc_70.gotoAndStop(1);
overc_90.gotoAndStop(1);
overc_100.gotoAndStop(1);
}
Symbol 382 Button
on (release) {
_root.game_ball = 2;
overc_90.gotoAndStop(2);
overc_80.gotoAndStop(1);
overc_70.gotoAndStop(1);
overc_100.gotoAndStop(1);
}
Symbol 383 Button
on (release) {
_root.game_ball = 3;
overc_100.gotoAndStop(2);
overc_80.gotoAndStop(1);
overc_90.gotoAndStop(1);
overc_70.gotoAndStop(1);
}
Symbol 405 Button
on (release) {
_root.options_background = "yellow";
_root.do_switch_bg();
}
Symbol 407 Button
on (release) {
_root.options_background = "green";
_root.do_switch_bg();
}
Symbol 409 Button
on (release) {
_root.options_background = "red";
_root.do_switch_bg();
}
Symbol 411 Button
on (release) {
_root.options_background = "blue";
_root.do_switch_bg();
}
Symbol 413 Button
on (release) {
_quality = "LOW";
}
Symbol 415 Button
on (release) {
_quality = "MEDIUM";
}
Symbol 417 Button
on (release) {
_quality = "HIGH";
}
Symbol 419 Button
on (release) {
menu_music = new Sound(this);
menu_music.setVolume(100);
}
Symbol 421 Button
on (release) {
menu_music = new Sound(this);
menu_music.setVolume(0);
}