Instance of Symbol 601 MovieClip in Frame 1
onClipEvent (load) {
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 182
stop();
Frame 183
stop();
Instance of Symbol 803 MovieClip in Frame 183
onClipEvent (load) {
grid_x = 355;
grid_y = 200;
grid_dim_x = 5;
grid_dim_y = 5;
piece_dim_x = 75;
piece_dim_y = 75;
piece_space_x = 1;
piece_space_y = 1;
num_levels = 1;
level_transition_mc = "level_transition";
background_mc = "background";
graphics_linkage = [];
graphics_linkage[0] = "art1";
graphics_linkage[1] = "art2";
graphics_linkage[2] = "art3";
graphics_linkage[3] = "art4";
graphics_linkage[4] = "art5";
graphics_linkage[5] = "art6";
graphics_linkage[6] = "art7";
graphics_linkage[7] = "art8";
graphics_linkage[8] = "art9";
graphics_linkage[9] = "art10";
graphics_linkage[10] = "art11";
graphics_linkage[11] = "art12";
unturned_graphic_linkage = "back";
special_graphic_linkage = "special_graphic";
timer_limit = 350;
timer_variable = "timer_var";
guess_limit = 50;
guess_count_variable = "guess_count_var";
pair_find_outcome = "Pair Disappears";
loader_mc = "loader";
external_animation_mc = "external_animation";
num_positive_frames = 1;
num_negative_frames = 1;
click_sound = [];
click_sound[0] = "click_sound";
correct_sound = [];
correct_sound[0] = "good1";
correct_sound[1] = "good2";
correct_sound[2] = "good3";
correct_sound[3] = "good4";
correct_sound[4] = "good5";
incorrect_sound = [];
incorrect_sound[0] = "bad1";
incorrect_sound[1] = "bad2";
incorrect_sound[2] = "bad3";
incorrect_sound[3] = "bad4";
incorrect_sound[4] = "bad5";
special_card_sound = [];
special_card_sound[0] = "special_card_sound";
score_variable = "score_var";
score_factor = 100;
match_score = 5;
use_rebus = "True";
correct_rebus = 100;
incorrect_rebus = -10;
correct_rebus_handle = "Finish Puzzle";
correct_rebus_handler_val = "item 1";
incorrect_rebus_val = -10;
correct_rebus_val = 250;
use_rebus_val = "True";
match_score_val = 10;
score_factor_val = 100;
score_variable_val = "score_var";
num_negative_frames_val = 1;
num_positive_frames_val = 1;
external_animation_mc_val = "external_animation";
loader_mc_val = "loader";
pair_find_outcome_val = "Pair Disappears";
guess_count_variable_val = "guess_count_var";
guess_limit_val = 50;
timer_variable_val = "timer_var";
timer_limit_val = 350;
special_graphic_linkage_val = "special_graphic";
unturned_graphic_linkage_val = "back";
graphics_linkage_label = "art1|art2|art3|art4|art5|art6|art7|art8|art9|art10|art11|art12|art13|art14|art16|art17|art18";
graphics_linkage_load_type = "Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL";
graphics_linkage_load_url = "http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://";
graphics_linkage_load_target = "_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank";
graphics_linkage_swf_type = "Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level";
graphics_linkage_swf_level = "1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1";
graphics_linkage_swf_mc = "_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content";
graphics_linkage_simple = "||||||||||||||||";
background_mc_val = "background";
level_transition_mc_val = "level_transition";
num_levels_val = 3;
piece_space_y_val = 0;
piece_space_x_val = 0;
piece_dim_y_val = 75;
piece_dim_x_val = 75;
grid_dim_y_val = 5;
grid_dim_x_val = 5;
grid_y_val = 200;
grid_x_val = 355;
incorrect_sound_label = "bad50";
incorrect_sound_load_type = "Load URL";
incorrect_sound_load_url = "http://";
incorrect_sound_load_target = "_blank";
incorrect_sound_swf_type = "Level";
incorrect_sound_swf_level = 1;
incorrect_sound_swf_mc = "_root.content";
incorrect_sound_simple = "";
correct_sound_label = "good50";
correct_sound_load_type = "Load URL";
correct_sound_load_url = "http://";
correct_sound_load_target = "_blank";
correct_sound_swf_type = "Level";
correct_sound_swf_level = 1;
correct_sound_swf_mc = "_root.content";
correct_sound_simple = "";
special_card_sound_label = "special_card_sound";
special_card_sound_load_type = "Load URL";
special_card_sound_load_url = "http://";
special_card_sound_load_target = "_blank";
special_card_sound_swf_type = "Level";
special_card_sound_swf_level = 1;
special_card_sound_swf_mc = "_root.content";
special_card_sound_simple = "";
}
Frame 185
stop();
Instance of Symbol 803 MovieClip in Frame 185
onClipEvent (load) {
grid_x = 355;
grid_y = 200;
grid_dim_x = 5;
grid_dim_y = 5;
piece_dim_x = 75;
piece_dim_y = 75;
piece_space_x = 1;
piece_space_y = 1;
num_levels = 1;
level_transition_mc = "level_transition";
background_mc = "background";
graphics_linkage = [];
graphics_linkage[0] = "art1";
graphics_linkage[1] = "art2";
graphics_linkage[2] = "art3";
graphics_linkage[3] = "art4";
graphics_linkage[4] = "art5";
graphics_linkage[5] = "art6";
graphics_linkage[6] = "art7";
graphics_linkage[7] = "art8";
graphics_linkage[8] = "art9";
graphics_linkage[9] = "art10";
graphics_linkage[10] = "art11";
graphics_linkage[11] = "art12";
unturned_graphic_linkage = "back";
special_graphic_linkage = "special_graphic";
timer_limit = 350;
timer_variable = "timer_var";
guess_limit = 50;
guess_count_variable = "guess_count_var";
pair_find_outcome = "Pair Disappears";
loader_mc = "loader";
external_animation_mc = "external_animation";
num_positive_frames = 1;
num_negative_frames = 1;
click_sound = [];
click_sound[0] = "click_sound";
correct_sound = [];
correct_sound[0] = "good1";
correct_sound[1] = "good2";
correct_sound[2] = "good3";
correct_sound[3] = "good4";
correct_sound[4] = "good5";
incorrect_sound = [];
incorrect_sound[0] = "bad1";
incorrect_sound[1] = "bad2";
incorrect_sound[2] = "bad3";
incorrect_sound[3] = "bad4";
incorrect_sound[4] = "bad5";
special_card_sound = [];
special_card_sound[0] = "special_card_sound";
score_variable = "score_var";
score_factor = 100;
match_score = 5;
use_rebus = "True";
correct_rebus = 100;
incorrect_rebus = -10;
correct_rebus_handle = "Finish Puzzle";
correct_rebus_handler_val = "item 1";
incorrect_rebus_val = -10;
correct_rebus_val = 250;
use_rebus_val = "True";
match_score_val = 10;
score_factor_val = 100;
score_variable_val = "score_var";
num_negative_frames_val = 1;
num_positive_frames_val = 1;
external_animation_mc_val = "external_animation";
loader_mc_val = "loader";
pair_find_outcome_val = "Pair Disappears";
guess_count_variable_val = "guess_count_var";
guess_limit_val = 40;
timer_variable_val = "timer_var";
timer_limit_val = 350;
special_graphic_linkage_val = "special_graphic";
unturned_graphic_linkage_val = "back";
graphics_linkage_label = "art1|art2|art3|art4|art5|art6|art7|art8|art9|art10|art11|art12|art13|art14|art16|art17|art18";
graphics_linkage_load_type = "Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL";
graphics_linkage_load_url = "http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://";
graphics_linkage_load_target = "_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank";
graphics_linkage_swf_type = "Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level";
graphics_linkage_swf_level = "1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1";
graphics_linkage_swf_mc = "_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content";
graphics_linkage_simple = "||||||||||||||||";
background_mc_val = "background";
level_transition_mc_val = "level_transition";
num_levels_val = 3;
piece_space_y_val = 0;
piece_space_x_val = 0;
piece_dim_y_val = 75;
piece_dim_x_val = 75;
grid_dim_y_val = 5;
grid_dim_x_val = 5;
grid_y_val = 200;
grid_x_val = 355;
incorrect_sound_label = "bad50";
incorrect_sound_load_type = "Load URL";
incorrect_sound_load_url = "http://";
incorrect_sound_load_target = "_blank";
incorrect_sound_swf_type = "Level";
incorrect_sound_swf_level = 1;
incorrect_sound_swf_mc = "_root.content";
incorrect_sound_simple = "";
correct_sound_label = "good50";
correct_sound_load_type = "Load URL";
correct_sound_load_url = "http://";
correct_sound_load_target = "_blank";
correct_sound_swf_type = "Level";
correct_sound_swf_level = 1;
correct_sound_swf_mc = "_root.content";
correct_sound_simple = "";
special_card_sound_label = "special_card_sound";
special_card_sound_load_type = "Load URL";
special_card_sound_load_url = "http://";
special_card_sound_load_target = "_blank";
special_card_sound_swf_type = "Level";
special_card_sound_swf_level = 1;
special_card_sound_swf_mc = "_root.content";
special_card_sound_simple = "";
}
Frame 187
stop();
Instance of Symbol 803 MovieClip in Frame 187
onClipEvent (load) {
grid_x = 355;
grid_y = 200;
grid_dim_x = 5;
grid_dim_y = 5;
piece_dim_x = 75;
piece_dim_y = 75;
piece_space_x = 1;
piece_space_y = 1;
num_levels = 1;
level_transition_mc = "level_transition";
background_mc = "background";
graphics_linkage = [];
graphics_linkage[0] = "art1";
graphics_linkage[1] = "art2";
graphics_linkage[2] = "art3";
graphics_linkage[3] = "art4";
graphics_linkage[4] = "art5";
graphics_linkage[5] = "art6";
graphics_linkage[6] = "art7";
graphics_linkage[7] = "art8";
graphics_linkage[8] = "art9";
graphics_linkage[9] = "art10";
graphics_linkage[10] = "art11";
graphics_linkage[11] = "art12";
unturned_graphic_linkage = "back";
special_graphic_linkage = "special_graphic";
timer_limit = 350;
timer_variable = "timer_var";
guess_limit = 50;
guess_count_variable = "guess_count_var";
pair_find_outcome = "Pair Disappears";
loader_mc = "loader";
external_animation_mc = "external_animation";
num_positive_frames = 1;
num_negative_frames = 1;
click_sound = [];
click_sound[0] = "click_sound";
correct_sound = [];
correct_sound[0] = "good1";
correct_sound[1] = "good2";
correct_sound[2] = "good3";
correct_sound[3] = "good4";
correct_sound[4] = "good5";
incorrect_sound = [];
incorrect_sound[0] = "bad1";
incorrect_sound[1] = "bad2";
incorrect_sound[2] = "bad3";
incorrect_sound[3] = "bad4";
incorrect_sound[4] = "bad5";
special_card_sound = [];
special_card_sound[0] = "special_card_sound";
score_variable = "score_var";
score_factor = 100;
match_score = 5;
use_rebus = "True";
correct_rebus = 100;
incorrect_rebus = -10;
correct_rebus_handle = "Finish Puzzle";
correct_rebus_handler_val = "item 1";
incorrect_rebus_val = -10;
correct_rebus_val = 250;
use_rebus_val = "True";
match_score_val = 10;
score_factor_val = 100;
score_variable_val = "score_var";
num_negative_frames_val = 1;
num_positive_frames_val = 1;
external_animation_mc_val = "external_animation";
loader_mc_val = "loader";
pair_find_outcome_val = "Pair Disappears";
guess_count_variable_val = "guess_count_var";
guess_limit_val = 35;
timer_variable_val = "timer_var";
timer_limit_val = 350;
special_graphic_linkage_val = "special_graphic";
unturned_graphic_linkage_val = "back";
graphics_linkage_label = "art1|art2|art3|art4|art5|art6|art7|art8|art9|art10|art11|art12|art13|art14|art16|art17|art18";
graphics_linkage_load_type = "Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL";
graphics_linkage_load_url = "http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://|http://";
graphics_linkage_load_target = "_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank";
graphics_linkage_swf_type = "Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level|Level";
graphics_linkage_swf_level = "1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1";
graphics_linkage_swf_mc = "_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content";
graphics_linkage_simple = "||||||||||||||||";
background_mc_val = "background";
level_transition_mc_val = "level_transition";
num_levels_val = 3;
piece_space_y_val = 0;
piece_space_x_val = 0;
piece_dim_y_val = 75;
piece_dim_x_val = 75;
grid_dim_y_val = 5;
grid_dim_x_val = 5;
grid_y_val = 200;
grid_x_val = 355;
incorrect_sound_label = "bad50";
incorrect_sound_load_type = "Load URL";
incorrect_sound_load_url = "http://";
incorrect_sound_load_target = "_blank";
incorrect_sound_swf_type = "Level";
incorrect_sound_swf_level = 1;
incorrect_sound_swf_mc = "_root.content";
incorrect_sound_simple = "";
correct_sound_label = "good50";
correct_sound_load_type = "Load URL";
correct_sound_load_url = "http://";
correct_sound_load_target = "_blank";
correct_sound_swf_type = "Level";
correct_sound_swf_level = 1;
correct_sound_swf_mc = "_root.content";
correct_sound_simple = "";
special_card_sound_label = "special_card_sound";
special_card_sound_load_type = "Load URL";
special_card_sound_load_url = "http://";
special_card_sound_load_target = "_blank";
special_card_sound_swf_type = "Level";
special_card_sound_swf_level = 1;
special_card_sound_swf_mc = "_root.content";
special_card_sound_simple = "";
}
Frame 188
stop();
Object.prototype.CONCENTRATION_CURRENT_LEVEL = 0;
Frame 189
stop();
Object.prototype.CONCENTRATION_CURRENT_LEVEL = 0;
Symbol 12 MovieClip Frame 1
this.stop();
Symbol 12 MovieClip Frame 20
this.stop();
Symbol 13 MovieClip [image1] Frame 1
this.stop();
Symbol 27 MovieClip Frame 49
stop();
Symbol 28 MovieClip Frame 1
this.stop();
Symbol 28 MovieClip Frame 2
this.stop();
Symbol 29 MovieClip [special_graphic] Frame 1
this.stop();
Symbol 30 MovieClip Frame 1
this.stop();
Symbol 30 MovieClip Frame 20
this.stop();
Symbol 31 MovieClip [image3] Frame 1
this.stop();
Symbol 32 MovieClip Frame 1
this.stop();
Symbol 32 MovieClip Frame 20
this.stop();
Symbol 33 MovieClip [image2] Frame 1
this.stop();
Symbol 34 MovieClip Frame 1
this.stop();
Symbol 34 MovieClip Frame 20
this.stop();
Symbol 35 MovieClip [image0] Frame 1
this.stop();
Symbol 46 MovieClip [level_transition] Frame 30
stop();
Symbol 84 MovieClip Frame 49
stop();
Symbol 85 MovieClip Frame 1
this.stop();
Symbol 85 MovieClip Frame 2
this.stop();
Symbol 86 MovieClip [art13] Frame 1
this.stop();
Symbol 99 MovieClip Frame 48
stop();
Symbol 100 MovieClip Frame 1
this.stop();
Symbol 100 MovieClip Frame 2
this.stop();
Symbol 101 MovieClip [art1] Frame 1
this.stop();
Symbol 143 MovieClip Frame 49
stop();
Symbol 144 MovieClip Frame 1
this.stop();
Symbol 144 MovieClip Frame 2
this.stop();
Symbol 157 MovieClip Frame 49
stop();
Symbol 158 MovieClip Frame 1
this.stop();
Symbol 158 MovieClip Frame 2
this.stop();
Symbol 159 MovieClip [art14] Frame 1
this.stop();
Symbol 160 MovieClip [art2] Frame 1
this.stop();
Symbol 188 MovieClip Frame 49
stop();
Symbol 189 MovieClip Frame 1
this.stop();
Symbol 189 MovieClip Frame 2
this.stop();
Symbol 203 MovieClip Frame 46
stop();
Symbol 204 MovieClip Frame 1
this.stop();
Symbol 204 MovieClip Frame 2
this.stop();
Symbol 205 MovieClip [art15] Frame 1
this.stop();
Symbol 206 MovieClip [art3] Frame 1
this.stop();
Symbol 236 MovieClip Frame 49
stop();
Symbol 237 MovieClip Frame 1
this.stop();
Symbol 237 MovieClip Frame 2
this.stop();
Symbol 238 MovieClip [art16] Frame 1
this.stop();
Symbol 250 MovieClip Frame 50
stop();
Symbol 251 MovieClip Frame 1
this.stop();
Symbol 251 MovieClip Frame 2
this.stop();
Symbol 252 MovieClip [art4] Frame 1
this.stop();
Symbol 283 MovieClip Frame 49
stop();
Symbol 284 MovieClip Frame 1
this.stop();
Symbol 284 MovieClip Frame 2
this.stop();
Symbol 285 MovieClip [art17] Frame 1
this.stop();
Symbol 297 MovieClip Frame 49
stop();
Symbol 298 MovieClip Frame 1
this.stop();
Symbol 298 MovieClip Frame 2
this.stop();
Symbol 299 MovieClip [art5] Frame 1
this.stop();
Symbol 328 MovieClip Frame 49
stop();
Symbol 329 MovieClip Frame 1
this.stop();
Symbol 329 MovieClip Frame 2
this.stop();
Symbol 330 MovieClip [art12] Frame 1
this.stop();
Symbol 374 MovieClip Frame 49
stop();
Symbol 375 MovieClip Frame 1
this.stop();
Symbol 375 MovieClip Frame 2
this.stop();
Symbol 376 MovieClip [art11] Frame 1
this.stop();
Symbol 416 MovieClip Frame 54
stop();
Symbol 417 MovieClip Frame 1
this.stop();
Symbol 417 MovieClip Frame 2
this.stop();
Symbol 418 MovieClip [art10] Frame 1
this.stop();
Symbol 432 MovieClip Frame 49
stop();
Symbol 433 MovieClip Frame 1
this.stop();
Symbol 433 MovieClip Frame 2
this.stop();
Symbol 434 MovieClip [art9] Frame 1
this.stop();
Symbol 456 MovieClip Frame 49
stop();
Symbol 457 MovieClip Frame 1
this.stop();
Symbol 457 MovieClip Frame 2
this.stop();
Symbol 458 MovieClip [art8] Frame 1
this.stop();
Symbol 494 MovieClip Frame 49
stop();
Symbol 496 MovieClip Frame 49
stop();
Symbol 497 MovieClip Frame 1
this.stop();
Symbol 497 MovieClip Frame 2
this.stop();
Symbol 506 MovieClip Frame 49
stop();
Symbol 507 MovieClip Frame 1
this.stop();
Symbol 507 MovieClip Frame 2
this.stop();
Symbol 508 MovieClip [art19] Frame 1
this.stop();
Symbol 509 MovieClip [art7] Frame 1
this.stop();
Symbol 546 MovieClip Frame 49
stop();
Symbol 547 MovieClip Frame 1
this.stop();
Symbol 547 MovieClip Frame 2
this.stop();
Symbol 548 MovieClip [art18] Frame 1
this.stop();
Symbol 559 MovieClip Frame 49
stop();
Symbol 560 MovieClip Frame 1
this.stop();
Symbol 560 MovieClip Frame 2
this.stop();
Symbol 561 MovieClip [art6] Frame 1
this.stop();
Symbol 582 MovieClip [rebus_puzzles] Frame 1
stop();
Symbol 582 MovieClip [rebus_puzzles] Frame 2
answer = "COACH POTATO";
hint = "Sofa Spud";
Symbol 582 MovieClip [rebus_puzzles] Frame 3
answer = "PARTY ANIMAL";
hint = "Celebration Creature";
Symbol 582 MovieClip [rebus_puzzles] Frame 4
answer = "TAKE A HIKE";
hint = "Steal A Stroll";
Symbol 582 MovieClip [rebus_puzzles] Frame 5
answer = "SITTING DUCK";
hint = "Reclining Waterfowl";
Symbol 582 MovieClip [rebus_puzzles] Frame 6
answer = "BLUEBERRY PIE";
hint = "Sad Pastry";
Symbol 582 MovieClip [rebus_puzzles] Frame 7
answer = "KNUCKLE SANDWHICH";
hint = "Fist Food";
Symbol 582 MovieClip [rebus_puzzles] Frame 8
answer = "LOVE HANDLES";
hint = "Fond Fingers";
Symbol 601 MovieClip Frame 1
stop();
Instance of Symbol 600 MovieClip "swfloader" in Symbol 601 MovieClip Frame 1
onClipEvent (load) {
function strip_spaces(str) {
var _str = new String("");
var j = 0;
while (j < str.length) {
if ((str.charAt(j) != " ") && (str.charAt(j) != ";")) {
_str = _str + str.charAt(j);
}
j++;
}
return(_str);
}
function simple_script(action, timeline) {
action = strip_spaces(action);
if ((0 < action.length) && ((action.indexOf(")") != -1) && (action.indexOf("(") != -1))) {
var sections = action.split(".");
var timeline_action = sections.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 timeline_reference = timeline;
var j = 0;
while (j < sections.length) {
timeline_reference = timeline_reference[sections[j]];
j++;
}
if (function_parameter.indexOf("\"") != -1) {
function_parameter = function_parameter.substr(1, function_parameter.length - 2);
}
timeline_reference[timeline_function](function_parameter);
}
}
function execute_action() {
unloaded = true;
_parent._visible = false;
simple_script(_parent.play_action_val, _parent);
}
_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) {
var _local2 = "Up";
switch (_parent.xin_motion_val) {
case _local2 :
_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) {
var _local2 = "Toward";
switch (_parent.xin_motion_val) {
case _local2 :
_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_y - _parent._y) < Math.abs(orig_x - _parent._x)) {
_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") && (1 >= Math.abs(_parent._alpha - orig_a))) || (((_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 ((10 < rl) && (10 < rt)) {
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) {
var _local2 = "Down";
switch (_parent.xout_motion_val) {
case _local2 :
if (orig_y >= _parent._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 ((orig_y + (dist_y * 2)) < _parent._y) {
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 (orig_x >= _parent._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 ((orig_x + (dist_x * 2)) < _parent._x) {
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 (1 < Math.abs(perc_fadeout - 100)) {
break;
}
execute_action();
}
_local2 = "Yes";
if (!((typeof(_parent.xout_alphatype_val) == typeof(_local2)) ? (_parent.xout_motion_val == _local2) : false)) {
} else {
_parent._alpha = (orig_a / 100) * (100 - perc_fadeout);
}
} else {
execute_action();
}
}
Symbol 679 Button
on (release) {
getURL ("http://www.craziness.com", "_blank");
}
Symbol 687 Button
on (release) {
play();
}
Symbol 724 MovieClip Frame 27
stop();
Symbol 730 Button
on (press) {
gotoAndPlay (182);
}
Symbol 760 MovieClip Frame 25
_parent.gotoAndStop(1);
Symbol 769 MovieClip Frame 25
_parent.gotoAndStop(1);
Symbol 780 Button
on (press) {
var j = 0;
while (j < 100) {
this["rebus_letter" + j].removeMovieClip();
j++;
}
this.gotoAndStop(1);
}
Symbol 784 Button
on (press) {
this.hint_prompt.hint = this.hint;
this.hint_prompt.gotoAndStop(2);
}
Symbol 788 Button
on (press) {
this.hint_prompt.gotoAndStop(1);
var correct = true;
var j = 0;
while (j < answer.length) {
var _mc = this["rebus_letter" + j];
if (_mc._visible && (_mc.final != _mc.letter)) {
correct = false;
}
j++;
}
if (correct) {
this.answered = true;
this.answer_prompt.gotoAndPlay("Correct Answer");
this._parent.game_sc.timeline._parent[this._parent.game_sc.score_variable] = this._parent.game_sc.timeline._parent[this._parent.game_sc.score_variable] + (Number(this._parent.game_sc.timeline._parent[this._parent.game_sc.score_variable]) + this._parent.game_sc.correct_rebus);
} else {
this.answer_prompt.gotoAndPlay("Incorrect Answer");
this._parent.game_sc.timeline._parent[this._parent.game_sc.score_variable] = this._parent.game_sc.timeline._parent[this._parent.game_sc.score_variable] + (Number(this._parent.game_sc.timeline._parent[this._parent.game_sc.score_variable]) + this._parent.game_sc.incorrect_rebus);
}
}
Symbol 793 MovieClip Frame 1
stop();
Symbol 793 MovieClip Frame 20
var j = 0;
while (j < 100) {
this._parent["rebus_letter" + j].removeMovieClip();
j++;
}
if (this._parent._parent.game_sc.correct_rebus_handle == "Next Puzzle") {
_root.play();
}
this._parent.gotoAndStop(1);
this.gotoAndStop(1);
Symbol 793 MovieClip Frame 40
var j = 0;
while (j < 100) {
this._parent["rebus_letter" + j].removeMovieClip();
j++;
}
this._parent.gotoAndStop(1);
this.gotoAndStop(1);
Symbol 795 Button
on (press) {
this.gotoAndStop(1);
}
Symbol 797 MovieClip Frame 1
stop();
Symbol 798 MovieClip Frame 1
stop();
Symbol 798 MovieClip Frame 2
var sx = -235;
var sy = -10;
back_mc = this._parent.rebus_puzzles;
answer = back_mc.answer;
hint = back_mc.hint;
var j = 0;
while (j < answer.length) {
this.attachMovie("rebus_letter", "rebus_letter" + j, j);
var _mc = this["rebus_letter" + j];
_mc._x = sx + (j * 34);
_mc._y = sy;
_mc.final = answer.charAt(j).toUpperCase();
_mc._visible = _mc.final != " ";
j++;
}
current_letter = 0;
Symbol 802 Button
on (press) {
if (this.rebus_guess_prompt.answered) {
return(undefined);
}
this.rebus_guess_prompt.gotoAndStop(2);
}
Symbol 803 MovieClip Frame 1
Math.isOdd = function (x) {
return(x % 2);
};
Math.randi = function (a, b) {
return(Math.floor(Math.random() * (b - a)) + a);
};
Array.prototype.swap_elements = function (a, b) {
var temp = this[a];
this[a] = this[b];
this[b] = temp;
};
Array.prototype.swap_elements2D = function (a, b, c, d) {
if ((a == c) && (b == d)) {
return(undefined);
}
var temp = this[a][b];
this[a][b] = this[c][d];
this[c][d] = temp;
};
Array.prototype.randomize = function () {
var j = 0;
while (j < this.length) {
this.swap_elements(Math.randi(0, this.length), Math.randi(0, this.length));
j++;
}
};
Array.prototype.randomize2D = function () {
var x = this.length;
var y = this[0].length;
var j = 0;
while (j < (x * y)) {
this.swap_elements2D(Math.randi(0, x), Math.randi(0, y), Math.randi(0, x), Math.randi(0, y));
j++;
}
};
Array.prototype.build_2D_Array = function (x, y) {
var index = 0;
var num = 0;
var j = 0;
while (j < x) {
this[j] = new Array();
var k = 0;
while (k < y) {
if ((num != 0) && ((num % 2) == 0)) {
index++;
}
this[j][k] = Math.floor(index);
num++;
k++;
}
j++;
}
};
Array.prototype.return_random_element = function () {
return(this[Math.randi(0, this.length)]);
};
Array.get_random_indices = function (a, b) {
var _array = new Array();
var j = a;
while (b >= j) {
_array.push(j);
j++;
}
_array.randomize();
return(_array);
};
MovieClip.prototype.createEmptyMovieClip = function (name, depth) {
this.attachMovie("concentration_emptyMovieClip", name, depth);
};
if (Object.prototype.CONCENTRATION_CURRENT_LEVEL == undefined) {
MovieClip.prototype.oldStop = MovieClip.prototype.stop;
MovieClip.prototype.oldPlay = MovieClip.prototype.play;
MovieClip.prototype.oldgotoAndStop = MovieClip.prototype.gotoAndStop;
MovieClip.prototype.oldgotoAndPlay = MovieClip.prototype.gotoAndPlay;
MovieClip.prototype.isPlaying = true;
MovieClip.prototype.stop = function () {
this.oldStop();
this.isPlaying = false;
};
MovieClip.prototype.play = function () {
this.oldPlay();
this.isPlaying = true;
};
MovieClip.prototype.gotoAndStop = function (frame) {
this.oldgotoAndStop(frame);
this.isPlaying = false;
};
MovieClip.prototype.gotoAndPlay = function (frame) {
this.oldgotoAndPlay(frame);
this.isPlaying = true;
};
}
Object.isDefined = function (x) {
return(((x != undefined) || (x != "")) || (x != null));
};
this._x = (this._y = 0);
Object.prototype.CONCENTRATION_CURRENT_LEVEL++;
Concentration_Game = function () {
this.pair_info = new Array();
this.num_guesses = 0;
this.mode = "loading data";
this.old_mode = undefined;
this.depth = 0;
this.first_selected_card = undefined;
this.second_selected_card = undefined;
this.num_pairs_found = 0;
this.num_pairs = Math.floor((this.grid_dim_x * this.grid_dim_y) / 2);
this.load_data();
};
Concentration_Game.prototype.grid_x = Number(grid_x_val);
Concentration_Game.prototype.grid_y = Number(grid_y_val);
Concentration_Game.prototype.grid_dim_x = Number(grid_dim_x_val);
Concentration_Game.prototype.grid_dim_y = Number(grid_dim_y_val);
Concentration_Game.prototype.piece_dim_x = Number(piece_dim_x_val);
Concentration_Game.prototype.piece_dim_y = Number(piece_dim_y_val);
Concentration_Game.prototype.piece_space_x = Number(piece_space_x_val);
Concentration_Game.prototype.piece_space_y = Number(piece_space_y_val);
Concentration_Game.prototype.num_levels = Number(num_levels_val);
Concentration_Game.prototype.repeat_images = repeat_images_val;
Concentration_Game.prototype.level_transition_mc = level_transition_mc_val;
Concentration_Game.prototype.background_mc = background_mc_val;
Concentration_Game.prototype.graphics_linkage = graphics_linkage_label.split("|");
Concentration_Game.prototype.special_graphic_linkage = special_graphic_linkage_val;
Concentration_Game.prototype.timer_limit = Number(timer_limit_val * 1000);
Concentration_Game.prototype.timer_variable = timer_variable_val;
Concentration_Game.prototype.guess_limit = Number(guess_limit_val);
Concentration_Game.prototype.guess_count_variable = guess_count_variable_val;
Concentration_Game.prototype.pair_find_outcome = pair_find_outcome_val;
Concentration_Game.prototype.external_animation_mc = external_animation_mc_val;
Concentration_Game.prototype.loader_mc = loader_mc_val;
Concentration_Game.prototype.num_positive_frames = num_positive_frames_val;
Concentration_Game.prototype.num_negative_frames = num_negative_frames_val;
Concentration_Game.prototype.click_sound = click_sound_val;
Concentration_Game.prototype.correct_sound = correct_sound_label.split("|");
Concentration_Game.prototype.incorrect_sound = incorrect_sound_label.split("|");
Concentration_Game.prototype.special_card_sound = special_card_sound_label.split("|");
Concentration_Game.prototype.score_variable = score_variable_val;
Concentration_Game.prototype.score_factor = score_factor_val;
Concentration_Game.prototype.match_score = match_score_val;
Concentration_Game.prototype.unturned_graphic_linkage = unturned_graphic_linkage_val;
Concentration_Game.prototype.use_rebus = use_rebus_val;
Concentration_Game.prototype.correct_rebus = Number(correct_rebus_val);
Concentration_Game.prototype.incorrect_rebus = Number(incorrect_rebus_val);
Concentration_Game.prototype.correct_rebus_handle = correct_rebus_handle_val;
Concentration_Game.prototype.timeline = this;
if (((timer_limit == undefined) || (Number(timer_limit) == 0)) || (timer_limit == "")) {
Concentration_Game.prototype.timer_limit = 100000000000;
}
if (((guess_limit == undefined) || (Number(guess_limit) == 0)) || (guess_limit == "")) {
Concentration_Game.prototype.guess_limit = 100000000000;
}
if (_parent[score_variable] == undefined) {
_parent[score_variable] = 0;
}
if (CONCENTRATION_CURRENT_LEVEL == 1) {
_parent[score_variable] = 0;
_root.rebus_indices = Array.get_random_indices(1, Math.ceil(_root._totalframes / 2));
}
_parent[external_animation_mc].gotoAndStop(1);
delete grid_x;
delete grid_y;
delete grid_dim_x;
delete grid_dim_y;
delete piece_dim_x;
delete piece_dim_y;
delete piece_space_x;
delete piece_space_y;
delete num_levels;
delete repeat_images;
delete level_transition_mc;
delete background_mc;
delete graphics_linkage;
delete special_graphic_linkage;
delete timer_limit;
delete timer_variable;
delete guess_limit;
delete guess_count_variable;
delete pair_find_outcome;
delete external_animation_mc;
delete loader_mc;
delete num_positive_frames;
delete num_negative_frames;
delete click_sound;
delete correct_sound;
delete incorrect_sound;
delete special_card_sound;
delete score_variable;
delete score_factor;
delete match_score;
delete unturned_graphic_linkage;
Concentration_Game.prototype.load_data = function () {
this.build_background_image();
this.build_cards_set();
this.timeline._visible = false;
this.timeline._parent.attachMovie(this.loader_mc, "concentration_loader", 300000);
this.timeline._parent.concentration_loader._x = this.grid_x;
this.timeline._parent.concentration_loader._y = this.grid_y;
this.timeline._parent[this.guess_count_variable] = this.guess_limit;
this.timeline._parent[this.timer_variable] = this.timer_limit / 1000;
};
Concentration_Game.prototype.initialize = function () {
_mc = undefined;
this.timeline._visible = true;
this.timeline._parent.concentration_loader.removeMovieClip();
this.change_mode("waiting for user input");
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
_mc.gotoAndStop(card_frame[this.pair_info[j][k]]);
_mc.ID = this.pair_info[j][k];
_mc.index_x = j;
_mc.index_y = k;
k++;
}
j++;
}
this.starting_time = getTimer();
};
Concentration_Game.prototype.build_background_image = function () {
if (this.use_rebus == "True") {
this.timeline.attachMovie("rebus_puzzles", "rebus_puzzles", this.depth++);
this.timeline.rebus_puzzles._x = this.grid_x;
this.timeline.rebus_puzzles._y = this.grid_y;
this.timeline.rebus_puzzles.gotoAndStop(2 + (_root.rebus_indices[CONCENTRATION_CURRENT_LEVEL] % (this.timeline.rebus_puzzles._totalframes - 1)));
} else if (Object.isDefined(this.background_mc)) {
this.initialize_graphic(this.background_mc, "background");
this.timeline.background._x = this.grid_x;
this.timeline.background._y = this.grid_y;
}
};
Concentration_Game.prototype.build_cards_set = function () {
var mc_name = undefined;
var index = undefined;
var _mc = undefined;
var card_frame = new Array();
this.pair_info = new Array();
this.pair_info.build_2D_Array(this.grid_dim_x, this.grid_dim_y);
this.pair_info.randomize2D();
this.graphics_linkage.randomize();
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
mc_name = (("image_" + j) + "_") + k;
if (card_frame[this.pair_info[j][k]] == undefined) {
card_frame[this.pair_info[j][k]] = 1;
} else {
card_frame[this.pair_info[j][k]] = 2;
}
if ((this.pair_info[j][k] >= Math.floor((this.grid_dim_x * this.grid_dim_y) / 2)) && (Math.isOdd(this.grid_dim_x * this.grid_dim_y))) {
_mc = this.initialize_graphic(this.special_graphic_linkage, mc_name);
} else {
_mc = this.initialize_graphic(this.graphics_linkage[this.pair_info[j][k]], mc_name);
}
_mc._x = this.grid_x + (((j + 0.5) - (this.grid_dim_x / 2)) * (this.piece_dim_x + this.piece_space_x));
_mc._y = this.grid_y + (((k + 0.5) - (this.grid_dim_y / 2)) * (this.piece_dim_y + this.piece_space_y));
var mc_cover = ((("cover_" + j) + "_") + k);
var o_mc = this.initialize_graphic(this.unturned_graphic_linkage, mc_cover);
o_mc._x = _mc._x;
o_mc._y = _mc._y;
k++;
}
j++;
}
};
Concentration_Game.prototype.load_status = function () {
for (var j in this.timeline) {
if (typeof(this.timeline[j]) == "movieclip") {
if (this.timeline[j].getBytesLoaded() != this.timeline[j].getBytesTotal()) {
return(false);
}
}
}
return(true);
};
Concentration_Game.prototype.initialize_graphic = function (link, name) {
if (link.indexOf(".swf") == -1) {
this.timeline.attachMovie(link, name, this.depth++);
} else {
this.timeline.createEmptyMovieClip(name, this.depth++);
this.timeline[name].loadMovie(link);
}
return(this.timeline[name]);
};
Concentration_Game.prototype.action = function () {
var _mc = undefined;
if ((this.mode != "game over") && (this.mode != "loading data")) {
var current_time = getTimer();
var _time_left_ = Math.floor((this.timer_limit - (current_time - this.starting_time)) / 1000);
var minutes = Math.floor(_time_left_ / 60);
var seconds = (_time_left_ % 60);
if (seconds < 10) {
seconds = "0" + seconds;
}
this.timeline._parent[this.timer_variable] = (minutes + " : ") + seconds;
if (0 >= _time_left_) {
_root.gotoAndStop(_root._totalframes - 1);
}
}
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
var _mc = this.timeline[(("image_" + j) + "_") + k];
var o_mc = this.timeline[(("cover_" + j) + "_") + k];
for (var w in _mc) {
if (_mc[w]._currentframe == 1) {
o_mc._visible = true;
}
}
k++;
}
j++;
}
if (this.mode == "loading data") {
if (this.load_status()) {
this.initialize();
}
} else if (this.mode == "waiting for user input") {
} else if (this.mode == "waiting for 2nd card selection") {
} else if (this.mode == "wrong pair - waiting for animation") {
if (this.animations_done_playing()) {
this.mode = "wrong pair";
}
} else if (this.mode == "wrong pair") {
this.play_turned_cards();
this.change_mode("waiting for card animations to play");
this.first_selected_card = (this.second_selected_card = undefined);
} else if (this.mode == "waiting for card animations to play") {
if (this.animations_done_playing()) {
if (this.old_mode == "waiting for user input") {
this.change_mode("waiting for 2nd card selection");
} else if (this.old_mode == "wrong pair") {
var _sound = new Sound();
_sound.attachSound(this.incorrect_sound.return_random_element());
_sound.start(0, 1);
this.change_mode("waiting for user input");
}
}
} else if (this.mode == "found last card") {
if (this.animations_done_playing()) {
if (CONCENTRATION_CURRENT_LEVEL == this.num_levels) {
this.timeline._parent[this.score_variable] = Number(this.timeline._parent[this.score_variable]) + (Number(this.timeline._parent[this.guess_count_variable]) * this.score_factor);
_root.gotoAndStop(_root._totalframes);
} else {
this.change_mode("game over");
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
this.timeline[(("image_" + j) + "_") + k].removeMovieClip();
this.timeline[(("image_" + j) + "_") + k].unloadMovie();
k++;
}
j++;
}
this.timeline.attachMovie(this.level_transition_mc, "level_transition", 200000);
this.timeline.level_transition._x = this.grid_x;
this.timeline.level_transition._y = this.grid_y;
}
}
} else if (this.mode == "found matching pair") {
if (this.animations_done_playing() && (!Object.prototype.__DONE__)) {
Object.prototype.__DONE__ = true;
if (this.pair_find_outcome == "Pair Disappears") {
this.play_turned_cards();
}
} else if (this.animations_done_playing() && Object.prototype.__DONE__) {
Object.prototype.__DONE__ = false;
if (this.pair_find_outcome == "Pair Disappears") {
this.remove_matching_pair();
} else {
this.change_matching_pair_name();
}
this.change_mode("waiting for user input");
this.first_selected_card = (this.second_selected_card = undefined);
var _sound = new Sound();
_sound.attachSound(this.correct_sound.return_random_element());
_sound.start(0, 1);
}
} else if (this.mode == "game over") {
if (this.timeline.level_transition.hitTest(_root._xmouse, _root._ymouse, true) && this.mouse_down) {
this.timeline._parent[this.score_variable] = Number(this.timeline._parent[this.score_variable]) + (Number(this.timeline._parent[this.guess_count_variable]) * this.score_factor);
_root.play();
}
} else if (this.mode == "you lost") {
if (this.animations_done_playing()) {
_root.gotoAndStop(_root._totalframes - 1);
}
}
};
Concentration_Game.prototype.on_click = function () {
this.mouse_down = true;
var _mc = undefined;
if (!this.all_animations_done_playing()) {
return(undefined);
}
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
_mc.ID = this.pair_info[j][k];
if (_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
this.clicked_on_card(j, k);
}
k++;
}
j++;
}
};
Concentration_Game.prototype.on_release = function () {
this.mouse_down = false;
};
Concentration_Game.prototype.clicked_on_card = function (x, y) {
var _mc = this.timeline[(("image_" + x) + "_") + y];
var o_mc = this.timeline[(("cover_" + x) + "_") + y];
o_mc._visible = false;
var _sound = new Sound();
_sound.attachSound(this.click_sound.return_random_element());
_sound.start(0, 1);
for (var w in _mc) {
if (_mc[w].isPlaying) {
return(undefined);
}
}
for (var w in _mc) {
if (_mc[w]._currentframe != 1) {
if (typeof(_mc[w]) == "movieclip") {
return(undefined);
}
}
}
if ((this.mode == "waiting for user input") || (this.mode == "waiting for 2nd card selection")) {
for (var j in _mc) {
if (typeof(_mc[j]) == "movieclip") {
_mc[j].play();
}
}
}
if (this.mode == "waiting for user input") {
this.first_selected_card = this.pair_info[x][y];
if ((this.first_selected_card == this.num_pairs) && (Math.isOdd(this.grid_dim_x * this.grid_dim_y))) {
this.num_guesses++;
_root[this.guess_count_variable] = this.guess_limit - this.num_guesses;
if (this.num_pairs_found == this.num_pairs) {
this.change_mode("found last card");
var _sound = new Sound();
_sound.attachSound(this.special_card_sound.return_random_element());
_sound.start(0, 1);
this.timeline._parent[this.score_variable] = Number(this.timeline._parent[this.score_variable]) + this.match_score;
} else {
if (this.num_guesses == this.guess_limit) {
this.change_mode("you lost");
return(undefined);
}
this.change_mode("wrong pair - waiting for animation");
var frame = ((2 + this.num_positive_frames) + random(this.num_negative_frames));
this.timeline._parent[this.external_animation_mc].gotoAndStop(frame);
for (var q in eval ("this.timeline._parent." add this.external_animation_mc)) {
this.timeline._parent[this.external_animation_mc][q].play();
}
}
} else {
this.change_mode("waiting for card animations to play");
}
} else if (this.mode == "waiting for 2nd card selection") {
this.second_selected_card = this.pair_info[x][y];
this.num_guesses++;
_root[this.guess_count_variable] = this.guess_limit - this.num_guesses;
if (this.first_selected_card == this.second_selected_card) {
this.num_pairs_found++;
this.timeline._parent[this.score_variable] = Number(this.timeline._parent[this.score_variable]) + this.match_score;
if (this.num_pairs_found == ((this.grid_dim_x * this.grid_dim_y) / 2)) {
this.change_mode("found last card");
return(undefined);
}
if (this.num_guesses == this.guess_limit) {
this.change_mode("you lost");
return(undefined);
}
this.change_mode("found matching pair");
Object.prototype.__DONE__ = false;
for (var n in _mc) {
if (typeof(_mc[n]) == "movieclip") {
_mc[n].play();
}
}
var frame = (2 + random(this.num_positive_frames));
this.timeline._parent[this.external_animation_mc].gotoAndStop(frame);
for (var q in eval ("this.timeline._parent." add this.external_animation_mc)) {
this.timeline._parent[this.external_animation_mc][q].play();
}
} else if (this.num_guesses == this.guess_limit) {
this.change_mode("you lost");
} else {
this.change_mode("wrong pair - waiting for animation");
var frame = ((2 + this.num_positive_frames) + random(this.num_negative_frames));
this.timeline._parent[this.external_animation_mc].gotoAndStop(frame);
for (var q in eval ("this.timeline._parent." add this.external_animation_mc)) {
this.timeline._parent[this.external_animation_mc][q].play();
}
}
}
};
Concentration_Game.prototype.animations_done_playing = function () {
var _mc = undefined;
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
if ((_mc.ID == this.first_selected_card) || (_mc.ID == this.second_selected_card)) {
for (var n in _mc) {
if (typeof(_mc[n]) == "movieclip") {
if (_mc[n].isPlaying) {
return(false);
}
}
}
}
k++;
}
j++;
}
return(true);
};
Concentration_Game.prototype.all_animations_done_playing = function () {
var _mc = undefined;
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
for (var n in _mc) {
if (typeof(_mc[n]) == "movieclip") {
if (_mc[n].isPlaying) {
return(false);
}
}
}
k++;
}
j++;
}
return(true);
};
Concentration_Game.prototype.remove_matching_pair = function () {
var _mc = undefined;
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
var o_mc = this.timeline[(("cover_" + j) + "_") + k];
if ((_mc.ID == this.first_selected_card) || (_mc.ID == this.second_selected_card)) {
_mc.removeMovieClip();
_mc.unloadMovie();
o_mc.removeMovieClip();
o_mc.unloadMovie();
}
k++;
}
j++;
}
};
Concentration_Game.prototype.change_matching_pair_name = function () {
var _mc = undefined;
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
var o_mc = this.timeline[(("cover_" + j) + "_") + k];
if ((_mc.ID == this.first_selected_card) || (_mc.ID == this.second_selected_card)) {
_mc._name = "already_picked" + (this.depth++);
o_mc.removeMovieClip();
o_mc.unloadMovie();
}
k++;
}
j++;
}
};
Concentration_Game.prototype.play_turned_cards = function () {
var _mc = undefined;
var j = 0;
while (j < this.grid_dim_x) {
var k = 0;
while (k < this.grid_dim_y) {
_mc = this.timeline[(("image_" + j) + "_") + k];
if ((_mc.ID == this.first_selected_card) || (_mc.ID == this.second_selected_card)) {
for (var n in _mc) {
if (_mc[n]._currentframe != 1) {
_mc[n].play();
}
}
}
k++;
}
j++;
}
};
Concentration_Game.prototype.change_mode = function (new_mode) {
this.old_mode = this.mode;
this.mode = new_mode;
};
game_sc = new Concentration_Game();
Instance of Symbol 774 MovieClip in Symbol 803 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
onClipEvent (enterFrame) {
_parent.game_sc.action();
}
onClipEvent (mouseDown) {
_parent.game_sc.on_click();
}
onClipEvent (mouseUp) {
_parent.game_sc.on_release();
}
Instance of Symbol 798 MovieClip "rebus_guess_prompt" in Symbol 803 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(99999);
}
onClipEvent (keyDown) {
if (this._currentframe == 1) {
return(undefined);
}
var _mc = this["rebus_letter" + this.current_letter];
var k = String.fromCharCode(Key.getAscii()).toUpperCase();
if (Key.isDown(8)) {
_mc.letter = "";
this.current_letter = Math.max(0, this.current_letter - 1);
} else if (!Key.isDown(32)) {
if (_mc.final == " ") {
this.current_letter = Math.min(this.answer.length, this.current_letter + 1);
}
_mc = this["rebus_letter" + this.current_letter];
_mc.letter = k;
this.current_letter = Math.min(this.answer.length - 1, this.current_letter + 1);
}
}
Symbol 815 Button
on (press) {
gotoAndPlay (182);
}