Instance of Symbol 335 MovieClip in Frame 1
//component parameters
onClipEvent (initialize) {
xin_motion_val = "Toward";
xin_alphatype_val = "No";
xout_motion_val = "None";
xout_alphatype_val = "No";
perc_req_val = 100;
show_perc_val = "Yes";
slow_factor_val = 0.2;
init_action_val = "_root.stop();";
play_action_val = "_root.play();";
}
Frame 22
stop();
Frame 23
stop();
Instance of Symbol 316 MovieClip [SnowboardingGame] in Frame 23
//component parameters
onClipEvent (initialize) {
quiz_data_file = "Quiz.txt";
game_type = "No Quiz";
new_question_delay = 70;
question_pause = 30;
num_used_questions = 10;
answer_spacing = 400;
answer_speed_factor = 2;
correct_answer_points = 20;
wrong_answer_points = -5;
trees_linkage = [];
trees_linkage[0] = "tree0";
trees_linkage[1] = "tree1";
trees_linkage[2] = "tree2";
trees_linkage[3] = "tree3";
trees_linkage[4] = "tree4";
obstacles_linkage = [];
obstacles_linkage[0] = "obstacle0";
obstacles_linkage[1] = "obstacle1";
obstacles_linkage[2] = "obstacle2";
obstacles_linkage[3] = "obstacle3";
obstacles_linkage[4] = "obstacle4";
obstacles_linkage[5] = "obstacle5";
obstacles_linkage[6] = "obstacle6";
obstacles_linkage[7] = "obstacle7";
obstacles_linkage[8] = "obstacle8";
obstacles_linkage[9] = "obstacle9";
obstacles_linkage[10] = "obstacle10";
obstacles_linkage[11] = "obstacle11";
new_obstacle_frame_delay = 40;
num_new_obstacles = 2;
stage_width = 650;
stage_height = 450;
min_speed = 7;
max_speed = 15;
snowboarder_accuracy = 15;
tree_spacing = 150;
left_tree_x = 40;
right_tree_x = 610;
up_tree_y = 40;
down_tree_y = 410;
time_bonus_start = 10000;
num_fall_game_over = 5;
correct_answer_sound = "correct_sound";
wipe_out_sound = "wipe_out_sound";
direction = "Down to Up";
num_points_next_level = 200;
next_level_speed_increase = 1;
win_level = 10;
}
Frame 25
stop();
Frame 26
stop();
Symbol 44 MovieClip Frame 41
stop();
Symbol 76 MovieClip Frame 44
_parent.gotoAndStop("Straight");
Symbol 118 MovieClip Frame 74
_parent.gotoAndStop("Straight");
Symbol 137 MovieClip Frame 35
_parent.gotoAndStop("Straight");
Symbol 163 MovieClip Frame 46
_parent.gotoAndStop("Straight");
Symbol 208 MovieClip Frame 71
_parent.gotoAndStop("Straight");
Symbol 232 MovieClip Frame 15
_parent.gotoAndStop("Flying");
Symbol 245 MovieClip Frame 12
_parent.gotoAndStop("Flying");
Symbol 262 MovieClip Frame 19
_parent.gotoAndStop("Flying");
Symbol 263 MovieClip Frame 1
stop();
Symbol 267 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 1
play();
Symbol 275 MovieClip Frame 62
var game = _parent._parent.game;
if (this.trick_player._currentframe != 1) {
bad_sounds.gotoAndStop(Math.randi(0, bad_sounds._totalframes - 1) + 2);
var _mc = _parent._parent.points_prompt;
var messages = ["What the?!", "How does the snow taste?", "What a loser...", "I wouldn't let you walk on the streets"];
_mc.play();
_mc.message = messages.rande();
_mc.points = "";
game.mode = game.mode ^ SNOWBOARDING_PLAYING;
game.mode = game.mode | (SNOWBOARDING_WIPED_OUT | SNOWBOARDING_OBSTACLE);
_parent._parent.snowboarder.gotoAndStop("Jumping Wipe Out");
game.wipe_out();
} else {
if (Math.random() > 0.5) {
game.play_sound("landing_sound");
} else {
good_sounds.gotoAndStop(Math.randi(0, good_sounds._totalframes - 1) + 2);
}
if ((game.jump_score / 10) >= 2) {
game.play_sound("trick_powerup");
}
game.num_successive_jumps++;
game.score = game.score + (game.jump_score * game.num_successive_jumps);
game.check_score = game.check_score + (game.jump_score * game.num_successive_jumps);
var _mc = _parent._parent.points_prompt;
var messages = ["Sweet!", "Nice one!", "Wowsers!", "You were flying!"];
_mc.play();
_mc.message = messages.rande();
_mc.points = ((game.jump_score + " X ") + game.num_successive_jumps) + " Points!";
}
game.jump_score = 0;
_parent.gotoAndStop("Straight");
Symbol 295 MovieClip Frame 1
play();
Symbol 295 MovieClip Frame 24
stop();
Symbol 296 MovieClip [snowboarder] Frame 1
stop();
Symbol 301 Button
on (release) {
_parent.game.mode = _parent.game.old_mode;
this.removeMovieClip();
}
Symbol 303 MovieClip [next_level_prompt] Frame 17
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 50
gotoAndStop (1);
Symbol 316 MovieClip [SnowboardingGame] Frame 1
Key.A = 65;
Key.B = 66;
Key.C = 67;
Key.D = 68;
Key.E = 69;
Key.F = 70;
Key.G = 71;
Key.H = 72;
Key.I = 73;
Key.J = 74;
Key.K = 75;
Key.L = 76;
Key.M = 77;
Key.N = 78;
Key.O = 79;
Key.P = 80;
Key.Q = 81;
Key.R = 82;
Key.S = 83;
Key.T = 84;
Key.U = 85;
Key.V = 86;
Key.W = 87;
Key.X = 88;
Key.Y = 89;
Key.Z = 90;
Key.ZERO = 48;
Key.ONE = 49;
Key.TWO = 50;
Key.THREE = 51;
Key.FOUR = 52;
Key.FIVE = 53;
Key.SIX = 54;
Key.SEVEN = 55;
Key.EIGHT = 56;
Key.NINE = 57;
Key.NUMPAD_ZERO = 96;
Key.NUMPAD_ONE = 97;
Key.NUMPAD_TWO = 98;
Key.NUMPAD_THREE = 99;
Key.NUMPAD_FOUR = 100;
Key.NUMPAD_FIVE = 101;
Key.NUMPAD_SIX = 102;
Key.NUMPAD_SEVEN = 103;
Key.NUMPAD_EIGHT = 104;
Key.NUMPAD_NINE = 105;
Key.MULTIPLY = 106;
Key.ADD = 107;
Key.SUBTRACT = 109;
Key.DECIMAL = 110;
Key.DIVIDE = 111;
Key.F1 = 112;
Key.F2 = 113;
Key.F3 = 114;
Key.F4 = 115;
Key.F5 = 116;
Key.F6 = 117;
Key.F7 = 118;
Key.F8 = 119;
Key.F9 = 120;
Key.F10 = 121;
Key.F11 = 122;
Key.F12 = 123;
Key.CLEAR = 12;
Key.PAGEUP = 33;
Key.PAGEDOWN = 34;
Key.HELP = 47;
Key.NUMLOCK = 144;
Key.SEMICOLON = 186;
Key.EQUAL = 187;
Key.MINUS = 189;
Key.SLASH = 191;
Key.GRAVE = 192;
Key.OPENBRACKET = 219;
Key.BACKSLASH = 220;
Key.CLOSEBRACKET = 221;
Key.QUOTE = 222;
Math.randi = function (a, b) {
return(Math.floor(Math.random() * (b - a)) + a);
};
Math.randf = function (a, b) {
return((Math.random() * (b - a)) + a);
};
Sound.playSound = function (linkage) {
var _local1 = new Sound();
_local1.attachSound(linkage);
_local1.start(0, 1);
};
Array.prototype.swap = function (a, b) {
var _local1 = this;
var _local2 = _local1[a];
_local1[a] = _local1[b];
_local1[b] = _local2;
};
Array.prototype.shuffle = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < _local1.length) {
var a = Math.randi(0, _local1.length);
var _local3 = Math.randi(0, _local1.length);
_local1.swap(a, _local3);
_local2++;
}
};
Array.prototype.rande = function () {
return(this[Math.randi(0, this.length)]);
};
Array.prototype.remove_element = function (e) {
var _local2 = this;
var _local3 = e;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == _local3) {
_local2.splice(_local1, 1);
return;
}
_local1++;
}
};
Object.prototype.SNOWBOARDING_NULL = 0;
Object.prototype.SNOWBOARDING_LOADING_VARS = 2;
Object.prototype.SNOWBOARDING_PLAYING = 4;
Object.prototype.SNOWBOARDING_PAUSED = 8;
Object.prototype.SNOWBOARDING_WIPED_OUT = 16;
Object.prototype.SNOWBOARDING_TREE = 32;
Object.prototype.SNOWBOARDING_OBSTACLE = 64;
Object.prototype.SNOWBOARDING_QUIZ_OUT = 128;
Object.prototype.SNOWBOARDING_PAUSED = 256;
_root._quality = "MEDIUM";
SnowboardingGame = function () {
this.initialize();
};
SnowboardingGame.prototype.quiz_data_file = quiz_data_file;
SnowboardingGame.prototype.new_question_delay = Number(new_question_delay);
SnowboardingGame.prototype.num_used_questions = Number(num_used_questions);
SnowboardingGame.prototype.question_pause = Number(question_pause);
SnowboardingGame.prototype.answer_spacing = Number(answer_spacing);
SnowboardingGame.prototype.answer_speed_factor = Number(answer_speed_factor);
SnowboardingGame.prototype.correct_answer_points = Number(correct_answer_points);
SnowboardingGame.prototype.wrong_answer_points = Number(wrong_answer_points);
SnowboardingGame.prototype.trees_linkage = trees_linkage;
SnowboardingGame.prototype.obstacles_linkage = obstacles_linkage;
SnowboardingGame.prototype.new_obstacle_frame_delay = Number(new_obstacle_frame_delay);
SnowboardingGame.prototype.num_new_obstacles = Number(num_new_obstacles);
SnowboardingGame.prototype.stage_width = Number(stage_width);
SnowboardingGame.prototype.stage_height = Number(stage_height);
SnowboardingGame.prototype.min_speed = Number(min_speed);
SnowboardingGame.prototype.max_speed = Number(max_speed);
SnowboardingGame.prototype.snowboarder_accuracy = Number(snowboarder_accuracy);
SnowboardingGame.prototype.tree_spacing = Number(tree_spacing);
SnowboardingGame.prototype.left_tree_x = Number(left_tree_x);
SnowboardingGame.prototype.right_tree_x = Number(right_tree_x);
SnowboardingGame.prototype.up_tree_y = Number(up_tree_y);
SnowboardingGame.prototype.down_tree_y = Number(down_tree_y);
SnowboardingGame.prototype.time_bonus_start = Number(time_bonus_start);
SnowboardingGame.prototype.num_fall_game_over = Number(num_fall_game_over);
SnowboardingGame.prototype.correct_answer_sound = correct_answer_sound;
SnowboardingGame.prototype.wipe_out_sound = wipe_out_sound;
SnowboardingGame.prototype.direction = direction;
SnowboardingGame.prototype.num_points_next_level = Number(num_points_next_level);
SnowboardingGame.prototype.next_level_speed_increase = Number(next_level_speed_increase);
SnowboardingGame.prototype.win_level = Number(win_level);
SnowboardingGame.prototype.game_type = game_type;
SnowboardingGame.prototype.timeline = this;
delete quiz_data_file;
delete new_question_delay;
delete num_used_questions;
delete question_pause;
delete answer_spacing;
delete answer_speed_factor;
delete correct_answer_points;
delete wrong_answer_points;
delete trees_linkage;
delete obstacles_linkage;
delete new_obstacle_frame_delay;
delete num_new_obstacles;
delete stage_width;
delete stage_height;
delete min_speed;
delete max_speed;
delete snowboarder_accuracy;
delete tree_spacing;
delete left_tree_x;
delete right_tree_x;
delete time_bonus_start;
delete num_fall_game_over;
delete correct_answer_sound;
delete wipe_out_sound;
delete direction;
SnowboardingGame.prototype.initialize = function () {
this.initialize_variables();
this.initialize_graphics();
};
SnowboardingGame.prototype.initialize_variables = function () {
var _local1 = this;
_local1.depth = 0;
_local1.obstacles = new Array();
_local1.trees = new Array();
_local1.question_choices = new Array();
_local1.time_bonus = _local1.time_bonus_start;
_local1.score = 0;
_local1.mode = SNOWBOARDING_NULL;
_local1.straight_angle = 0.628318530717959;
_local1.snowboarder_speed = 0;
_local1.snowboarder_distance = 0;
_local1.current_frame = 0;
_local1.tree_side = 1;
_local1.quiz_start_frame = 0;
_local1.quiz_exit_frame = 0;
_local1.num_wipe_outs = 0;
if (_local1.game_type == "Quiz") {
_local1.timeline.controller.loadVariables(_local1.quiz_data_file);
} else {
_local1.new_question_delay = Number.MAX_VALUE;
_local1.mode = SNOWBOARDING_PLAYING;
}
};
SnowboardingGame.prototype.initialize_graphics = function () {
this.create_snowboarder_graphic();
this.create_question_graphic();
};
SnowboardingGame.prototype.create_snowboarder_graphic = function () {
var _local1 = this;
_local1.timeline.attachMovie("snowboarder", "snowboarder", 50000);
if (_local1.direction == "Up to Down") {
_local1.timeline.snowboarder._x = _local1.stage_width / 2;
_local1.timeline.snowboarder._y = _local1.stage_height;
} else if (_local1.direction == "Down to Up") {
_local1.timeline.snowboarder._x = _local1.stage_width / 2;
_local1.timeline.snowboarder._y = 0;
} else if (_local1.direction == "Left to Right") {
_local1.timeline.snowboarder._x = _local1.stage_width;
_local1.timeline.snowboarder._y = _local1.stage_height / 2;
} else if (_local1.direction == "Right to Left") {
_local1.timeline.snowboarder._x = 0;
_local1.timeline.snowboarder._y = _local1.stage_height / 2;
}
};
SnowboardingGame.prototype.create_question_graphic = function () {
var _local1 = this;
_local1.timeline.attachMovie("question_animation", "question_animation", 20000);
_local1.timeline.question_animation._x = _local1.stage_width / 2;
_local1.timeline.question_animation._y = _local1.stage_height;
};
SnowboardingGame.prototype.action = function () {
var _local1 = this;
if (!(_local1.mode & SNOWBOARDING_PAUSED)) {
_local1.check_for_quiz();
_local1.check_add_objects();
_local1.apply_snowboarder_physics();
_local1.animate_game_objects();
_local1.update_variables();
}
_local1.timeline.info.player_score = _local1.score;
_local1.timeline.info.lives = _local1.num_fall_game_over - _local1.num_wipe_outs;
};
SnowboardingGame.prototype.check_for_quiz = function () {
var _local1 = this;
if (!(_local1.mode & SNOWBOARDING_QUIZ_OUT)) {
if ((_local1.current_frame - _local1.quiz_exit_frame) >= _local1.new_question_delay) {
_local1.mode = _local1.mode | SNOWBOARDING_QUIZ_OUT;
_local1.quiz_start_frame = _local1.current_frame;
var question = _local1.quiz_questions.pop();
_local1.timeline.question_animation.question_mc.field = question.question;
_local1.timeline.question_animation.play();
if ((_local1.direction == "Up to Down") || (_local1.direction == "Down to Up")) {
var spacing = ((_local1.right_tree_x - _local1.left_tree_x) / (question.choices.length + 1));
} else {
var spacing = ((_local1.down_tree_y - _local1.up_tree_y) / (question.choices.length + 1));
}
spacing = spacing - 20;
var indices_x = new Array();
var indices_y = new Array();
var k = 0;
while (k < _local1.num_choices) {
indices_x[k] = k;
indices_y[k] = k;
k++;
}
indices_x.shuffle();
indices_y.shuffle();
var _local2 = 0;
while (_local2 < _local1.num_choices) {
_local1.timeline.attachMovie("answer_textfield", "answer" + _local2, 100000 + (_local1.depth++));
var _local3 = _local1.timeline["answer" + _local2];
_local3.field = question.choices[_local2];
if (_local1.direction == "Up to Down") {
_local3._x = (((indices_x[_local2] + 0.5) * spacing) + _local1.left_tree_x) + 100;
_local3._y = (-_local1.answer_spacing) * (indices_y[_local2] + 1);
} else if (_local1.direction == "Down to Up") {
_local3._x = (((indices_x[_local2] + 0.5) * spacing) + _local1.left_tree_x) + 100;
_local3._y = _local1.stage_height + (_local1.answer_spacing * (indices_y[_local2] + 1));
} else if (_local1.direction == "Left to Right") {
_local3._x = (-_local1.answer_spacing) * (indices_x[_local2] + 1);
_local3._y = (((indices_y[_local2] + 0.5) * spacing) + _local1.up_tree_y) + 100;
} else if (_local1.direction == "Right to Left") {
_local3._x = _local1.stage_width + (_local1.answer_spacing * (indices_x[_local2] + 1));
_local3._y = (((indices_y[_local2] + 0.5) * spacing) + _local1.up_tree_y) + 100;
}
_local3.correct_answer = _local2 == question.answer;
_local1.question_choices.push(_local3);
_local2++;
}
}
}
};
SnowboardingGame.prototype.check_add_objects = function () {
this.check_add_obstacle();
this.check_add_tree();
};
SnowboardingGame.prototype.check_add_obstacle = function () {
var _local1 = this;
if (_local1.mode & SNOWBOARDING_WIPED_OUT) {
} else if ((_local1.current_frame % _local1.new_obstacle_frame_delay) == 0) {
if (Math.random() < 0.3) {
_local1.depth++;
var rand = Math.random();
var linkages = ["rough_patch", "outhouse", "snow_pile", "hanging_laundry", "animal_tree", "animal_tree", "jump0", "jump1", "jump0", "jump1", "jump0", "jump1"];
var rand_link = linkages.rande();
if (_local1.timeline[rand_link] != undefined) {
return;
}
_local1.timeline.attachMovie(rand_link, rand_link, _local1.depth);
var _local2 = _local1.timeline[rand_link];
_local1.depth++;
if (_local1.direction == "Up to Down") {
_local2._x = _local1.stage_width / 2;
_local2._y = (-_local2._height) / 2;
} else if (_local1.direction == "Down to Up") {
_local2._x = _local1.stage_width / 2;
_local2._y = _local1.stage_height + (_local2._height / 2);
} else if (_local1.direction == "Left to Right") {
_local2._x = (-_local2._width) / 2;
_local2._y = _local1.stage_height / 2;
} else if (_local1.direction == "Right to Left") {
_local2._x = _local1.stage_width + (_local2._width / 2);
_local2._y = _local1.stage_height / 2;
}
_local1.obstacles.push(_local2);
} else {
var num_obstacles = Math.randi(1, _local1.num_new_obstacles + 1);
var _local3 = 0;
while (_local3 < num_obstacles) {
var linkage = _local1.obstacles_linkage.rande();
_local1.depth++;
_local1.timeline.attachMovie(linkage, "obstacle" + _local1.depth, _local1.depth);
var _local2 = _local1.timeline["obstacle" + _local1.depth];
_local1.depth++;
if (_local1.direction == "Up to Down") {
_local2._x = Math.randf(_local1.left_tree_x + (_local2._width / 2), _local1.right_tree_x - (_local2._width / 2));
_local2._y = (-_local2._height) / 2;
} else if (_local1.direction == "Down to Up") {
_local2._x = Math.randf(_local1.left_tree_x + (_local2._width / 2), _local1.right_tree_x - (_local2._width / 2));
_local2._y = _local1.stage_height + (_local2._height / 2);
} else if (_local1.direction == "Left to Right") {
_local2._x = (-_local2._width) / 2;
_local2._y = Math.randf(_local1.up_tree_y + (_local2._height / 2), _local1.down_tree_y - (_local2._height / 2));
} else if (_local1.direction == "Right to Left") {
_local2._x = _local1.stage_width + (_local2._width / 2);
_local2._y = Math.randf(_local1.up_tree_y + (_local2._height / 2), _local1.down_tree_y - (_local2._height / 2));
}
_local1.obstacles.push(_local2);
_local3++;
}
}
}
};
SnowboardingGame.prototype.check_add_tree = function () {
var _local1 = this;
if ((_local1.snowboarder_distance - _local1.last_distance) >= _local1.tree_spacing) {
var _local3 = _local1.trees_linkage.rande();
_local1.depth++;
_local1.timeline.attachMovie(_local3, "tree" + _local1.depth, _local1.depth);
var _local2 = _local1.timeline["tree" + _local1.depth];
_local1.depth++;
if (_local1.direction == "Up to Down") {
if (_local1.tree_side == 1) {
_local2._x = _local1.left_tree_x;
} else {
_local2._x = _local1.right_tree_x;
}
_local2._y = (-_local2._height) / 2;
} else if (_local1.direction == "Down to Up") {
if (_local1.tree_side == 1) {
_local2._x = _local1.left_tree_x;
} else {
_local2._x = _local1.right_tree_x;
}
_local2._y = _local1.stage_height + (_local2._height / 2);
} else if (_local1.direction == "Left to Right") {
_local2._x = (-_local2._width) / 2;
if (_local1.tree_side == 1) {
_local2._y = _local1.up_tree_y;
} else {
_local2._y = _local1.down_tree_y;
}
} else if (_local1.direction == "Right to Left") {
_local2._x = _local1.stage_width + (_local2._width / 2);
if (_local1.tree_side == 1) {
_local2._y = _local1.up_tree_y;
} else {
_local2._y = _local1.down_tree_y;
}
}
_local1.trees.push(_local2);
_local1.last_distance = _local1.snowboarder_distance;
_local1.tree_side = _local1.tree_side * -1;
}
};
SnowboardingGame.prototype.apply_snowboarder_physics = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.direction == "Up to Down") {
_local1.snowboarder_acceleration = ((_local1.timeline.snowboarder._y + (_local1.timeline.snowboarder._height / 2)) - _local2._ymouse) / 50;
} else if (_local1.direction == "Down to Up") {
_local1.snowboarder_acceleration = ((_local1.timeline.snowboarder._y - (_local1.timeline.snowboarder._height / 2)) - _local2._ymouse) / 50;
_local1.snowboarder_acceleration = _local1.snowboarder_acceleration * -1;
} else if (_local1.direction == "Left to Right") {
} else if (_local1.direction == "Right to Left") {
}
if (_local1.mode & SNOWBOARDING_PLAYING) {
_local1.snowboarder_speed = _local1.snowboarder_speed + _local1.snowboarder_acceleration;
if (_local1.snowboarder_speed > _local1.max_speed) {
_local1.snowboarder_speed = _local1.max_speed;
} else if (_local1.snowboarder_speed < _local1.min_speed) {
_local1.snowboarder_speed = _local1.min_speed;
}
} else if (_local1.mode & SNOWBOARDING_WIPED_OUT) {
if (_local1.timeline.snowboarder._currentframe != 9) {
_local1.snowboarder_speed = _local1.snowboarder_speed - (_local1.snowboarder_speed / 20);
}
_local1.timeline.snowboarder._rotation = 0;
if ((Math.abs(_local1.snowboarder_speed) < 0.5) || ((_local1.timeline.snowboarder._currentframe == 9) && (_local1.timeline.snowboarder._mc._currentframe >= (_local1.timeline.snowboarder._mc._totalframes - 1)))) {
_local1.mode = _local1.mode ^ SNOWBOARDING_WIPED_OUT;
_local1.mode = _local1.mode | SNOWBOARDING_PLAYING;
if (_local1.mode & SNOWBOARDING_TREE) {
_local1.mode = _local1.mode ^ SNOWBOARDING_TREE;
}
if (_local1.mode & SNOWBOARDING_OBSTACLE) {
_local1.mode = _local1.mode ^ SNOWBOARDING_OBSTACLE;
}
if (_local1.num_wipe_outs >= _local1.num_fall_game_over) {
_local2.score = _local1.score;
_local2.gotoAndStop("Lose");
}
}
}
_local1.snowboarder_distance = _local1.snowboarder_distance + _local1.snowboarder_speed;
};
SnowboardingGame.prototype.animate_game_objects = function () {
var _local1 = this;
_local1.animate_snowboarder();
_local1.animate_trees();
_local1.animate_obstacles();
_local1.animate_answer_choices();
};
SnowboardingGame.prototype.animate_snowboarder = function () {
var _local1 = this;
var _local2 = _root;
if ((_local1.mode & SNOWBOARDING_WIPED_OUT) && (_local1.mode & SNOWBOARDING_TREE)) {
if ((_local1.direction == "Up to Down") || (_local1.direction == "Down to Up")) {
if (_local1.timeline.snowboarder._x <= (_local1.stage_width / 2)) {
var direction = 1;
} else {
var direction = -1;
}
if (_local1.timeline.snowboarder._currentframe == 9) {
_local1.timeline.snowboarder._x = _local1.timeline.snowboarder._x + ((_local1.snowboarder_speed * direction) * 0.142857142857143);
} else {
_local1.timeline.snowboarder._x = _local1.timeline.snowboarder._x + ((_local1.snowboarder_speed * direction) * 0.333333333333333);
}
} else {
if (_local1.timeline.snowboarder._y <= (_local1.stage_height / 2)) {
var direction = 1;
} else {
var direction = -1;
}
if (_local1.timeline.snowboarder._currentframe == 9) {
_local1.timeline.snowboarder._y = _local1.timeline.snowboarder._y + ((_local1.snowboarder_speed * direction) * 0.142857142857143);
} else {
_local1.timeline.snowboarder._y = _local1.timeline.snowboarder._y + ((_local1.snowboarder_speed * direction) * 0.333333333333333);
}
}
} else if (_local1.mode & SNOWBOARDING_PLAYING) {
if (_local1.direction == "Up to Down") {
_local1.timeline.snowboarder._x = _local1.timeline.snowboarder._x + ((_local2._xmouse - _local1.timeline.snowboarder._x) / _local1.snowboarder_accuracy);
_local1.timeline.snowboarder._y = _local1.timeline.snowboarder._y + ((_local2._ymouse - (_local1.timeline.snowboarder._y - (_local1.timeline.snowboarder._height / 2))) / _local1.snowboarder_accuracy);
} else if (_local1.direction == "Down to Up") {
_local1.timeline.snowboarder._x = _local1.timeline.snowboarder._x + ((_local2._xmouse - _local1.timeline.snowboarder._x) / _local1.snowboarder_accuracy);
_local1.timeline.snowboarder._y = _local1.timeline.snowboarder._y + ((_local2._ymouse - (_local1.timeline.snowboarder._y + (_local1.timeline.snowboarder._height / 2))) / _local1.snowboarder_accuracy);
} else if (_local1.direction == "Left to Right") {
_local1.timeline.snowboarder._x = _local1.timeline.snowboarder._x + (((_local2._xmouse - _local1.timeline.snowboarder._x) + (_local1.timeline.snowboarder._width / 2)) / _local1.snowboarder_accuracy);
_local1.timeline.snowboarder._y = _local1.timeline.snowboarder._y + ((_local2._ymouse - _local1.timeline.snowboarder._y) / _local1.snowboarder_accuracy);
} else if (_local1.direction == "Right to left") {
_local1.timeline.snowboarder._x = _local1.timeline.snowboarder._x + (((_local2._xmouse - _local1.timeline.snowboarder._x) - (_local1.timeline.snowboarder._width / 2)) / _local1.snowboarder_accuracy);
_local1.timeline.snowboarder._y = _local1.timeline.snowboarder._y + ((_local2._ymouse - _local1.timeline.snowboarder._y) / _local1.snowboarder_accuracy);
}
var delta_x = (_local1.timeline.snowboarder._x - _local2._xmouse);
var delta_y = (_local1.timeline.snowboarder._y - _local2._ymouse);
if (_local1.direction == "Up to Down") {
var _local3 = Math.atan2(delta_x, delta_y);
} else if (_local1.direction == "Down to Up") {
var _local3 = Math.atan2(delta_x, -delta_y);
} else if (_local1.direction == "Left to Right") {
var _local3 = Math.atan2(delta_y, delta_x);
} else if (_local1.direction == "Right to Left") {
var _local3 = Math.atan2(delta_y, -delta_x);
}
_local1.timeline.snowboarder._rotation = ((-0.333333333333333 * _local3) * 180) / Math.PI;
if (_local1.timeline.snowboarder._currentframe == 5) {
} else if (_local1.timeline.snowboarder._currentframe == 6) {
} else if (_local1.timeline.snowboarder._currentframe == 7) {
} else if (_local1.timeline.snowboarder._currentframe == 8) {
} else if (_local1.timeline.snowboarder._currentframe == 9) {
} else if (_local1.timeline.snowboarder._currentframe == 10) {
} else {
_local1.old_frame = _local1.timeline.snowboarder._currentframe;
if (Math.abs(_local3) < _local1.straight_angle) {
_local1.timeline.snowboarder.gotoAndStop("Straight");
} else if (_local3 > 0) {
_local1.timeline.snowboarder.gotoAndStop("Turn Left");
} else if (_local3 < 0) {
_local1.timeline.snowboarder.gotoAndStop("Turn Right");
}
var frame = _local1.timeline.snowboarder._currentframe;
if ((_local1.old_frame != frame) && (_local3 > (1.2 * _local1.straight_angle))) {
_local1.play_sound(["turn_left", "turn_right"].rande());
}
if ((_local1.old_frame != frame) && (_local3 < (-1.2 * _local1.straight_angle))) {
_local1.play_sound(["turn_left", "turn_right"].rande());
}
}
}
};
SnowboardingGame.prototype.animate_trees = function () {
var _local1 = this;
var _local3 = 0;
while (_local3 < _local1.trees.length) {
var _local2 = _local1.trees[_local3];
if (_local1.direction == "Up to Down") {
_local2._y = _local2._y + _local1.snowboarder_speed;
} else if (_local1.direction == "Down to Up") {
_local2._y = _local2._y - _local1.snowboarder_speed;
} else if (_local1.direction == "Left to Right") {
_local2._x = _local2._x + _local1.snowboarder_speed;
} else if (_local1.direction == "Right to Left") {
_local2._x = _local2._x - _local1.snowboarder_speed;
}
if (_local1.obstacle_off_stage(_local2)) {
_local1.trees.remove_element(_local2);
_local2.removeMovieClip();
}
if (_local1.timeline.snowboarder._currentframe != 10) {
if (_local2.hitTest(_local1.timeline.snowboarder.hit_area) && (!(_local1.mode & SNOWBOARDING_WIPED_OUT))) {
_local1.mode = _local1.mode ^ SNOWBOARDING_PLAYING;
_local1.mode = _local1.mode | (SNOWBOARDING_WIPED_OUT | SNOWBOARDING_TREE);
if (Math.random() > 0.5) {
_local1.timeline.snowboarder.gotoAndStop("Wipe Out");
} else {
_local1.timeline.snowboarder.gotoAndStop("Animal");
}
_local1.play_sound("tree_impact");
_local1.wipe_out();
}
}
_local3++;
}
};
SnowboardingGame.prototype.animate_obstacles = function () {
var _local1 = this;
var _local3 = 0;
while (_local3 < _local1.obstacles.length) {
var _local2 = _local1.obstacles[_local3];
if (_local1.direction == "Up to Down") {
_local2._y = _local2._y + _local1.snowboarder_speed;
} else if (_local1.direction == "Down to Up") {
_local2._y = _local2._y - _local1.snowboarder_speed;
} else if (_local1.direction == "Left to Right") {
_local2._x = _local2._x + _local1.snowboarder_speed;
} else if (_local1.direction == "Right to Left") {
_local2._x = _local2._x - _local1.snowboarder_speed;
}
if (_local1.obstacle_off_stage(_local2)) {
_local1.obstacles.remove_element(_local2);
_local2.removeMovieClip();
}
if (_local1.timeline.snowboarder._currentframe != 10) {
if (_local2.hitTest(_local1.timeline.snowboarder.hit_area) && (!(_local1.mode & SNOWBOARDING_WIPED_OUT))) {
if (_local2._name == "rough_patch") {
if (_local1.timeline.snowboarder._currentframe != 5) {
_local1.timeline.snowboarder.gotoAndStop("Off Balance");
}
} else if (_local2._name == "hanging_laundry") {
if (_local1.timeline.snowboarder._currentframe != 7) {
_local1.timeline.snowboarder.gotoAndStop("Clothsline");
}
} else if (_local2._name == "outhouse") {
_local2._visible = false;
if (_local1.timeline.snowboarder._currentframe != 8) {
_local1.timeline.snowboarder.gotoAndStop("Outhouse");
}
} else if (_local2._name == "snow_pile") {
if (_local1.timeline.snowboarder._currentframe != 6) {
_local1.timeline.snowboarder.gotoAndStop("Snowman");
}
} else if (_local2._name == "animal_tree") {
if (_local1.timeline.snowboarder._currentframe != 9) {
_local1.timeline.snowboarder.gotoAndStop("Animal");
}
} else if ((_local2._name == "jump0") || (_local2._name == "jump1")) {
if (_local1.timeline.snowboarder._currentframe != 10) {
_local1.timeline.snowboarder.gotoAndStop("Jumping");
}
} else {
_local1.mode = _local1.mode ^ SNOWBOARDING_PLAYING;
_local1.mode = _local1.mode | (SNOWBOARDING_WIPED_OUT | SNOWBOARDING_OBSTACLE);
_local1.timeline.snowboarder.gotoAndStop("Wipe Out");
_local1.wipe_out();
_local1.play_sound("wipe_out_sound");
}
}
}
_local3++;
}
};
SnowboardingGame.prototype.animate_answer_choices = function () {
var _local1 = this;
if (_local1.mode & SNOWBOARDING_QUIZ_OUT) {
if ((_local1.current_frame - _local1.quiz_start_frame) >= _local1.question_pause) {
var j = 0;
while (j < _local1.question_choices.length) {
var _local2 = _local1.question_choices[j];
if (_local1.direction == "Up to Down") {
_local2._y = _local2._y + (_local1.snowboarder_speed / _local1.answer_speed_factor);
} else if (_local1.direction == "Down to Up") {
_local2._y = _local2._y - (_local1.snowboarder_speed / _local1.answer_speed_factor);
} else if (_local1.direction == "Left to Right") {
_local2._x = _local2._x + (_local1.snowboarder_speed / _local1.answer_speed_factor);
} else if (_local1.direction == "Right to Left") {
_local2._x = _local2._x - (_local1.snowboarder_speed / _local1.answer_speed_factor);
}
if (_local1.obstacle_off_stage(_local2)) {
if (_local1.direction == "Up to Down") {
_local2._y = (-_local1.answer_spacing) * 2;
} else if (_local1.direction == "Down to Up") {
_local2._y = _local1.stage_height + (_local1.answer_spacing * 2);
} else if (_local1.direction == "Left to Right") {
_local2._x = (-_local1.answer_spacing) * 2;
} else if (_local1.direction == "Right to Left") {
_local2._x = _local1.stage_width + (_local1.answer_spacing * 2);
}
}
if (_local1.timeline.snowboarder.hitTest(_local2._x, _local2._y, true)) {
if (((_local2.field == undefined) || (_local2.field == "")) || (_local1.mode & SNOWBOARDING_WIPED_OUT)) {
return;
}
if (_local2.correct_answer) {
_local1.score = _local1.score + _local1.correct_answer_points;
_local1.check_score = _local1.check_score + _local1.correct_answer_points;
var _local3 = 0;
while (_local3 < _local1.question_choices.length) {
_local1.question_choices[_local3].removeMovieClip();
_local3++;
}
_local1.question_choices = new Array();
_local1.mode = _local1.mode ^ SNOWBOARDING_QUIZ_OUT;
Sound.playSound(_local1.correct_answer_sound);
Sound.playSound("cheer");
} else {
_local1.score = _local1.score + _local1.wrong_answer_points;
var _local3 = 0;
while (_local3 < _local1.question_choices.length) {
_local1.question_choices[_local3].removeMovieClip();
_local3++;
}
_local1.question_choices = new Array();
_local1.mode = _local1.mode ^ SNOWBOARDING_PLAYING;
_local1.mode = _local1.mode ^ SNOWBOARDING_QUIZ_OUT;
_local1.mode = _local1.mode | (SNOWBOARDING_WIPED_OUT | SNOWBOARDING_OBSTACLE);
_local1.timeline.snowboarder.gotoAndStop("Wipe Out");
_local1.wipe_out();
Sound.playSound("boo");
}
_local1.num_questions_answered++;
if (_local1.current_level >= (_local1.win_level - 1)) {
_root.score = _local1.score;
_root.gotoAndStop("Win");
} else {
if (_local1.check_score >= _local1.num_points_next_level) {
_local1.check_score = 0;
_local1.num_wipe_outs--;
_local1.max_speed = _local1.max_speed + _local1.next_level_speed_increase;
_local1.current_level++;
_local1.timeline.attachMovie("next_level_prompt", "next_level_prompt", 999999 + (_local1.depth++));
_local1.timeline.next_level_prompt._x = _local1.stage_width / 2;
_local1.timeline.next_level_prompt._y = _local1.stage_height / 2;
_local1.timeline.next_level_prompt.field = ("Level " + (_local1.current_level + 1)) + "!";
}
_local1.timeline.question_animation.play();
_local1.quiz_exit_frame = _local1.current_frame;
return;
j++;
continue;
if (_local1.current_level >= (_local1.win_level - 1)) {
_root.score = _local1.score;
_root.gotoAndStop("Win");
} else if (_local1.check_score >= _local1.num_points_next_level) {
_local1.check_score = 0;
_local1.num_wipe_outs--;
_local1.max_speed = _local1.max_speed + _local1.next_level_speed_increase;
_local1.current_level++;
_local1.timeline.attachMovie("next_level_prompt", "next_level_prompt", 999999 + (_local1.depth++));
_local1.timeline.next_level_prompt._x = _local1.stage_width / 2;
_local1.timeline.next_level_prompt._y = _local1.stage_height / 2;
_local1.timeline.next_level_prompt.field = ("Level " + (_local1.current_level + 1)) + "!";
_local1.old_mode = _local1.mode;
_local1.mode = SNOWBOARDING_PAUSED;
}
}
}
j++;
}
}
}
if (_local1.current_level >= (_local1.win_level - 1)) {
_root.score = _local1.score;
_root.gotoAndStop("Win");
} else if (_local1.check_score >= _local1.num_points_next_level) {
_local1.check_score = 0;
_local1.num_wipe_outs--;
_local1.max_speed = _local1.max_speed + _local1.next_level_speed_increase;
_local1.current_level++;
_local1.timeline.attachMovie("next_level_prompt", "next_level_prompt", 999999 + (_local1.depth++));
_local1.timeline.next_level_prompt._x = _local1.stage_width / 2;
_local1.timeline.next_level_prompt._y = _local1.stage_height / 2;
_local1.timeline.next_level_prompt.field = ("Level " + (_local1.current_level + 1)) + "!";
_local1.old_mode = _local1.mode;
_local1.mode = SNOWBOARDING_PAUSED;
}
};
SnowboardingGame.prototype.obstacle_off_stage = function (_mc) {
var _local1 = _mc;
var _local2 = this;
if (_local2.direction == "Up to Down") {
if ((_local1._y - (_local1._height / 2)) >= _local2.stage_height) {
return(true);
}
} else if (_local2.direction == "Down to Up") {
if ((_local1._y + (_local1._height / 2)) <= 0) {
return(true);
}
} else if (_local2.direction == "Left to Right") {
if ((_local1._x - (_local1._width / 2)) >= _local2.stage_width) {
return(true);
}
} else if (_local2.direction == "Right to Left") {
if ((_local1._x + (_local1._width / 2)) <= 0) {
return(true);
}
}
return(false);
};
SnowboardingGame.prototype.update_variables = function () {
this.current_frame++;
};
SnowboardingGame.prototype.wipe_out = function () {
var _local1 = this;
_local1.jump_score = 0;
_local1.num_successive_jumps = 0;
if (_local1.timeline.next_level_prompt == undefined) {
_local1.num_wipe_outs++;
}
};
SnowboardingGame.prototype.key_press = function () {
var _local1 = this;
var _local2 = 10;
if (((_local1.timeline.snowboarder._currentframe == 10) && (_local1.timeline.snowboarder.player.trick_player != undefined)) && (_local1.timeline.snowboarder.player.trick_player._currentframe == 1)) {
if (Key.isDown(Key.A)) {
_local1.jump_score = _local1.jump_score + _local2;
_local1.timeline.snowboarder.player.trick_player.gotoAndStop("180 Trick");
} else if (Key.isDown(Key.S)) {
_local1.jump_score = _local1.jump_score + _local2;
_local1.timeline.snowboarder.player.trick_player.gotoAndStop("Side Kick");
} else if (Key.isDown(Key.D)) {
_local1.jump_score = _local1.jump_score + _local2;
_local1.timeline.snowboarder.player.trick_player.gotoAndStop("Flip Trick");
}
}
};
SnowboardingGame.prototype.play_sound = function (linkage) {
var _local1 = new Sound(this.timeline);
_local1.attachSound(linkage);
_local1.setVolume(70);
_local1.start(0, 1);
};
this._x = 0;
this._y = 0;
game = new SnowboardingGame();
Instance of Symbol 305 MovieClip "controller" in Symbol 316 MovieClip [SnowboardingGame] Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (data) {
_parent.game.num_questions = Number(num_questions);
_parent.game.num_choices = Number(num_choices);
_parent.game.quiz_questions = new Array();
var j = 0;
while (j < _parent.game.num_questions) {
_parent.game.quiz_questions[j] = new Object();
_parent.game.quiz_questions[j].question = this["question" + j];
_parent.game.quiz_questions[j].answer = this[("question" + j) + "_answer"];
_parent.game.quiz_questions[j].choices = new Array();
var k = 0;
while (k < _parent.game.num_choices) {
_parent.game.quiz_questions[j].choices[k] = this[(("choice" + j) + "_") + k];
k++;
}
j++;
}
_parent.game.quiz_questions.shuffle();
_parent.game.mode = SNOWBOARDING_PLAYING;
}
onClipEvent (keyDown) {
_parent.game.key_press();
}
onClipEvent (enterFrame) {
_parent.game.action();
}
Instance of Symbol 308 MovieClip "points_prompt" in Symbol 316 MovieClip [SnowboardingGame] Frame 1
onClipEvent (load) {
this.swapDepths(99999);
}
Instance of Symbol 315 MovieClip "info" in Symbol 316 MovieClip [SnowboardingGame] Frame 1
onClipEvent (load) {
this.swapDepths(999999);
}
Symbol 335 MovieClip Frame 1
stop();
Instance of Symbol 334 MovieClip "swfloader" in Symbol 335 MovieClip Frame 1
onClipEvent (load) {
function strip_spaces(str) {
var _local2 = str;
var _local3 = new String("");
var _local1 = 0;
while (_local1 < _local2.length) {
if ((_local2.charAt(_local1) != " ") && (_local2.charAt(_local1) != ";")) {
_local3 = _local3 + _local2.charAt(_local1);
}
_local1++;
}
return(_local3);
}
function simple_script(action, timeline) {
action = strip_spaces(action);
if ((action.length > 0) && ((action.indexOf(")") != -1) && (action.indexOf("(") != -1))) {
var _local3 = action.split(".");
var timeline_action = _local3.pop();
var first_paren = timeline_action.indexOf("(");
var second_paren = timeline_action.indexOf(")");
var timeline_function = timeline_action.substr(0, first_paren);
var function_parameter = timeline_action.substr(first_paren + 1, second_paren - (first_paren + 1));
var _local2 = timeline;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local2[_local3[_local1]];
_local1++;
}
if (function_parameter.indexOf("\"") != -1) {
function_parameter = function_parameter.substr(1, function_parameter.length - 2);
}
_local2[timeline_function](function_parameter);
}
}
function execute_action() {
var _local1 = _parent;
unloaded = true;
_local1._visible = false;
simple_script(_local1.play_action_val, _local1);
}
_parent.anim.gotoAndStop(1);
simple_script(_parent.init_action_val, _parent);
var done = false;
var unloaded = false;
var orig_x = _parent._x;
var orig_y = _parent._y;
var dist_x = (_parent._x + ((_parent._width * 2) / 3));
var dist_y = (_parent._y + ((_parent._height * 2) / 3));
var orig_a = _parent._alpha;
var accel_jump = 0.75;
var slow_factor = _parent.slow_factor_val;
var speed_factor = (1 + (slow_factor / (1 - slow_factor)));
var ready = false;
var perc_fadeout = 0;
_parent.perc._x = _parent.anim._x - (_parent.perc._width / 2);
_parent.perc._y = _parent.anim._y - (_parent.perc._height / 2);
if (slow_factor < 1) {
switch (_parent.xin_motion_val) {
case "Up" :
_parent._y = orig_y + (dist_y * 2);
break;
case "Down" :
_parent._y = orig_y - (dist_y * 2);
break;
case "Left" :
_parent._x = orig_x + (dist_x * 2);
break;
case "Right" :
_parent._x = orig_x - (dist_x * 2);
break;
case "Toward" :
_parent._xscale = (_parent._yscale = 1);
break;
case "None" :
_parent._alpha = 0;
}
} else {
ready = true;
}
}
onClipEvent (enterFrame) {
if (unloaded) {
return(undefined);
}
if (!ready) {
switch (_parent.xin_motion_val) {
case "Toward" :
_parent._xscale = _parent._xscale + ((100 - _parent._xscale) * slow_factor);
_parent._yscale = _parent._xscale;
if (_parent.xin_alphatype_val == "Yes") {
_parent._alpha = Math.round((orig_a / 100) * Math.max(0, Math.min(_parent._xscale, 100)));
}
if (Math.abs(100 - _parent._xscale) < 0.5) {
_parent._xscale = (_parent._yscale = 100);
_parent._alpha = orig_a;
ready = true;
}
break;
default :
_parent._x = _parent._x + ((orig_x - _parent._x) * slow_factor);
_parent._y = _parent._y + ((orig_y - _parent._y) * slow_factor);
if (_parent.xin_alphatype_val == "Yes") {
if (_parent.xin_motion_val == "None") {
_parent._alpha = _parent._alpha + ((orig_a - _parent._alpha) * slow_factor);
} else if (Math.abs(orig_x - _parent._x) > Math.abs(orig_y - _parent._y)) {
_parent._alpha = 100 - Math.round(((orig_a / 100) * (Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x)) * 100);
} else {
_parent._alpha = 100 - Math.round(((orig_a / 100) * (Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y)) * 100);
}
}
if (!(((_parent.xin_motion_val == "None") && (Math.abs(_parent._alpha - orig_a) <= 1)) || (((_parent.xin_motion_val != "None") && (Math.abs(_parent._y - orig_y) < 0.5)) && (Math.abs(_parent._x - orig_x) < 0.5)))) {
break;
}
_parent._x = orig_x;
_parent._y = orig_y;
_parent._alpha = orig_a;
ready = true;
}
} else if (!done) {
var rl = _root.getBytesLoaded();
var rt = (_root.getBytesTotal() * (_parent.perc_req_val / 100));
if ((rl > 10) && (rt > 10)) {
rl = Math.min(rl, rt);
var new_frame = (_parent.anim._currentframe + Math.ceil(((_parent.anim._totalframes * (rl / rt)) - _parent.anim._currentframe) / 4));
new_frame = Math.max(1, new_frame);
if (_parent.show_perc_val == "Yes") {
_parent.perc.text = Math.round(((new_frame - 1) / (_parent.anim._totalframes - 1)) * 100) + " %";
}
if (new_frame != _parent.anim._currentframe) {
_parent.anim.gotoAndStop(new_frame);
}
if ((_parent.anim._totalframes == _parent.anim._currentframe) && (rl >= rt)) {
done = true;
}
}
} else if (slow_factor < 1) {
switch (_parent.xout_motion_val) {
case "Down" :
if (_parent._y <= orig_y) {
_parent._y = orig_y + accel_jump;
}
_parent._y = orig_y + (Math.abs(_parent._y - orig_y) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y > (orig_y + (dist_y * 2))) {
execute_action();
}
break;
case "Up" :
if (_parent._y >= orig_y) {
_parent._y = orig_y - accel_jump;
}
_parent._y = orig_y - (Math.abs(_parent._y - orig_y) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y < (orig_y - (dist_y * 2))) {
execute_action();
}
break;
case "Right" :
if (_parent._x <= orig_x) {
_parent._x = orig_x + accel_jump;
}
_parent._x = orig_x + (Math.abs(_parent._x - orig_x) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x > (orig_x + (dist_x * 2))) {
execute_action();
}
break;
case "Left" :
if (_parent._x >= orig_x) {
_parent._x = orig_x - accel_jump;
}
_parent._x = orig_x - (Math.abs(_parent._x - orig_x) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x < (orig_x - (dist_x * 2))) {
execute_action();
}
break;
case "Away" :
if ((_parent._xscale >= 100) || (_parent._yscale >= 100)) {
_parent._xscale = (_parent._yscale = 100 - accel_jump);
}
_parent._xscale = (_parent._yscale = Math.max(0.5, 100 - ((100 - _parent._yscale) * speed_factor)));
perc_fadeout = 100 - Math.round(Math.max(0, Math.min(_parent._xscale, 100)));
if (_parent._xscale < 1) {
execute_action();
}
break;
default :
perc_fadeout = perc_fadeout + ((100 - perc_fadeout) * slow_factor);
if (Math.abs(perc_fadeout - 100) > 1) {
break;
}
execute_action();
}
if (!(_parent.xout_alphatype_val === "Yes")) {
} else {
_parent._alpha = (orig_a / 100) * (100 - perc_fadeout);
}
} else {
execute_action();
}
}
Symbol 342 MovieClip Frame 1
_parent.stop();
Symbol 342 MovieClip Frame 65
stop();
_parent.play();
Symbol 348 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 2
stop();
Symbol 352 Button
on (release) {
getURL ("http://www.urgames.com", "_self");
}
Symbol 356 Button
on (release) {
getURL ("http://www.gamesforyourwebsite.com", "_self");
}
Symbol 360 Button
on (release) {
getURL ("http://www.urgames.com/forums", "_self");
}
Symbol 364 Button
on (release) {
getURL ("http://www.urgames.com/cheats", "_self");
}
Symbol 367 Button
on (release) {
_root.play();
}
Symbol 370 Button
on (release) {
_root.inst.gotoAndStop("On");
gotoAndStop ("i2");
}
Symbol 371 Button
on (release) {
_root.inst.gotoAndStop("Off");
gotoAndStop ("i1");
}
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 2
stop();
Symbol 424 Button
on (press) {
_root.gotoAndStop("Intro");
}
Symbol 429 Button
on (press) {
_root.gotoAndStop("Intro");
}