STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229671 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2596 · P5191 |
This is the info page for Flash #26767 |
M |
Find all the words before time runs out. Remember that the words can run horizontally, vertically, diagonally, and even backwards. Select each word by clicking on the first letter and dragging your mouse along the word. When you reach the end of the word, let up on the mouse button. If you find a word on the list then that word will remain circled and the word will be crossed off the list. It takes a keen eye to find them all. Good luck! |
Game Over! You Have to be faster! |
Play Again! |
Timer: |
Score: |
Start Over |
ActionScript [AS1/AS2]
Instance of Symbol 29 MovieClip in Frame 1onClipEvent (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 2stop();Frame 3stop();Instance of Symbol 81 MovieClip in Frame 3onClipEvent (load) { show_unfound_val = "True"; special_sound_probability_val = 0.25; incorrect_points_val = -5; correct_points_val = 20; game_over_circle_color_rgb = 16711680 /* 0xFF0000 */; game_over_circle_color_r = 255; game_over_circle_color_g = 0; game_over_circle_color_b = 0; game_over_circle_color_a = 100; drag_circle_color_rgb = 0; drag_circle_color_r = 0; drag_circle_color_g = 0; drag_circle_color_b = 0; drag_circle_color_a = 100; word_selection_type_val = "Circled"; words_per_puzzle_val = 15; grid_columns_val = 20; grid_rows_val = 20; database_file_val = "funnies_wordsearch1.txt"; time_limit_val = 300000 /* 0x0493E0 */; possible_word_directions_label = "Top Left to Bottom Right|Top Right to Bottom Left|Bottom Left to Top Right|Bottom Right to Top Left|Top to Bottom|Bottom to Top|Left to Right|Right to Left"; possible_word_directions_load_type = "Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL|Load URL"; possible_word_directions_load_url = "http://|http://|http://|http://|http://|http://|http://|http://"; possible_word_directions_load_target = "_blank|_blank|_blank|_blank|_blank|_blank|_blank|_blank"; possible_word_directions_swf_type = "Level|Level|Level|Level|Level|Level|Level|Level"; possible_word_directions_swf_level = "1|1|1|1|1|1|1|1"; possible_word_directions_swf_mc = "_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content|_root.content"; possible_word_directions_simple = "|||||||"; }Frame 4stop();Frame 5stop();Symbol 5 MovieClip [circle_selection] Frame 1var x1 = from_mc._x; var y1 = from_mc._y; var x2 = to_mc._x; var y2 = to_mc._y; this._x = x1; this._y = y1; end._x = x2 - x1; end._y = y2 - y1; middle._rotation = 0; middle._width = Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))); angle = (Math.atan2(y2 - y1, x2 - x1) * 180) / Math.PI; start._rotation = angle; middle._rotation = angle; end._rotation = angle + 180;Symbol 10 MovieClip [letter_textfield] Frame 1stop();Symbol 14 MovieClip [word_bank_textfield] Frame 1stop();Symbol 29 MovieClip Frame 1stop();Instance of Symbol 28 MovieClip "swfloader" in Symbol 29 MovieClip Frame 1onClipEvent (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 _local1 = "Up"; switch (_parent.xin_motion_val) { case _local1 : _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 _local1 = "Toward"; switch (_parent.xin_motion_val) { case _local1 : _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 _local1 = "Down"; switch (_parent.xout_motion_val) { case _local1 : 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(); } _local1 = "Yes"; if (!((_parent.xout_alphatype_val) === (_local1))) { } else { _parent._alpha = (orig_a / 100) * (100 - perc_fadeout); } } else { execute_action(); } }Symbol 43 Buttonon (release) { this.play(); }Symbol 56 MovieClip Frame 1stop();Symbol 58 MovieClip Frame 1stop();Symbol 60 MovieClip Frame 1stop();Symbol 62 MovieClip Frame 1stop();Symbol 69 Buttonon (press) { _root.gotoAndStop("Starting Screen"); }Symbol 70 MovieClip Frame 1stop();Symbol 79 Buttonon (press) { _root.gotoAndStop("Starting Screen"); }Symbol 81 MovieClip Frame 1Math.randi = function (a, b) { return(Math.floor(Math.random() * (b - a)) + Math.floor(a)); }; Math.sign = function (val) { return(((val == 0) ? 0 : (val / Math.abs(val)))); }; Array.prototype.swap = function (a, b) { var temp = this[a]; this[a] = this[b]; this[b] = temp; }; Array.prototype.shuffle = function () { var j = 0; while (j < this.length) { this.swap(j, Math.randi(0, this.length)); j++; } }; Array.prototype.random_subset = function (n) { var subset = new Array(); var indices = Array.getIndices(0, this.length - 1); indices.shuffle(); var j = 0; while (j < n) { subset[j] = this[indices[j]]; j++; } return(subset); }; Array.getIndices = function (a, b) { var _array = new Array(); var j = a; while (b >= j) { _array[j - a] = j; j++; } return(_array); }; Array.get_letter_grid = function (m, n) { var _array = new Array(); var j = 0; while (j < m) { _array[j] = new Array(); var k = 0; while (k < n) { _array[j][k] = String.fromCharCode(Math.randi(65, 91)); k++; } j++; } return(_array); }; Array.prototype.sortOn = function (p) { Array.$sortprop = p; var sortfunc = function (a, b) { var p = Array.$sortprop; return(a[p] < b[p]); }; this.sort(sortfunc); delete Array.$sortprop; }; Array.prototype.return_copy = function () { var _array = new Array(); var j = 0; while (j < this.length) { _array[j] = this[j]; j++; } return(_array); }; String.prototype.return_reverse = function () { var _str = ""; var j = (this.length - 1); while (j >= 0) { _str = _str + this.charAt(j); j--; } return(_str); }; Array.prototype.hasElement = function (e) { var j = 0; while (j < this.length) { if (this[j] == e) { } j++; } return(false); }; Array.prototype.intersection = function (A) { var _array = new Array(); var j = 0; while (j < this.length) { if (a.hasElement(this[a])) { _array.push(this[j]); } j++; } return(_array); }; String.prototype.searchReplace = function (s, r) { return(this.split(s).join(r)); }; WordSearch = function () { this.load_game_data(); }; WordSearch.prototype.time_limit = ((Number(time_limit_val) == 0) ? Number.MAX_VALUE : (Number(time_limit_val))); WordSearch.prototype.database_file = database_file_val; WordSearch.prototype.grid_rows = Number(grid_rows_val); WordSearch.prototype.grid_columns = Number(grid_columns_val); WordSearch.prototype.words_per_puzzle = Number(words_per_puzzle_val); WordSearch.prototype.word_selection_type = word_selection_type_val; WordSearch.prototype.drag_circle_color = drag_circle_color_rgb; WordSearch.prototype.game_over_circle_color = game_over_circle_color_rgb; WordSearch.prototype.correct_points = Number(correct_points_val); WordSearch.prototype.incorrect_points = Number(incorrect_points_val); WordSearch.prototype.special_sound_probability = Number(special_sound_probability_val); WordSearch.prototype.show_unfound = show_unfound_val; WordSearch.prototype.timeline = this; WordSearch.prototype.load_game_data = function () { this.timeline.controller.loadVariables(this.database_file); }; WordSearch.prototype.initialize = function () { this.initialize_variables(); this.initialize_graphics(); }; WordSearch.prototype.initialize_variables = function () { this.mouse_down = false; this.depth = 0; this.score = 0; this.start_time = getTimer(); this.answer_key = new Array(); this.letter_grid_width = this.timeline.grid_area._width; this.letter_grid_height = this.timeline.grid_area._height; this.word_bank = this.words.random_subset(this.words_per_puzzle); this.word_bank.sortOn("length"); this.create_letter_grid(); this.embed_word_bank(); }; WordSearch.prototype.create_letter_grid = function () { var initial_grid = Array.get_letter_grid(this.grid_rows, this.grid_columns); this.letter_grid = new Array(); var j = 0; while (j < this.grid_rows) { this.letter_grid[j] = new Array(); var k = 0; while (k < this.grid_columns) { this.letter_grid[j][k] = new Object(); this.letter_grid[j][k].letter = initial_grid[j][k]; this.letter_grid[j][k].word_bank_letter = false; this.letter_grid[j][k].letter_found = false; this.letter_grid[j][k].drag_selected = false; k++; } j++; } }; WordSearch.prototype.embed_word_bank = function () { var temp_bank = this.word_bank.return_copy(); var j = 0; while (j < temp_bank.length) { temp_bank[j] = temp_bank[j].searchReplace(" ", ""); j++; } var j = 0; while (j < temp_bank.length) { var index_j = Math.randi(0, this.grid_rows); var index_k = Math.randi(0, this.grid_columns); var possible_directions = this.get_possible_word_directions(temp_bank[j].length, index_j, index_k); var bool = this.embed_word(temp_bank[j], index_j, index_k, possible_directions); if (!bool) { temp_bank.push(temp_bank[j]); } j++; } }; WordSearch.prototype.get_possible_word_directions = function (word_length, index_j, index_k) { var directions = new Array(); if (((index_j + word_length) < this.grid_rows) && ((index_k + word_length) < this.grid_columns)) { directions.push("Top Left to Bottom Right"); } if (((index_j + word_length) < this.grid_rows) && ((index_k - word_length) >= 0)) { directions.push("Top Right to Bottom Left"); } if (((index_j - word_length) >= 0) && ((index_k + word_length) < this.grid_columns)) { directions.push("Bottom Left to Top Right"); } if (((index_j - word_length) >= 0) && ((index_k - word_length) >= 0)) { directions.push("Bottom Right to Top Left"); } if ((index_j + word_length) < this.grid_rows) { directions.push("Top to Bottom"); } if ((index_j - word_length) >= 0) { directions.push("Bottom to Top"); } if ((index_k + word_length) < this.grid_columns) { directions.push("Left to Right"); } if ((index_k - word_length) >= 0) { directions.push("Right to Left"); } return(directions); }; WordSearch.prototype.embed_word = function (word, index_j, index_k, possible_directions) { possible_directions.shuffle(); if (this.answer_key.length < (0.2 * this.word_bank.length)) { possible_directions.sortOn("length"); } var j = 0; while (j < possible_directions.length) { var increments = this.calculate_slope_increments(possible_directions[j]); if (!this.word_overlaps(word, index_j, index_k, increments)) { this.put_letters_in(word, index_j, index_k, increments, possible_directions[j]); return(true); } j++; } return(false); }; WordSearch.prototype.put_letters_in = function (word, index_j, index_k, increments, direction) { var n = 0; while (n < word.length) { var j = (index_j + (n * increments.j)); var k = (index_k + (n * increments.k)); var letter = this.letter_grid[j][k]; letter.word_bank_letter = true; letter.letter = word.charAt(n); n++; } var answer = new Object(); answer.start = {j:index_j, k:index_k}; answer.length = word.length; answer.increments = increments; answer.direction = direction; answer.word = word; this.answer_key.push(answer); }; WordSearch.prototype.word_overlaps = function (word, index_j, index_k, increments) { var n = 0; while (n < word.length) { var j = (index_j + (n * increments.j)); var k = (index_k + (n * increments.k)); var letter = this.letter_grid[j][k]; if (letter.word_bank_letter && (letter.letter != word.charAt(n))) { return(true); } n++; } return(false); }; WordSearch.prototype.calculate_slope_increments = function (direction) { if (direction == "Top Left to Bottom Right") { return({j:1, k:1}); } if (direction == "Bottom Left to Top Right") { return({j:-1, k:1}); } if (direction == "Top Right to Bottom Left") { return({j:1, k:-1}); } if (direction == "Bottom Right to Top Left") { return({j:-1, k:-1}); } if (direction == "Left to Right") { return({j:0, k:1}); } if (direction == "Right to Left") { return({j:0, k:-1}); } if (direction == "Top to Bottom") { return({j:1, k:0}); } if (direction == "Bottom to Top") { return({j:-1, k:0}); } }; WordSearch.prototype.initialize_graphics = function () { this.create_letter_grid_graphics(); this.render_letter_grid(); this.render_word_bank(); }; WordSearch.prototype.create_letter_grid_graphics = function () { this.letter_spacing_x = this.timeline.grid_area._width / (this.grid_columns + 1); this.letter_spacing_y = this.timeline.grid_area._height / (this.grid_rows + 1); var j = 0; while (j < this.grid_rows) { var k = 0; while (k < this.grid_columns) { this.timeline.attachMovie("letter_textfield", (("letter_" + j) + "_") + k, this.depth++); var _mc = this.timeline[(("letter_" + j) + "_") + k]; _mc._x = this.timeline.grid_area._x + (this.letter_spacing_x * (k + 1)); _mc._y = this.timeline.grid_area._y + (this.letter_spacing_y * (j + 1)); _mc.field = this.letter_grid[j][k].letter; _mc.index_j = j; _mc.index_k = k; k++; } j++; } }; WordSearch.prototype.render_letter_grid = function () { var j = 0; while (j < this.grid_rows) { var k = 0; while (k < this.grid_columns) { var _mc = this.timeline[(("letter_" + j) + "_") + k]; _mc.field = this.letter_grid[j][k].letter; if (this.letter_grid[j][k].drag_selected) { _mc.gotoAndStop("Drag Selected"); } else if (this.letter_grid[j][k].letter_found) { _mc.gotoAndStop("Found Selected"); } else { _mc.gotoAndStop("Default"); } k++; } j++; } }; WordSearch.prototype.render_word_bank = function () { this.word_bank.sort(); var word_spacing_y = (this.timeline.word_bank_area._height / (this.word_bank.length + 1)); var j = 0; while (j < this.word_bank.length) { this.timeline.attachMovie("word_bank_textfield", "word" + j, this.depth++); var _mc = this.timeline["word" + j]; _mc._x = this.timeline.word_bank_area._x; _mc._y = this.timeline.word_bank_area._y + ((j + 1) * word_spacing_y); _mc.field = this.word_bank[j]; j++; } }; WordSearch.prototype.mouse_press = function () { this.correct_mouse_press = true; if (!this.timeline.grid_area.hitTest(_root._xmouse, _root._ymouse, true)) { this.correct_mouse_press = false; return(undefined); } this.mouse_down = true; this.press_mc = this.get_closest_letter(); if (this.word_selection_type == "Circled") { this.depth++; this.timeline.attachMovie("circle_selection", "circle" + this.depth, this.depth); this.current_circle_selection = this.timeline["circle" + this.depth]; this.current_circle_selection.from_mc = this.press_mc; this.current_circle_selection.to_mc = this.press_mc; var _color = new Color(this.current_circle_selection); _color.setRGB(this.drag_circle_color); } }; WordSearch.prototype.get_closest_letter = function () { var delta_x = Math.max(0, this.timeline._xmouse - (this.timeline.grid_area._x + (this.letter_spacing_x / 2))); var delta_y = Math.max(0, this.timeline._ymouse - (this.timeline.grid_area._y + (this.letter_spacing_y / 2))); var index_j = Math.min(this.grid_rows - 1, Math.floor(delta_y / this.letter_spacing_y)); var index_k = Math.min(this.grid_columns - 1, Math.floor(delta_x / this.letter_spacing_x)); return(this.timeline[(("letter_" + index_j) + "_") + index_k]); }; WordSearch.prototype.mouse_release = function () { if (!this.correct_mouse_press) { return(undefined); } this.mouse_down = false; this.release_mc = this.get_closest_proper_letter(); this.evaluate_guess(); this.set_word_path_property(this.press_mc, this.release_mc, "drag_selected", false); this.render_letter_grid(); this.press_mc = undefined; this.release_mc = undefined; }; WordSearch.prototype.action = function () { if (this.mouse_down) { this.render_dragged_word(); } this.update_game_properties(); }; WordSearch.prototype.render_dragged_word = function () { if (this.word_selection_type == "Circled") { this.render_circled_dragged_word(); } else { this.render_dots_dragged_word(); } }; WordSearch.prototype.render_circled_dragged_word = function () { this.current_circle_selection.to_mc = this.get_closest_proper_letter(); }; WordSearch.prototype.render_dots_dragged_word = function () { var closest_mc = this.get_closest_proper_letter(); this.set_word_path_property(this.press_mc, closest_mc, "drag_selected", true); this.render_letter_grid(); this.set_word_path_property(this.press_mc, closest_mc, "drag_selected", false); }; WordSearch.prototype.get_closest_proper_letter = function () { var closest_mc = this.get_closest_letter(); var j1 = this.press_mc.index_j; var k1 = this.press_mc.index_k; var j2 = closest_mc.index_j; var k2 = closest_mc.index_k; var to_j = undefined; var to_k = undefined; if (((Math.abs((j1 - j2) / (k1 - k2)) == 1) || (Math.abs(j1 - j2) == 0)) || (Math.abs(k1 - k2) == 0)) { to_j = j2; to_k = k2; } else { var angle = Math.abs((Math.atan2(j2 - j1, k2 - k1) * 180) / Math.PI); if ((angle < 22.5) || (157.5 < angle)) { to_j = j1; to_k = k2; } else if ((67.5 < angle) && (angle < 112.5)) { to_j = j2; to_k = k1; } else { to_j = (Math.max(Math.abs(j2 - j1), Math.abs(k2 - k1)) * Math.sign(j2 - j1)) + j1; to_k = (Math.max(Math.abs(j2 - j1), Math.abs(k2 - k1)) * Math.sign(k2 - k1)) + k1; } } to_j = Math.max(0, to_j); to_k = Math.max(0, to_k); to_j = Math.min(this.grid_rows - 1, to_j); to_k = Math.min(this.grid_columns - 1, to_k); return(this.timeline[(("letter_" + to_j) + "_") + to_k]); }; WordSearch.prototype.set_word_path_property = function (from_mc, to_mc, prop, val) { var inc_x = Math.sign(to_mc.index_k - from_mc.index_k); var inc_y = Math.sign(to_mc.index_j - from_mc.index_j); var dist_x = Math.abs(to_mc.index_k - from_mc.index_k); var dist_y = Math.abs(to_mc.index_j - from_mc.index_j); var dist = Math.max(dist_x, dist_y); var j = 0; while (dist >= j) { var index_j = (from_mc.index_j + (j * inc_y)); var index_k = (from_mc.index_k + (j * inc_x)); this.letter_grid[index_j][index_k][prop] = val; j++; } }; WordSearch.prototype.evaluate_guess = function () { var selected_word = this.calculate_word_path(this.press_mc, this.release_mc); var bank_index = this.check_word_bank(selected_word); if (bank_index != -1) { this.word_found(bank_index); } else { this.wrong_word_found(); } this.check_for_win(); }; WordSearch.prototype.word_found = function (bank_index) { this.timeline["word" + bank_index].gotoAndStop(2); if (this.word_selection_type == "Dots") { this.set_word_path_property(this.press_mc, this.release_mc, "letter_found", true); this.set_word_path_property(this.press_mc, this.release_mc, "drag_selected", false); } this.score = this.score + this.correct_points; if (Math.random() < this.special_sound_probability) { this.timeline.special_correct_sounds.gotoAndStop(1 + Math.randi(1, this.timeline.special_correct_sounds._totalframes)); this.timeline.special_correct_sounds.gotoAndStop(1); } else { this.timeline.correct_sounds.gotoAndStop(1 + Math.randi(1, this.timeline.correct_sounds._totalframes)); this.timeline.correct_sounds.gotoAndStop(1); } }; WordSearch.prototype.wrong_word_found = function () { if (this.word_selection_type == "Dots") { this.set_word_path_property(this.press_mc, this.release_mc, "drag_selected", false); } else { this.current_circle_selection.removeMovieClip(); } this.score = this.score + this.incorrect_points; if (Math.random() < this.special_sound_probability) { this.timeline.special_incorrect_sounds.gotoAndStop(1 + Math.randi(1, this.timeline.special_incorrect_sounds._totalframes)); this.timeline.special_incorrect_sounds.gotoAndStop(1); } else { this.timeline.incorrect_sounds.gotoAndStop(1 + Math.randi(1, this.timeline.incorrect_sounds._totalframes)); this.timeline.incorrect_sounds.gotoAndStop(1); } }; WordSearch.prototype.calculate_word_path = function (from_mc, to_mc) { var inc_x = Math.sign(to_mc.index_k - from_mc.index_k); var inc_y = Math.sign(to_mc.index_j - from_mc.index_j); var dist_x = Math.abs(to_mc.index_k - from_mc.index_k); var dist_y = Math.abs(to_mc.index_j - from_mc.index_j); var dist = Math.max(dist_x, dist_y); var word_str = ""; var j = 0; while (dist >= j) { var index_j = (from_mc.index_j + (j * inc_y)); var index_k = (from_mc.index_k + (j * inc_x)); word_str = word_str + this.letter_grid[index_j][index_k].letter; j++; } return(word_str); }; WordSearch.prototype.check_word_bank = function (word) { var j = 0; while (j < this.word_bank.length) { var word_mc = this.timeline["word" + j]; if (((word_mc.field == word) || (word_mc.field == word.return_reverse())) && (word_mc._currentframe == 1)) { return(j); } if (((word_mc.field.searchReplace(" ", "") == word) || (word_mc.field.searchReplace(" ", "") == word.return_reverse())) && (word_mc._currentframe == 1)) { return(j); } j++; } return(-1); }; WordSearch.prototype.check_for_win = function () { var j = 0; while (j < this.word_bank.length) { var word_mc = this.timeline["word" + j]; if (word_mc._currentframe == 1) { return(undefined); } j++; } _root.gotoAndStop("Win"); }; WordSearch.prototype.check_for_lose = function () { }; WordSearch.prototype.update_game_properties = function () { this.timeline.score = this.score; _root.score = this.score; var time = Math.floor((this.time_limit - (getTimer() - this.start_time)) / 1000); if (time < 0) { time = 0; } var min = Math.floor(time / 60); var sec = (time % 60); if (9 >= sec) { sec = "0" + sec; } this.timeline.timer = (min + ":") + sec; if (this.timeline.timer == "0:00") { if (this.show_unfound == "False") { _root.gotoAndStop("Lose"); } else { this.show_missed_words(); } } }; WordSearch.prototype.show_missed_words = function () { var j = 0; while (j < this.answer_key.length) { var answer = this.answer_key[j]; var found = false; var k = 0; while (k < this.word_bank.length) { var word_mc = this.timeline["word" + k]; if ((word_mc._currentframe != 1) && (word_mc.field == answer.word)) { found = true; } k++; } if (!found) { this.depth++; this.timeline.attachMovie("circle_selection", "end_selection" + j, this.depth++); var _mc = this.timeline["end_selection" + j]; var to_j = (answer.start.j + ((answer.length - 1) * answer.increments.j)); var to_k = (answer.start.k + ((answer.length - 1) * answer.increments.k)); _mc.from_mc = this.timeline[(("letter_" + answer.start.j) + "_") + answer.start.k]; _mc.to_mc = this.timeline[(("letter_" + to_j) + "_") + to_k]; var _color = new Color(_mc); _color.setRGB(this.game_over_circle_color); } j++; } var j = 0; while (j < this.word_bank.length) { this.timeline["word" + j].removeMovieClip(); j++; } this.timeline.word_bank_area.gotoAndStop(2); for (var n in this) { this[n] = undefined; } }; this._x = 0; this._y = 0; game = new WordSearch();Instance of Symbol 54 MovieClip "controller" in Symbol 81 MovieClip Frame 1onClipEvent (load) { this._visible = false; } onClipEvent (data) { _parent.game.words = this.words.split("|"); var j = 0; while (j < _parent.game.words.length) { _parent.game.words[j] = _parent.game.words[j].toUpperCase(); j++; } _parent.game.initialize(); } onClipEvent (mouseDown) { _parent.game.mouse_press(); } onClipEvent (mouseUp) { _parent.game.mouse_release(); } onClipEvent (enterFrame) { _parent.game.action(); }Symbol 85 Buttonon (press) { _root.gotoAndStop("Starting Screen"); }Symbol 99 MovieClip Frame 35stop();
Library Items
Symbol 1 Graphic | Used by:2 | |
Symbol 2 MovieClip | Uses:1 | Used by:5 |
Symbol 3 Graphic | Used by:4 | |
Symbol 4 MovieClip | Uses:3 | Used by:5 |
Symbol 5 MovieClip [circle_selection] | Uses:2 4 | |
Symbol 6 Font | Used by:7 26 | |
Symbol 7 EditableText | Uses:6 | Used by:10 |
Symbol 8 Graphic | Used by:10 | |
Symbol 9 Graphic | Used by:10 | |
Symbol 10 MovieClip [letter_textfield] | Uses:7 8 9 | |
Symbol 11 Font | Used by:12 66 67 71 72 73 74 78 82 86 100 | |
Symbol 12 EditableText | Uses:11 | Used by:14 |
Symbol 13 Graphic | Used by:14 | |
Symbol 14 MovieClip [word_bank_textfield] | Uses:12 13 | |
Symbol 15 Graphic | Used by:16 | |
Symbol 16 MovieClip | Uses:15 | Used by:25 |
Symbol 17 Graphic | Used by:18 | |
Symbol 18 MovieClip | Uses:17 | Used by:25 |
Symbol 19 Graphic | Used by:25 | |
Symbol 20 ShapeTweening | Used by:25 | |
Symbol 21 Graphic | Used by:25 | |
Symbol 22 Graphic | Used by:23 | |
Symbol 23 MovieClip | Uses:22 | Used by:25 |
Symbol 24 Graphic | Used by:25 | |
Symbol 25 MovieClip | Uses:16 18 19 20 21 23 24 | Used by:29 |
Symbol 26 EditableText | Uses:6 | Used by:27 |
Symbol 27 MovieClip | Uses:26 | Used by:29 |
Symbol 28 MovieClip | Used by:29 | |
Symbol 29 MovieClip | Uses:25 27 28 | Used by:Timeline |
Symbol 30 Bitmap | Used by:31 | |
Symbol 31 Graphic | Uses:30 | Used by:Timeline |
Symbol 32 Graphic | Used by:Timeline | |
Symbol 33 Graphic | Used by:34 | |
Symbol 34 MovieClip | Uses:33 | Used by:35 |
Symbol 35 MovieClip | Uses:34 | Used by:Timeline |
Symbol 36 Graphic | Used by:Timeline | |
Symbol 37 Font | Used by:38 | |
Symbol 38 Text | Uses:37 | Used by:Timeline |
Symbol 39 Graphic | Used by:43 | |
Symbol 40 Graphic | Used by:43 | |
Symbol 41 Graphic | Used by:43 | |
Symbol 42 Graphic | Used by:43 85 | |
Symbol 43 Button | Uses:39 40 41 42 | Used by:Timeline |
Symbol 44 Graphic | Used by:Timeline | |
Symbol 45 Graphic | Used by:Timeline | |
Symbol 46 Graphic | Used by:91 99 Timeline | |
Symbol 47 Graphic | Used by:91 99 Timeline | |
Symbol 48 Graphic | Used by:51 91 | |
Symbol 49 Graphic | Used by:51 91 | |
Symbol 50 Graphic | Used by:51 97 | |
Symbol 51 MovieClip | Uses:48 49 50 | Used by:Timeline |
Symbol 52 Bitmap | Used by:53 | |
Symbol 53 Graphic | Uses:52 | Used by:54 |
Symbol 54 MovieClip | Uses:53 | Used by:81 |
Symbol 55 Sound | Used by:56 | |
Symbol 56 MovieClip | Uses:55 | Used by:81 |
Symbol 57 Sound | Used by:58 | |
Symbol 58 MovieClip | Uses:57 | Used by:81 |
Symbol 59 Sound | Used by:60 | |
Symbol 60 MovieClip | Uses:59 | Used by:81 |
Symbol 61 Sound | Used by:62 | |
Symbol 62 MovieClip | Uses:61 | Used by:81 |
Symbol 63 Graphic | Used by:64 | |
Symbol 64 MovieClip | Uses:63 | Used by:81 |
Symbol 65 Graphic | Used by:70 | |
Symbol 66 Text | Uses:11 | Used by:70 |
Symbol 67 Text | Uses:11 | Used by:69 |
Symbol 68 Graphic | Used by:69 | |
Symbol 69 Button | Uses:67 68 | Used by:70 |
Symbol 70 MovieClip | Uses:65 66 69 | Used by:81 |
Symbol 71 Text | Uses:11 | Used by:81 |
Symbol 72 Text | Uses:11 | Used by:81 |
Symbol 73 EditableText | Uses:11 | Used by:81 |
Symbol 74 EditableText | Uses:11 | Used by:81 |
Symbol 75 Graphic | Used by:79 | |
Symbol 76 Graphic | Used by:79 | |
Symbol 77 Graphic | Used by:79 | |
Symbol 78 Text | Uses:11 | Used by:79 |
Symbol 79 Button | Uses:75 76 77 78 | Used by:81 |
Symbol 80 Graphic | Used by:81 | |
Symbol 81 MovieClip | Uses:54 56 58 60 62 64 70 71 72 73 74 79 80 | Used by:Timeline |
Symbol 82 EditableText | Uses:11 | Used by:Timeline |
Symbol 83 Graphic | Used by:85 | |
Symbol 84 Graphic | Used by:85 | |
Symbol 85 Button | Uses:83 84 42 | Used by:Timeline |
Symbol 86 EditableText | Uses:11 | Used by:Timeline |
Symbol 87 Graphic | Used by:Timeline | |
Symbol 88 Graphic | Used by:91 | |
Symbol 89 Graphic | Used by:91 99 | |
Symbol 90 Graphic | Used by:91 | |
Symbol 91 MovieClip | Uses:88 46 47 48 49 89 90 | Used by:Timeline |
Symbol 92 Graphic | Used by:Timeline | |
Symbol 93 Graphic | Used by:97 | |
Symbol 94 Graphic | Used by:97 | |
Symbol 95 Graphic | Used by:97 | |
Symbol 96 Graphic | Used by:97 | |
Symbol 97 MovieClip | Uses:50 93 94 95 96 | Used by:99 |
Symbol 98 Graphic | Used by:99 | |
Symbol 99 MovieClip | Uses:46 47 97 89 98 | Used by:Timeline |
Symbol 100 EditableText | Uses:11 | Used by:Timeline |
Instance Names
"start" | Symbol 5 MovieClip [circle_selection] Frame 1 | Symbol 2 MovieClip |
"middle" | Symbol 5 MovieClip [circle_selection] Frame 1 | Symbol 4 MovieClip |
"end" | Symbol 5 MovieClip [circle_selection] Frame 1 | Symbol 2 MovieClip |
"anim" | Symbol 29 MovieClip Frame 1 | Symbol 25 MovieClip |
"perc" | Symbol 29 MovieClip Frame 1 | Symbol 27 MovieClip |
"swfloader" | Symbol 29 MovieClip Frame 1 | Symbol 28 MovieClip |
"controller" | Symbol 81 MovieClip Frame 1 | Symbol 54 MovieClip |
"correct_sounds" | Symbol 81 MovieClip Frame 1 | Symbol 56 MovieClip |
"incorrect_sounds" | Symbol 81 MovieClip Frame 1 | Symbol 58 MovieClip |
"special_correct_sounds" | Symbol 81 MovieClip Frame 1 | Symbol 60 MovieClip |
"special_incorrect_sounds" | Symbol 81 MovieClip Frame 1 | Symbol 62 MovieClip |
"grid_area" | Symbol 81 MovieClip Frame 1 | Symbol 64 MovieClip |
"word_bank_area" | Symbol 81 MovieClip Frame 1 | Symbol 70 MovieClip |
Special Tags
ExportAssets (56) | Timeline Frame 1 | Symbol 5 as "circle_selection" |
ExportAssets (56) | Timeline Frame 1 | Symbol 10 as "letter_textfield" |
ExportAssets (56) | Timeline Frame 1 | Symbol 14 as "word_bank_textfield" |
Labels
"Starting Screen" | Frame 2 |
"Win" | Frame 4 |
"Lose" | Frame 5 |
"Default" | Symbol 10 MovieClip [letter_textfield] Frame 1 |
"Drag Selected" | Symbol 10 MovieClip [letter_textfield] Frame 2 |
"Found Selected" | Symbol 10 MovieClip [letter_textfield] Frame 3 |
Dynamic Text Variables
field | Symbol 7 EditableText | "M" |
field | Symbol 12 EditableText | "" |
text | Symbol 26 EditableText | "" |
timer | Symbol 73 EditableText | "" |
score | Symbol 74 EditableText | "" |
score | Symbol 82 EditableText | "" |
score | Symbol 86 EditableText | "" |
score | Symbol 100 EditableText | "" |
|