Instance of Symbol 343 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 = 35;
show_perc_val = "Yes";
slow_factor_val = 0.2;
init_action_val = "_root.stop();";
play_action_val = "_root.play();";
}
Frame 1
if (false) {
}
Instance of Symbol 343 MovieClip in Frame 2
//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 2
if (false) {
}
Frame 3
stop();
Frame 4
stop();
loadMovieNum ("SoundLoopComponent.swf", 10);
Instance of Symbol 485 MovieClip in Frame 4
//component parameters
onClipEvent (initialize) {
quiz_data_file = "";
quiz_object_probability = 0;
shuffle_questions = "True";
correct_points = 100;
incorrect_points = -25;
stage_width = 720;
stage_height = 450;
show_mouse = "True";
minimum_bubble_size = 50;
flying_objects_linkages = [];
flying_objects_linkages[0] = "flying0";
flying_objects_linkages[1] = "flying1";
flying_objects_linkages[2] = "flying2";
flying_objects_linkages[3] = "flying3";
flying_quiz_objects_linkages = [];
flying_quiz_objects_linkages[0] = "flying_quiz0";
special_objects_linkages = [];
special_objects_linkages[0] = "special0";
falling_objects_linkages = [];
falling_objects_linkages[0] = "falling0";
falling_objects_linkages[1] = "falling1";
flying_points = 10;
flying_points_increase = 10;
falling_points = 20;
falling_points_increase = 10;
flying_falling_points = 30;
flying_falling_points_increase = 10;
special_points = 40;
special_points_increase = 10;
multiple_catch_factor = 1;
multiple_catch_factor_increase = 1;
next_level_points = 500;
initial_bubbles = 50;
initial_time = 120000 /* 0x01D4C0 */;
time_bonus = 10000;
time_bonus_increase = 2000;
time_bonus_points = 175;
time_bonus_points_increase = 25;
power_up_delay = 350;
time_power_up = 15000;
bubbles_power_up = 15;
flying_delay = 75;
flying_delay_change = -1;
falling_delay = 300;
falling_delay_change = -10;
special_delay = 400;
special_delay_change = -10;
flying_speed = 3;
flying_speed_deviation = 1;
flying_speed_increase = 0.5;
falling_speed = 2;
falling_deviation = 0.5;
falling_speed_increase = 0.5;
special_speed = 6;
special_speed_deviation = 0.5;
special_speed_increase = 0.5;
}
Frame 5
stop();
Symbol 30 MovieClip [bubble_maker] Frame 1
stop();
Symbol 158 MovieClip [flying0] Frame 1
stop();
Symbol 200 MovieClip [flying_quiz0] Frame 1
stop();
Symbol 219 MovieClip [flying4] Frame 1
stop();
Symbol 239 MovieClip [flying3] Frame 1
stop();
Symbol 266 MovieClip [flying2] Frame 1
stop();
Symbol 289 MovieClip [flying1] Frame 1
stop();
Symbol 323 MovieClip Frame 19
stop();
Symbol 324 MovieClip [special0] Frame 1
stop();
Symbol 327 MovieClip [score_display] Frame 1
play();
Symbol 327 MovieClip [score_display] Frame 30
this._unloadMovie();
Symbol 343 MovieClip Frame 1
stop();
Instance of Symbol 342 MovieClip "swfloader" in Symbol 343 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 370 Button
on (release) {
this.play();
}
Symbol 424 MovieClip Frame 1
stop();
Symbol 440 Button
on (press) {
_parent._parent.game.evaluate_answer(this);
}
Symbol 466 MovieClip Frame 1
stop();
Symbol 466 MovieClip Frame 20
stop();
Symbol 466 MovieClip Frame 79
_parent.game.answer_prompt_done();
this.gotoAndStop(1);
Symbol 466 MovieClip Frame 138
_parent.game.answer_prompt_done();
this.gotoAndStop(1);
Symbol 484 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 72
_parent.game.paused = false;
Symbol 485 MovieClip Frame 1
Math.formatMillisecondTime = function (ms) {
var _local1 = Math.floor(ms / 1000);
var _local2 = Math.floor(_local1 / 60);
_local1 = _local1 % 60;
if (_local1 < 10) {
_local1 = "0" + _local1;
}
return((_local2 + ":") + _local1);
};
Math.oscillate = function (a, b, t) {
return(a + ((b - a) * Math.abs(Math.sin(t))));
};
Math.sign = function (a) {
var _local1 = a;
if (_local1 != 0) {
return(Math.abs(_local1) / _local1);
}
return(0);
};
Math.randi = function (a, b) {
return(Math.floor(Math.random() * (b - a)) + Math.floor(a));
};
Math.randf = function (a, b) {
return((Math.random() * (b - a)) + a);
};
Math.randa = function () {
return(arguments.rande());
};
Array.prototype.swap = function (a, b) {
var _local1 = this;
var _local2 = a;
var temp = _local1[_local2];
_local1[_local2] = _local1[b];
_local1[b] = _local1[_local2];
};
Array.prototype.shuffle = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.length) {
_local2.swap(_local1, Math.randi(_local2.length));
_local1++;
}
};
Array.prototype.rande = function () {
return(this[Math.randi(0, this.length)]);
};
MovieClip.prototype._unloadMovie = function () {
var _local1 = this;
_local1._x = -1000;
_local1._y = -1000;
_local1._visible = false;
_local1.removeMovieClip();
};
BeeGame = function () {
var _local1 = this;
if (_local1.quiz_data_file == "") {
_local1.initialize();
} else {
_local1.load_quiz_data();
}
};
BeeGame.prototype.quiz_data_file = quiz_data_file;
BeeGame.prototype.quiz_object_probability = Number(quiz_object_probability);
BeeGame.prototype.shuffle_questions = shuffle_questions;
BeeGame.prototype.correct_points = Number(correct_points);
BeeGame.prototype.incorrect_points = Number(incorrect_points);
BeeGame.prototype.stage_width = Number(stage_width);
BeeGame.prototype.stage_height = Number(stage_height);
BeeGame.prototype.show_mouse = show_mouse;
BeeGame.prototype.minimum_bubble_size = Number(minimum_bubble_size);
BeeGame.prototype.flying_objects_linkages = flying_objects_linkages;
BeeGame.prototype.flying_quiz_objects_linkages = flying_quiz_objects_linkages;
BeeGame.prototype.special_objects_linkages = special_objects_linkages;
BeeGame.prototype.falling_objects_linkages = falling_objects_linkages;
BeeGame.prototype.flying_points = Number(flying_points);
BeeGame.prototype.flying_points_increase = Number(flying_points_increase);
BeeGame.prototype.falling_points = Number(falling_points);
BeeGame.prototype.falling_points_increase = Number(falling_points_increase);
BeeGame.prototype.flying_falling_points = Number(flying_falling_points);
BeeGame.prototype.flying_falling_points_increase = Number(flying_falling_points_increase);
BeeGame.prototype.special_points = Number(special_points);
BeeGame.prototype.special_points_increase = Number(special_points_increase);
BeeGame.prototype.multiple_catch_factor = Number(multiple_catch_factor);
BeeGame.prototype.multiple_catch_factor_increase = Number(multiple_catch_factor_increase);
BeeGame.prototype.next_level_points = Number(next_level_points);
BeeGame.prototype.initial_bubbles = Number(initial_bubbles);
BeeGame.prototype.initial_time = Number(initial_time);
BeeGame.prototype.time_bonus = Number(time_bonus);
BeeGame.prototype.time_bonus_increase = Number(time_bonus_increase);
BeeGame.prototype.time_bonus_points = Number(time_bonus_points);
BeeGame.prototype.time_bonus_points_increase = Number(time_bonus_points_increase);
BeeGame.prototype.power_up_delay = Number(power_up_delay);
BeeGame.prototype.time_power_up = Number(time_power_up);
BeeGame.prototype.bubbles_power_up = Number(bubbles_power_up);
BeeGame.prototype.flying_delay = Number(flying_delay);
BeeGame.prototype.flying_delay_change = Number(flying_delay_change);
BeeGame.prototype.falling_delay = Number(falling_delay);
BeeGame.prototype.falling_delay_change = Number(falling_delay_change);
BeeGame.prototype.special_delay = Number(special_delay);
BeeGame.prototype.special_delay_change = Number(special_delay_change);
BeeGame.prototype.flying_speed = Number(flying_speed);
BeeGame.prototype.flying_speed_deviation = Number(flying_speed_deviation);
BeeGame.prototype.flying_speed_increase = Number(flying_speed_increase);
BeeGame.prototype.falling_speed = Number(falling_speed);
BeeGame.prototype.falling_speed_deviation = Number(falling_speed_deviation);
BeeGame.prototype.falling_speed_increase = Number(falling_speed_increase);
BeeGame.prototype.special_speed = Number(special_speed);
BeeGame.prototype.special_speed_deviation = Number(special_speed_deviation);
BeeGame.prototype.special_speed_increase = Number(special_speed_increase);
BeeGame.prototype.timeline = this;
BeeGame.prototype.load_quiz_data = function () {
var _local1 = this;
_local1.num_bubbles_left = _local1.initial_bubbles;
_local1.timeline.controller.loadVariables(_local1.quiz_data_file);
};
BeeGame.prototype.initialize = function () {
var _local1 = this;
_local1.initialize_variables();
_local1.initialize_graphics();
_local1.initialize_level();
};
BeeGame.prototype.initialize_variables = function () {
var _local1 = this;
_local1.depth = 0;
_local1.current_level = 0;
_local1.current_frame = 0;
_local1.score = 0;
_local1.start_time = getTimer();
_local1.paused = false;
_local1.num_bubbles_left = _local1.initial_bubbles;
_local1.initial_liquid_height = _local1.timeline.bottle.liquid._height;
_local1.center_x = _local1.stage_width / 2;
_local1.center_y = _local1.stage_height / 2;
_local1.flying_objects = new Array();
_local1.falling_objects = new Array();
_local1.special_objects = new Array();
_local1.bubbles = new Array();
_local1.power_ups = new Array();
};
BeeGame.prototype.initialize_graphics = function () {
this.create_bubble_maker_graphics();
if (this.show_mouse == "False") {
Mouse.hide();
}
};
BeeGame.prototype.create_bubble_maker_graphics = function () {
var _local1 = this;
_local1.timeline.attachMovie("bubble_maker", "bubble_maker", _local1.depth++);
_local1.timeline.bubble_maker._x = _local1.stage_width / 2;
_local1.timeline.bubble_maker._y = _local1.stage_height / 2;
_local1.timeline.bubble_maker.startDrag(true);
};
BeeGame.prototype.initialize_level = function () {
var _local1 = this;
_local1.timeline.level_prompt.level = _local1.current_level + 1;
_local1.timeline.level_prompt.play();
_local1.timeline.backgrounds.gotoAndStop((_local1.current_level % _local1.timeline.backgrounds._totalframes) + 1);
_local1.starting_level_score = _local1.score;
};
BeeGame.prototype.action = function () {
var _local1 = this;
if (_local1.depth == undefined) {
} else {
_local1.update_properties();
_local1.render_bubble_maker();
_local1.check_add_flying_object();
_local1.check_add_falling_object();
_local1.check_add_special_object();
_local1.check_add_power_up();
_local1.move_all_flying_objects();
_local1.move_all_falling_objects();
_local1.move_all_special_objects();
_local1.move_all_bubbles();
_local1.move_all_power_ups();
}
};
BeeGame.prototype.update_properties = function () {
var _local1 = this;
var _local2 = _root;
_local1.old_mouse_x = _local1.mouse_x;
_local1.old_mouse_y = _local1.mouse_y;
_local1.mouse_x = _local2._xmouse;
_local1.mouse_y = _local2._ymouse;
_local1.current_frame++;
_local1.timeline.score = _local1.score;
_local2.score = _local1.score;
_local1.current_time = _local1.initial_time - (getTimer() - _local1.start_time);
_local1.timeline.time = Math.formatMillisecondTime(_local1.current_time);
_local1.timeline.bottle.liquid._height = (_local1.initial_liquid_height * _local1.num_bubbles_left) / _local1.initial_bubbles;
_local1.check_game_over();
};
BeeGame.prototype.render_bubble_maker = function () {
var _local1 = this;
if ((_local1.mouse_x - _local1.old_mouse_x) < 0) {
_local1.timeline.bubble_maker._xscale = 100;
} else if ((_local1.mouse_x - _local1.old_mouse_x) > 0) {
_local1.timeline.bubble_maker._xscale = -100;
}
if ((_local1.timeline.bubble_maker._currentframe == _local1.timeline.bubble_maker._totalframes) && (_local1.timeline.bubble_maker != undefined)) {
_local1.play_sound("bubble_pop");
_local1.timeline.bubble_maker.gotoAndStop(1);
}
};
BeeGame.prototype.check_add_flying_object = function () {
var _local1 = this;
var _local2 = _local1.flying_delay + (_local1.current_level * _local1.flying_delay_change);
if ((_local1.current_frame % _local2) == 0) {
_local1.create_flying_object();
}
};
BeeGame.prototype.check_add_falling_object = function () {
var _local1 = this;
var _local2 = _local1.falling_delay + (_local1.current_level * _local1.falling_delay_change);
if ((_local1.current_frame % _local2) == 0) {
_local1.create_falling_object();
}
};
BeeGame.prototype.check_add_special_object = function () {
var _local1 = this;
var _local2 = _local1.special_delay + (_local1.current_level * _local1.special_delay_change);
if ((_local1.current_frame % _local2) == 0) {
_local1.create_special_object();
}
};
BeeGame.prototype.create_flying_object = function (x, y) {
var _local1 = this;
if (Math.random() < _local1.quiz_object_probability) {
var linkage = _local1.flying_quiz_objects_linkages.rande();
var quiz_object = true;
} else {
var linkage = _local1.flying_objects_linkages.rande();
var quiz_object = false;
}
_local1.timeline.attachMovie(linkage, "flying" + _local1.depth, _local1.depth++);
var _local2 = _local1.timeline["flying" + _local1.depth];
_local2._x = 0;
_local2._y = Math.randf(_local1.center_y - (_local1.center_y / 2), _local1.center_y + (_local1.center_y / 2));
if (x != undefined) {
_local2._x = x;
}
if (y != undefined) {
_local2._y = y;
}
var _local3 = _local1.flying_speed + (_local1.current_level * _local1.flying_speed_increase);
_local2.speed = Math.randf(_local3 - _local1.flying_speed_deviation, _local3 + _local1.flying_speed_deviation);
_local2.current_angle = 0;
_local2.tween_angle = 0;
_local2.capturer_mc = undefined;
_local2.riding = false;
_local2.quiz = quiz_object;
_local1.flying_objects.push(_local2);
if (Math.random() < 0.1) {
_local1.create_flying_object(_local2._x, _local2._y);
}
};
BeeGame.prototype.create_falling_object = function () {
var _local1 = this;
var index = Math.randi(0, _local1.falling_objects_linkages.length);
_local1.timeline.attachMovie(_local1.falling_objects_linkages[index], "falling" + _local1.depth, _local1.depth++);
var _local2 = _local1.timeline["falling" + _local1.depth];
_local2._x = Math.randf(0, _local1.center_x / 2);
_local2._y = 0;
var _local3 = _local1.falling_speed + (_local1.current_level * _local1.falling_speed_increase);
_local2.speed = Math.randf(_local3 - _local1.falling_speed_deviation, _local3 + _local1.falling_speed_deviation);
_local2.current_angle = 0;
_local2.min_heading_range = Math.randf(-0.448798950512828, 0);
_local2.max_heading_range = Math.randf((Math.PI/4), (Math.PI/2));
_local2.oscillate_factor = Math.randf(0.0628318530717959, 0.0392699081698724);
_local2.index = index;
_local1.falling_objects.push(_local2);
};
BeeGame.prototype.create_special_object = function () {
var _local1 = this;
_local1.timeline.attachMovie(_local1.special_objects_linkages.rande(), "special" + _local1.depth, _local1.depth++);
var _local2 = _local1.timeline["special" + _local1.depth];
_local2._x = 0;
_local2._y = Math.randf(_local1.center_y - (_local1.center_y / 2), _local1.center_y + (_local1.center_y / 2));
var _local3 = _local1.special_speed + (_local1.current_level * _local1.special_speed_increase);
_local2.speed = Math.randf(_local3 - _local1.special_speed_deviation, _local3 + _local1.special_speed_deviation);
_local2.current_angle = 0;
_local2.tween_angle = 0;
_local2.parachute_x = Math.randf(_local1.center_x / 3, 3 * _local1.center_x);
_local2.parachuting = false;
_local2.capturer_mc = undefined;
_local1.special_objects.push(_local2);
};
BeeGame.prototype.check_add_power_up = function () {
var _local1 = this;
if ((_local1.current_frame % _local1.power_up_delay) == 0) {
_local1.create_power_up();
}
};
BeeGame.prototype.create_power_up = function () {
var _local1 = this;
var _local3 = Math.randa("bubbles_power_up", "clock_power_up");
if (_local3 == "clock_power_up") {
_local1.play_sound("clock_appear");
}
_local1.timeline.attachMovie(_local3, "power_up" + _local1.depth, _local1.depth++);
var _local2 = _local1.timeline["power_up" + _local1.depth];
var angle = Math.randf(-0.392699081698724, 0);
var speed = (_local1.special_speed + (_local1.current_level * _local1.special_speed_increase));
_local2.vel_x = speed * Math.cos(angle);
_local2.vel_y = speed * Math.sin(angle);
_local2.type = _local3;
_local2.capturer_mc = undefined;
_local1.power_ups.push(_local2);
};
BeeGame.prototype.move_all_flying_objects = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.flying_objects.length) {
_local2.move_flying_object(_local2.flying_objects[_local1], _local1);
_local1++;
}
};
BeeGame.prototype.move_flying_object = function (flying_mc, index) {
var _local1 = flying_mc;
var _local2 = this;
if (_local1.capturer_mc != undefined) {
_local1._x = _local1.capturer_mc._x;
_local1._y = _local1.capturer_mc._y;
} else if (_local1.riding) {
var _local3 = Math.oscillate(_local1.min_heading_range, _local1.max_heading_range, _local2.current_frame * _local1.oscillate_factor);
_local1.current_angle = _local1.current_angle + ((_local3 - _local1.current_angle) / 4);
_local1._x = _local1._x + (_local1.speed * Math.cos(_local1.current_angle));
_local1._y = _local1._y + (_local1.speed * Math.sin(_local1.current_angle));
} else {
_local1.current_angle = _local1.current_angle + ((_local1.tween_angle - _local1.current_angle) / 4);
if ((_local2.current_frame % 10) == 0) {
_local1.tween_angle = Math.randf(-0.523598775598299, 0.523598775598299);
}
_local1._x = _local1._x + (_local1.speed * Math.cos(_local1.current_angle));
_local1._y = _local1._y + (_local1.speed * Math.sin(_local1.current_angle));
}
if (_local1._x > _local2.stage_width) {
_local2.flying_objects.splice(index, 1);
_local1._unloadMovie();
} else {
_local2.check_flying_landed_falling(_local1);
}
};
BeeGame.prototype.check_flying_landed_falling = function (flying_mc) {
var _local1 = flying_mc;
var _local2 = 0;
while (_local2 < this.falling_objects.length) {
var _local3 = this.falling_objects[_local2];
if (_local3.hitTest(_local1._x, _local1._y, true)) {
_local1.gotoAndStop("Riding Falling Object " + _local3.index);
this.falling_objects.splice(_local2, 1);
_local3._unloadMovie();
_local1.riding = true;
_local1.current_angle = 0;
_local1.min_heading_range = Math.randf(-0.448798950512828, 0);
_local1.max_heading_range = Math.randf((Math.PI/4), (Math.PI/2));
_local1.oscillate_factor = Math.randf(0.0628318530717959, 0.0392699081698724);
_local1.speed = _local1.speed / 2;
}
_local2++;
}
};
BeeGame.prototype.move_all_falling_objects = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.falling_objects.length) {
_local2.move_falling_object(_local2.falling_objects[_local1], _local1);
_local1++;
}
};
BeeGame.prototype.move_falling_object = function (falling_mc, index) {
var _local1 = falling_mc;
var _local2 = this;
var _local3 = Math.oscillate(_local1.min_heading_range, _local1.max_heading_range, _local2.current_frame * _local1.oscillate_factor);
_local1.current_angle = _local1.current_angle + ((_local3 - _local1.current_angle) / 4);
_local1._x = _local1._x + (_local1.speed * Math.cos(_local1.current_angle));
_local1._y = _local1._y + (_local1.speed * Math.sin(_local1.current_angle));
if ((_local1._x > _local2.stage_width) && (_local1._y > _local2.stage_height)) {
_local2.falling_objects.splice(index, 1);
_local1._unloadMovie();
}
};
BeeGame.prototype.move_all_special_objects = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.special_objects.length) {
_local2.move_special_object(_local2.special_objects[_local1], _local1);
_local1++;
}
};
BeeGame.prototype.move_special_object = function (special_mc, index) {
var _local1 = special_mc;
var _local2 = this;
if (_local1.capturer_mc != undefined) {
_local1._x = _local1.capturer_mc._x;
_local1._y = _local1.capturer_mc._y;
} else if (_local1.parachuting) {
var _local3 = Math.oscillate(_local1.min_heading_range, _local1.max_heading_range, _local2.current_frame * _local1.oscillate_factor);
_local1.current_angle = _local1.current_angle + ((_local3 - _local1.current_angle) / 4);
_local1._x = _local1._x + (_local1.speed * Math.cos(_local1.current_angle));
_local1._y = _local1._y + (_local1.speed * Math.sin(_local1.current_angle));
} else {
_local1.current_angle = _local1.current_angle + ((_local1.tween_angle - _local1.current_angle) / 4);
if ((_local2.current_frame % 10) == 0) {
_local1.tween_angle = Math.randf(-0.523598775598299, 0.523598775598299);
}
_local1._x = _local1._x + (_local1.speed * Math.cos(_local1.current_angle));
_local1._y = _local1._y + (_local1.speed * Math.sin(_local1.current_angle));
if (_local1._x > _local1.parachute_x) {
_local1.parachuting = true;
_local1.gotoAndStop("Falling");
_local1.current_angle = 0;
_local1.min_heading_range = Math.randf(-0.448798950512828, 0);
_local1.max_heading_range = Math.randf((Math.PI/4), (Math.PI/2));
_local1.oscillate_factor = Math.randf(0.0628318530717959, 0.0392699081698724);
_local1.speed = _local1.speed / 2;
}
}
if ((_local1._x > _local2.stage_width) || (_local1._y > _local2.stage_height)) {
_local2.special_objects.splice(index, 1);
_local1._unloadMovie();
}
};
BeeGame.prototype.move_all_bubbles = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.bubbles.length) {
_local2.move_bubble(_local2.bubbles[_local1], _local1);
_local1++;
}
};
BeeGame.prototype.move_bubble = function (bubble_mc, index) {
var _local1 = bubble_mc;
var _local2 = this;
_local1.current_angle = _local1.current_angle + ((_local1.tween_angle - _local1.current_angle) / 4);
if ((_local2.current_frame % 10) == 0) {
_local1.tween_angle = Math.randf(-0.523598775598299, 0.523598775598299);
}
_local1._x = _local1._x + (_local1.speed * Math.cos(_local1.current_angle));
_local1._y = _local1._y + (_local1.speed * Math.sin(_local1.current_angle));
if (_local1._x > (_local2.stage_width + 100)) {
_local2.bubbles.splice(index, 1);
_local1._unloadMovie();
}
};
BeeGame.prototype.move_all_power_ups = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.power_ups.length) {
_local2.move_power_up(_local2.power_ups[_local1], _local1);
_local1++;
}
};
BeeGame.prototype.move_power_up = function (power_up_mc, index) {
var _local1 = power_up_mc;
var _local2 = this;
if (_local1.capturer_mc != undefined) {
_local1._x = _local1.capturer_mc._x;
_local1._y = _local1.capturer_mc._y;
} else {
_local1.vel_y = _local1.vel_y + 0.15;
_local1._x = _local1._x + _local1.vel_x;
_local1._y = _local1._y + _local1.vel_y;
}
if ((_local1._x > _local2.stage_width) || (_local1._y > _local2.stage_height)) {
_local2.power_ups.splice(index, 1);
_local1._unloadMovie();
}
};
BeeGame.prototype.mouse_down = function () {
this.timeline.bubble_maker.gotoAndPlay(1);
};
BeeGame.prototype.mouse_up = function () {
var _local1 = this;
if (_local1.timeline.bubble_maker._currentframe == 1) {
} else {
_local1.create_bubble();
_local1.timeline.bubble_maker.gotoAndStop(1);
}
};
BeeGame.prototype.create_bubble = function () {
var _local1 = this;
var _local3 = (100 * _local1.timeline.bubble_maker._currentframe) / _local1.timeline.bubble_maker._totalframes;
if (_local3 < _local1.minimum_bubble_size) {
_local1.play_sound("bubble_pop");
} else {
_local1.timeline.attachMovie("floating_bubble", "bubble" + _local1.depth, _local1.depth++);
var _local2 = _local1.timeline["bubble" + _local1.depth];
_local2._width = _local3;
_local2._height = _local3;
_local2._x = _local1.timeline.bubble_maker._x + ((Math.sign(_local1.timeline.bubble_maker._xscale) * _local3) / 2);
_local2._y = _local1.timeline.bubble_maker._y;
var temp_speed = (_local1.flying_speed + (_local1.current_level * _local1.flying_speed_increase));
_local2.speed = Math.randf(temp_speed - _local1.flying_speed_deviation, temp_speed + _local1.flying_speed_deviation);
_local2.current_angle = 0;
_local2.tween_angle = 0;
_local1.bubbles.push(_local2);
_local1.num_bubbles_left--;
_local1.check_bubble_captures(_local2);
}
};
BeeGame.prototype.check_bubble_captures = function (bubble_mc) {
var _local1 = this;
var _local2 = bubble_mc;
_local1.caught_quiz_object = false;
var num_flying = _local1.check_flying_captures(_local2);
var num_flying_falling = _local1.check_flying_falling_captures(_local2);
var num_special = _local1.check_special_captures(_local2);
var num_power_ups = _local1.check_power_up_captures(_local2);
var flying_score = (num_flying * (_local1.flying_points + (_local1.current_level * _local1.flying_points_increase)));
var flying_falling_score = (num_flying_falling * (_local1.flying_falling_points + (_local1.current_level * _local1.flying_falling_points_increase)));
var special_score = (num_special * (_local1.special_points + (_local1.current_level * _local1.special_points_increase)));
var points = ((((flying_score + flying_falling_score) + special_score) * _local1.multiple_catch_factor) * ((num_flying + num_flying_falling) + num_special));
_local1.score = _local1.score + points;
if (points > 0) {
_local1.timeline.attachMovie("score_display", "score" + _local1.depth, _local1.depth++);
var _local3 = _local1.timeline["score" + _local1.depth];
_local3.points = points;
_local3._x = _local2._x;
_local3._y = _local2._y;
}
var n = ((num_flying + num_flying_falling) + num_special);
if (n == 1) {
_local1.play_sound("capture");
} else if (n > 0) {
_local1.play_sound("special_capture");
}
if (_local1.score > (_local1.starting_level_score + _local1.next_level_points)) {
_local1.current_level++;
_local1.initialize_level();
}
if (_local1.score > ((_local1.last_time_bonus_score + _local1.time_bonus_points) + (_local1.current_level * _local1.time_bonus_points_increase))) {
_local1.start_time = _local1.start_time + (_local1.time_bonus + (_local1.current_level * _local1.time_bonus_increase));
_local1.last_time_bonus_score = _local1.score;
_local1.timeline.attachMovie("score_display", "bonus" + _local1.depth, _local1.depth++);
var bonus_mc = _local1.timeline["bonus" + _local1.depth];
bonus_mc.points = "Time Bonus!";
bonus_mc._x = _local2._x;
bonus_mc._y = _local2._y - 20;
}
if (_local1.caught_quiz_object) {
_local1.paused = true;
_local1.create_quiz();
}
};
BeeGame.prototype.create_quiz = function () {
var _local3 = this;
_local3.quiz_start_time = getTimer();
_local3.timeline.quiz_prompt.play();
var question = _local3.questions.shift();
_local3.questions.push(question);
_local3.timeline.quiz_prompt.question = question.text;
var _local1 = 0;
while (_local1 < _local3.num_choices_per_question) {
var _local2 = _local3.timeline.quiz_prompt["choice" + _local1];
_local2.index = String.fromCharCode(_local1 + 65);
_local2.field = question.choices[_local1];
_local2.correct = _local1 == question.answer;
_local1++;
}
};
BeeGame.prototype.evaluate_answer = function (choice_mc) {
if (choice_mc.correct) {
this.correct_answer();
} else {
this.incorrect_answer();
}
};
BeeGame.prototype.correct_answer = function () {
var _local1 = this;
_local1.score = _local1.score + _local1.correct_points;
_local1.timeline.quiz_prompt.gotoAndPlay("Correct");
};
BeeGame.prototype.incorrect_answer = function () {
var _local1 = this;
_local1.score = _local1.score + _local1.incorrect_points;
_local1.timeline.quiz_prompt.gotoAndPlay("Incorrect");
};
BeeGame.prototype.answer_prompt_done = function () {
var _local1 = this;
_local1.start_time = _local1.start_time + (getTimer() - _local1.quiz_start_time);
_local1.paused = false;
};
BeeGame.prototype.check_flying_captures = function (bubble_mc) {
var _local3 = this;
var num = 0;
var _local2 = 0;
while (_local2 < _local3.flying_objects.length) {
var _local1 = _local3.flying_objects[_local2];
if ((!_local1.riding) && (bubble_mc.hitTest(_local1._x, _local1._y, true))) {
if (_local1.capturer_mc == undefined) {
num++;
_local1.capturer_mc = bubble_mc;
if (_local1.quiz) {
_local3.caught_quiz_object = true;
num--;
}
}
}
_local2++;
}
return(num);
};
BeeGame.prototype.check_flying_falling_captures = function (bubble_mc) {
var _local3 = this;
var num = 0;
var _local2 = 0;
while (_local2 < _local3.flying_objects.length) {
var _local1 = _local3.flying_objects[_local2];
if (_local1.riding && (bubble_mc.hitTest(_local1._x, _local1._y, true))) {
if (_local1.capturer_mc == undefined) {
num++;
_local1.capturer_mc = bubble_mc;
if (_local1.quiz) {
_local3.caught_quiz_object = true;
num--;
}
}
}
_local2++;
}
return(num);
};
BeeGame.prototype.check_special_captures = function (bubble_mc) {
var _local3 = bubble_mc;
var num = 0;
var _local2 = 0;
while (_local2 < this.special_objects.length) {
var _local1 = this.special_objects[_local2];
if (_local3.hitTest(_local1._x, _local1._y, true)) {
if (_local1.capturer_mc == undefined) {
num++;
_local1.capturer_mc = _local3;
}
}
_local2++;
}
return(num);
};
BeeGame.prototype.check_power_up_captures = function (bubble_mc) {
var _local1 = this;
var num = 0;
var j = 0;
while (j < _local1.power_ups.length) {
var _local2 = _local1.power_ups[j];
if (bubble_mc.hitTest(_local2._x, _local2._y, true)) {
if (_local2.capturer_mc == undefined) {
num++;
_local2.capturer_mc = bubble_mc;
if (_local2.type == "bubbles_power_up") {
_local1.num_bubbles_left = Math.min(_local1.num_bubbles_left + _local1.bubbles_power_up, _local1.initial_bubbles);
} else if (_local2.type == "clock_power_up") {
_local1.start_time = _local1.start_time + _local1.time_power_up;
_local1.timeline.attachMovie("score_display", "bonus" + _local1.depth, _local1.depth++);
var _local3 = _local1.timeline["bonus" + _local1.depth];
_local3.points = "Time Bonus!";
_local3._x = bubble_mc._x;
_local3._y = bubble_mc._y - 20;
}
}
}
j++;
}
};
BeeGame.prototype.check_game_over = function () {
var _local1 = this;
if ((_local1.current_time <= 0) || (_local1.num_bubbles_left <= 0)) {
_local1.game_over();
}
};
BeeGame.prototype.game_over = function () {
Mouse.show();
_root.gotoAndStop("Game Over");
};
BeeGame.prototype.play_sound = function (linkage) {
var _local1 = new Sound();
_local1.attachSound(linkage);
_local1.start(0, 1);
};
this._x = 0;
this._y = 0;
game = new BeeGame();
_root._quality = "MEDIUM";
Instance of Symbol 375 MovieClip "controller" in Symbol 485 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (data) {
_parent.game.num_choices_per_question = Number(num_choices_per_question);
_parent.game.questions = new Array();
var j = 0;
while (j >= 0) {
if (this[("question" + j) + "_text"] == undefined) {
break;
}
_parent.game.questions[j] = new Object();
_parent.game.questions[j].text = this[("question" + j) + "_text"];
_parent.game.questions[j].answer = Number(this[("question" + j) + "_answer"]);
_parent.game.questions[j].choices = new Array();
var k = 0;
while (k < _parent.game.num_choices_per_question) {
_parent.game.questions[j].choices[k] = this[(("question" + j) + "_choice") + k];
k++;
}
j++;
}
if (_parent.game.shuffle_questions == "True") {
_parent.game.questions.shuffle();
}
_parent.game.initialize();
}
onClipEvent (mouseDown) {
if (!_parent.game.paused) {
_parent.game.mouse_down();
}
}
onClipEvent (mouseUp) {
if (!_parent.game.paused) {
_parent.game.mouse_up();
}
}
onClipEvent (enterFrame) {
if (!_parent.game.paused) {
_parent.game.action();
}
}
Instance of Symbol 466 MovieClip "quiz_prompt" in Symbol 485 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(16005);
}
Instance of Symbol 484 MovieClip "level_prompt" in Symbol 485 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(16001);
}
Symbol 488 Button
on (release) {
getURL ("http://www.playgames.to", "_blank");
}
Symbol 493 Button
on (press) {
_root.gotoAndStop("Starting Screen");
}