Instance of Symbol 20 MovieClip in Frame 1
//component parameters
onClipEvent (initialize) {
xin_motion_val = "Toward";
xin_alphatype_val = "No";
xout_motion_val = "None";
xout_alphatype_val = "No";
perc_req_val = 100;
show_perc_val = "Yes";
slow_factor_val = 0.2;
init_action_val = "_root.stop();";
play_action_val = "_root.play();";
}
Frame 2
this.preliminary_alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
this.stop();
Frame 4
this.stop();
Frame 5
function checkWordScore() {
wordscore = int(wordscore);
if (wordscore > 0) {
if (correctwords == "") {
correctwords = currentword;
flashtimes = flashtime;
} else {
correctwords = correctwords + ("," + currentword);
flashtimes = flashtimes + ("," + flashtime);
}
currentscore = currentscore + wordscore;
score = currentscore;
return(true);
}
return(false);
}
function endGameFunction(from_timer) {
var _local1 = _root;
if (from_timer == undefined) {
var j = 0;
while (j < 3) {
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 0;
while (_local2 < 3) {
_local1[(((("cube" + j) + "_") + _local3) + "_") + _local2].removeMovieClip();
_local2++;
}
_local3++;
}
j++;
}
_local1.words = [];
var j = 0;
while (j < _local1.game.words.length) {
_local1.words.push(_local1.game.words[j]);
j++;
}
_local1.data_string_array = "";
var j = 0;
while (j < 100) {
_local1.data_string_array = _local1.data_string_array + _local1.distribution.charAt(Math.floor(Math.random() * _local1.distribution.length));
j++;
}
_local1.data_string_array = _local1.data_string_array.toUpperCase();
delete _local1.game;
_local1.countRemoved = 0;
_local1.game = new _local1.cube_game(178, 328, -30, 45, 66);
var j = 0;
while (j < _local1.words.length) {
_local1.game.words.push(_local1.words[j]);
j++;
}
_local1.game.create_game();
} else {
for (var j in _local1) {
_local1[j].removeMovieClip();
}
_local1.gotoAndStop("Game Over");
}
}
String.prototype.check_match = function (a) {
var _local2 = a;
var _local3 = this;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local3 == _local2[_local1]) {
return(true);
}
_local1++;
}
return(false);
};
Array.prototype.concat_to_string = function () {
var _local3 = this;
var _local2 = new String();
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local2 + _local3[_local1];
_local1++;
}
return(_local2);
};
Array.prototype.copy = function (a) {
var _local2 = a;
var _local3 = this;
var _local1 = 0;
while (_local1 < _local2.length) {
_local3[_local1] = _local2[_local1];
_local1++;
}
};
this.answer_prompt_done = function () {
this.timeKeeper.unpause_timer();
};
this.evaluate_answer = function (choice_mc) {
var _local1 = _root;
if (choice_mc.correct) {
_local1.timeKeeper.delta = _local1.timeKeeper.delta + _local1.game.extra_time[choice_mc.word.length];
_local1.quiz_prompt.gotoAndPlay("Correct");
} else {
_local1.quiz_prompt.gotoAndPlay("Incorrect");
}
};
function cube_game(center_x, center_y, angle_x, angle_y, side_length) {
var _local1 = this;
_local1.xctr = center_x;
_local1.yctr = center_y;
_local1.rotation_x_axis = angle_x;
_local1.rotation_y_axis = angle_y;
_local1.side = side_length;
_local1.top = 0;
_local1.left = 1;
_local1.right = 2;
_local1.current_num_clicks = 0;
_local1.max_num_clicks = 4;
_local1.smallest_word = 3;
_local1.largest_word = 7;
_local1.current_word = new Array();
_local1.words = new Array();
_local1.sorted_words = new Array();
_local1.letter_information = new Array();
_local1.click_times = new Array();
_local1.click_history = new Array();
_local1.previous_click_history();
_local1.shades = new Array();
_local1.shaded_sides = new Array();
_local1.clicked_removed_pieces = new Array();
_local1.last_removed_pieces = new Array();
_local1.normal_text_color = 0;
_local1.selected_text_color = 16777215 /* 0xFFFFFF */;
_local1.clickable_text_color = 16711680 /* 0xFF0000 */;
_local1.click_sides = new Array();
_local1.game_on = true;
_local1.page = 1;
_local1.use_quiz = false;
_local1.extra_time = [0, 0, 0, 0, 10000, 15000, 20000, 25000];
}
this.quiz_data = new LoadVars();
this.quiz_data.load("Quiz.txt");
this.quiz_data.onLoad = function () {
var _local3 = this;
_root.num_choices_per_question = Number(_local3.num_choices_per_question);
_root.questions = [];
var _local1 = 0;
while (_local1 >= 0) {
if (_local3[("question" + _local1) + "_text"] == undefined) {
break;
}
_root.questions[_local1] = {};
_root.questions[_local1].text = _local3[("question" + _local1) + "_text"];
_root.questions[_local1].answer = Number(_local3[("question" + _local1) + "_answer"]);
_root.questions[_local1].choices = [];
var _local2 = 0;
while (_local2 < _local3.num_choices_per_question) {
_root.questions[_local1].choices[_local2] = _local3[(("question" + _local1) + "_choice") + _local2];
_local2++;
}
_local1++;
}
_root.questions.shuffle();
};
cube_game.prototype.create_game = function () {
var sin_x;
var sin_y;
var cos_x;
var cos_y;
var depth = 0;
var delta = 1.16;
var letterCount = 0;
sin_x = Math.sin(this.rotation_x_axis * Math.trans);
cos_x = Math.cos(this.rotation_x_axis * Math.trans);
sin_y = Math.sin(this.rotation_y_axis * Math.trans);
cos_y = Math.cos(this.rotation_y_axis * Math.trans);
var _local2 = 0;
while (_local2 <= 2) {
this.letter_information[_local2] = new Array();
this.click_times[_local2] = new Array();
this.shades[_local2] = new Array();
var _local1 = 0;
while (_local1 <= 2) {
this.letter_information[_local2][_local1] = new Array();
this.click_times[_local2][_local1] = new Array();
this.shades[_local2][_local1] = new Array();
var _local3 = 0;
while (_local3 <= 2) {
this.letter_information[_local2][_local1][_local3] = new Array();
this.click_times[_local2][_local1][_local3] = new Array(0, 0, 0);
this.shades[_local2][_local1][_local3] = new Array(0, 0, 0);
_root.cube.duplicateMovieClip((((("cube" + _local2) + "_") + _local1) + "_") + _local3, depth);
x = (_local2 * this.side) * delta;
y = (_local1 * this.side) * delta;
z = (_local3 * this.side) * delta;
rx = (z * cos_y) - (x * sin_y);
rz = (z * sin_y) + (x * cos_y);
ry = (y * cos_x) - (rz * sin_x);
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3]._x = this.xctr + rx;
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3]._y = this.yctr - ry;
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].swapDepths((200 - rz) + depth);
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].j = _local2;
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].k = _local1;
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].s = _local3;
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].active = true;
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].depth = Math.round(500 - rz);
_root[(((("cube" + _local2) + "_") + _local1) + "_") + _local3].field = Math.round(500 - rz);
depth++;
this.letter_information[_local2][_local1][_local3][this.top] = _root.data_string_array.charAt(letterCount++);
this.letter_information[_local2][_local1][_local3][this.left] = _root.data_string_array.charAt(letterCount++);
this.letter_information[_local2][_local1][_local3][this.right] = _root.data_string_array.charAt(letterCount++);
var c = 0;
while (c <= 2) {
if (this.letter_information[_local2][_local1][_local3][c] == "Q") {
this.letter_information[_local2][_local1][_local3][c] = this.letter_information[_local2][_local1][_local3][c] + "U";
}
c++;
}
_local3++;
}
_local1++;
}
_local2++;
}
this.set_fields();
};
cube_game.prototype.set_fields = function () {
var _local3 = 0;
while (_local3 <= 2) {
var _local2 = 0;
while (_local2 <= 2) {
var _local1 = 0;
while (_local1 <= 2) {
_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1].top_letter.field = this.letter_information[_local3][_local2][_local1][this.top];
_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1].left_letter.field = this.letter_information[_local3][_local2][_local1][this.left];
_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1].right_letter.field = this.letter_information[_local3][_local2][_local1][this.right];
var c = 0;
while (c <= 2) {
if (this.letter_information[_local3][_local2][_local1][c] == "QU") {
if (c == this.top) {
_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1].top_letter.field = "Qu";
} else if (c == this.left) {
_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1].left_letter.field = "Qu";
} else {
_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1].right_letter.field = "Qu";
}
}
c++;
}
_local1++;
}
_local2++;
}
_local3++;
}
};
cube_game.prototype.determine_one_coloring = function (x, y, z) {
var _local1 = this;
var _local2 = z;
var _local3 = y;
if (!_local1.shaded(x, _local3, _local2, "top")) {
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].top_side.gotoAndStop(_local1.click_times[x][_local3][_local2][_local1.top] + 1);
}
if (!_local1.shaded(x, _local3, _local2, "left")) {
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].left_side.gotoAndStop(_local1.click_times[x][_local3][_local2][_local1.left] + 1);
}
if (!_local1.shaded(x, _local3, _local2, "right")) {
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].right_side.gotoAndStop(_local1.click_times[x][_local3][_local2][_local1.right] + 1);
}
};
cube_game.prototype.determine_all_coloring = function () {
var _local3 = 0;
while (_local3 <= 2) {
var _local2 = 0;
while (_local2 <= 2) {
var _local1 = 0;
while (_local1 <= 2) {
this.determine_one_coloring(_local3, _local2, _local1);
_local1++;
}
_local2++;
}
_local3++;
}
};
cube_game.prototype.reset_shades = function () {
var _local3 = 0;
while (_local3 <= 2) {
var _local2 = 0;
while (_local2 <= 2) {
var _local1 = 0;
while (_local1 <= 2) {
this.shades[_local3][_local2][_local1] = new Array(0, 0, 0);
this.reset_one_coloring(_local3, _local2, _local1);
_local1++;
}
_local2++;
}
_local3++;
}
};
cube_game.prototype.reset_one_coloring = function (x, y, z) {
var _local1 = this;
var _local2 = z;
var _local3 = y;
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].top_side.gotoAndStop(_local1.click_times[x][_local3][_local2][_local1.top] + 1);
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].left_side.gotoAndStop(_local1.click_times[x][_local3][_local2][_local1.left] + 1);
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].right_side.gotoAndStop(_local1.click_times[x][_local3][_local2][_local1.right] + 1);
};
cube_game.prototype.reset_few_shades = function (x, y, z) {
var _local3 = this;
var j = 0;
while (j <= 2) {
var _local2 = 0;
while (_local2 <= 2) {
var _local1 = 0;
while (_local1 <= 2) {
_local3.shades[j][_local2][_local1] = new Array();
_local3.reset_one_coloring(j, _local2, _local1);
_local1++;
}
_local2++;
}
j++;
}
var j = 0;
while (j < _local3.shaded_sides.length) {
j++;
}
};
cube_game.prototype.determine_all_shaded_sides = function () {
var depth = 0;
var num = 0;
var start = getTimer();
var temp_arr;
var mc1;
var mc2;
this.reset_few_shades();
this.shaded_sides = new Array();
var _local3 = 0;
while (_local3 <= 2) {
var _local1 = 0;
while (_local1 <= 2) {
var _local2 = 0;
while (_local2 <= 2) {
if (_root[(((("cube" + _local3) + "_") + _local1) + "_") + _local2].active) {
var cs1 = 0;
while (cs1 <= 2) {
var a = this.bound(_local3 - 1);
while (_local3 >= a) {
var b = this.bound(_local1 - 1);
while (this.bound(_local1 + 1) >= b) {
var c = this.bound(_local2 - 1);
while (_local2 >= c) {
if (_root[(((("cube" + _local3) + "_") + _local1) + "_") + _local2] != _root[(((("cube" + a) + "_") + b) + "_") + c]) {
if (_root[(((("cube" + a) + "_") + b) + "_") + c].active) {
var cs2 = 0;
while (cs2 <= 2) {
if (cs1 != cs2) {
mc1 = this.return_target(_local3, _local1, _local2, cs1);
mc2 = this.return_target(a, b, c, cs2);
depth++;
if (((!_root[(((("cube" + _local3) + "_") + _local1) + "_") + (_local2 - 1)].active) && _root[(((("cube" + (_local3 - 1)) + "_") + _local1) + "_") + (_local2 - 1)].active) && (cs1 == this.left)) {
this.shades[_local3][_local1][_local2][cs1] = 1;
mc1.gotoAndStop(6);
temp_arr = new Array(_local3, _local1, _local2, cs1);
this.shaded_sides.push(temp_arr);
}
if ((mc1.hitTest(mc2) && (_root[(((("cube" + _local3) + "_") + _local1) + "_") + _local2].depth < _root[(((("cube" + a) + "_") + b) + "_") + c].depth)) && (_root[(((("cube" + _local3) + "_") + _local1) + "_") + _local2].depth != _root[(((("cube" + a) + "_") + b) + "_") + c].depth)) {
det = 0;
if (((a == (_local3 - 1)) && (b == (_local1 - 1))) && (cs2 == this.top)) {
det = 1;
} else if (((c == (_local2 - 1)) && (b == (_local1 - 1))) && (cs2 == this.top)) {
det = 2;
} else if (((a == (_local3 - 1)) && (b == (_local1 - 1))) && (cs2 == this.top)) {
det = 3;
} else {
this.shades[_local3][_local1][_local2][cs1] = 1;
mc1.gotoAndStop(6);
temp_arr = new Array(_local3, _local1, _local2, cs1);
this.shaded_sides.push(temp_arr);
}
if (((!_root[(((("cube" + _local3) + "_") + _local1) + "_") + (_local2 - 1)].active) && _root[(((("cube" + (_local3 - 1)) + "_") + _local1) + "_") + (_local2 - 1)].active) && (cs1 == this.left)) {
this.shades[_local3][_local1][_local2][cs1] = 1;
mc1.gotoAndStop(6);
temp_arr = new Array(_local3, _local1, _local2, cs1);
this.shaded_sides.push(temp_arr);
}
if (det) {
mc1.gotoAndStop(this.click_times[_local3][_local1][_local2][cs1] + 1);
}
} else if (this.shades[_local3][_local1][_local2][cs1] == 0) {
mc1.gotoAndStop(this.click_times[_local3][_local1][_local2][cs1] + 1);
}
}
cs2++;
}
}
}
c++;
}
b++;
}
a++;
}
cs1++;
}
}
_local2++;
}
_local1++;
}
_local3++;
}
};
cube_game.prototype.bound = function (n) {
var _local1 = n;
if (_local1 < 0) {
return(0);
}
if (_local1 > 2) {
return(2);
}
return(_local1);
};
cube_game.prototype.return_target = function (x, y, z, side) {
var _local1 = side;
var _local2 = this;
var _local3 = _root;
if ((_local1 == "top") || (_local1 == _local2.top)) {
return(_local3[(((("cube" + x) + "_") + y) + "_") + z].top_side);
}
if ((_local1 == "left") || (_local1 == _local2.left)) {
return(_local3[(((("cube" + x) + "_") + y) + "_") + z].left_side);
}
if ((_local1 == "right") || (_local1 == _local2.right)) {
return(_local3[(((("cube" + x) + "_") + y) + "_") + z].right_side);
}
return(undefined);
};
cube_game.prototype.clicked_before = function (x, y, z, side) {
var _local2 = this;
var _local3 = z;
var _local1 = 0;
while (_local1 < _local2.click_history.length) {
if ((((_local2.click_history[_local1][0] == x) && (_local2.click_history[_local1][1] == y)) && (_local2.click_history[_local1][2] == _local3)) && (_local2.click_history[_local1][3] == side)) {
return(true);
}
_local1++;
}
return(false);
};
cube_game.prototype.shaded = function (x, y, z, side) {
var _local2 = _root;
var _local3 = z;
var _local1;
if (side == "top") {
_local1 = _local2[(((("cube" + x) + "_") + y) + "_") + _local3].top_side._currentframe == 6;
} else if (side == "left") {
_local1 = _local2[(((("cube" + x) + "_") + y) + "_") + _local3].left_side._currentframe == 6;
} else {
_local1 = _local2[(((("cube" + x) + "_") + y) + "_") + _local3].right_side._currentframe == 6;
}
return(_local1);
};
cube_game.prototype.on_click = function (x, y, z, side) {
var _local1 = this;
var _local2 = z;
var _local3 = y;
var mc_color;
if (_local1.game_on) {
if (Key.isDown(17)) {
_root.prompts.x = x;
_root.prompts.y = _local3;
_root.prompts.z = _local2;
_local1.game_on = false;
_root.prompts.gotoAndStop("remove");
} else if (Key.isDown(18)) {
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2].active = false;
_root[(((("cube" + x) + "_") + _local3) + "_") + _local2]._visible = false;
_root.countRemoved++;
if (_root.countRemoved >= 27) {
_root.endGameFunction();
}
} else if ((((!_local1.clicked_before(x, _local3, _local2, side)) && (_local1.clickable(x, _local3, _local2, side))) && (_local1.current_word.length < _local1.largest_word)) && (!_local1.shaded(x, _local3, _local2, side))) {
_local1.click_history[_local1.current_num_clicks] = new Array(x, _local3, _local2, side);
if (_local1.current_word.length != (_local1.largest_word - 1)) {
_local1.show_clickable_sides(x, _local3, _local2, side);
} else {
_local1.reset_text_color();
}
_local1.click_times[x][_local3][_local2][_local1[side]]++;
_local1.add_letter(x, _local3, _local2, side);
_local1.determine_one_coloring(x, _local3, _local2);
_local1.display_current_letters();
}
}
};
cube_game.prototype.check_game_over = function () {
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 0;
while (_local2 < 3) {
var _local1 = 0;
while (_local1 < 3) {
if (_root[(((("cube" + _local3) + "_") + _local2) + "_") + _local1]._visible == true) {
return(0);
}
_local1++;
}
_local2++;
}
_local3++;
}
_root.endGameFunction();
return(undefined);
};
cube_game.prototype.remove_pieces = function () {
var _local1 = this;
_local1.last_removed_pieces = new Array();
var removed = false;
var total_removed = new Array();
var temp_remove = new Array();
var num_removed = 0;
var index = 0;
var _local2 = 0;
while (_local2 < _local1.click_history.length) {
x = _local1.click_history[_local2][0];
y = _local1.click_history[_local2][1];
z = _local1.click_history[_local2][2];
if (((_local1.click_times[x][y][z][0] == _local1.max_num_clicks) || (_local1.click_times[x][y][z][1] == _local1.max_num_clicks)) || ((_local1.click_times[x][y][z][2] == _local1.max_num_clicks) && (_root[(((("cube" + x) + "_") + y) + "_") + z].active))) {
_local1.last_removed_pieces[index] = (((("cube" + x) + "_") + y) + "_") + z;
index++;
temp_remove = new Array(x, y, z);
total_removed.push(temp_remove);
_root[(((("cube" + x) + "_") + y) + "_") + z]._visible = false;
_root[(((("cube" + x) + "_") + y) + "_") + z].active = false;
var _local3 = new Sound();
_local3.attachSound("block_removed");
_local3.start(0, 1);
}
_local2++;
}
if (index != 0) {
_local1.determine_all_shaded_sides();
}
};
cube_game.prototype.clickable = function (x, y, z, side) {
var _local2 = this;
var _local3 = z;
if (_local2.current_num_clicks > 0) {
var _local1 = 0;
while (_local1 < _local2.click_sides.length) {
if ((((_local2.click_sides[_local1][0] == x) && (_local2.click_sides[_local1][1] == y)) && (_local2.click_sides[_local1][2] == _local3)) && (_local2.click_sides[_local1][3] == side)) {
return(true);
}
_local1++;
}
return(false);
}
return(true);
};
cube_game.prototype.show_clickable_sides = function (x, y, z, side) {
var _local1 = this;
var _local2 = z;
var _local3 = y;
_local1.reset_text_color();
_local1.click_sides = new Array();
if (side == "top") {
_local1.click_sides[0] = new Array(x, _local3, _local2, "left");
_local1.click_sides[1] = new Array(x, _local3, _local2, "right");
_local1.click_sides[2] = new Array(x + 1, _local3, _local2, "top");
_local1.click_sides[3] = new Array(x + 1, _local3, _local2, "left");
_local1.click_sides[4] = new Array(x + 1, _local3, _local2 - 1, "top");
_local1.click_sides[5] = new Array(x + 1, _local3, _local2 - 1, "right");
_local1.click_sides[6] = new Array(x, _local3, _local2 - 1, "top");
_local1.click_sides[7] = new Array(x, _local3, _local2 - 1, "right");
_local1.click_sides[8] = new Array(x - 1, _local3, _local2 - 1, "top");
_local1.click_sides[9] = new Array(x - 1, _local3, _local2, "top");
_local1.click_sides[10] = new Array(x - 1, _local3, _local2, "left");
_local1.click_sides[11] = new Array(x - 1, _local3, _local2 + 1, "top");
_local1.click_sides[12] = new Array(x - 1, _local3, _local2 + 1, "left");
_local1.click_sides[13] = new Array(x, _local3, _local2 + 1, "top");
_local1.click_sides[14] = new Array(x, _local3, _local2 + 1, "right");
_local1.click_sides[15] = new Array(x + 1, _local3, _local2 + 1, "top");
_local1.click_sides[16] = new Array(x + 1, _local3 + 1, _local2, "right");
_local1.click_sides[17] = new Array(x + 1, _local3 + 1, _local2, "left");
_local1.click_sides[18] = new Array(x + 1, _local3 + 1, _local2 - 1, "right");
_local1.click_sides[19] = new Array(x - 1, _local3 + 1, _local2 + 1, "left");
_local1.click_sides[20] = new Array(x, _local3 + 1, _local2 + 1, "left");
_local1.click_sides[21] = new Array(x, _local3 + 1, _local2 + 1, "right");
_local1.click_sides[22] = new Array(x + 1, _local3 + 1, _local2 + 1, "left");
_local1.click_sides[23] = new Array(x + 1, _local3 + 1, _local2 + 1, "right");
} else if (side == "left") {
_local1.click_sides[0] = new Array(x, _local3, _local2, "top");
_local1.click_sides[1] = new Array(x, _local3, _local2, "right");
_local1.click_sides[2] = new Array(x + 1, _local3, _local2, "top");
_local1.click_sides[3] = new Array(x + 1, _local3, _local2, "left");
_local1.click_sides[4] = new Array(x + 1, _local3 - 1, _local2, "left");
_local1.click_sides[5] = new Array(x + 1, _local3 - 1, _local2, "top");
_local1.click_sides[6] = new Array(x, _local3 - 1, _local2, "left");
_local1.click_sides[7] = new Array(x, _local3 - 1, _local2, "right");
_local1.click_sides[8] = new Array(x - 1, _local3 - 1, _local2, "top");
_local1.click_sides[9] = new Array(x - 1, _local3 - 1, _local2, "left");
_local1.click_sides[10] = new Array(x - 1, _local3, _local2, "top");
_local1.click_sides[11] = new Array(x - 1, _local3, _local2, "left");
_local1.click_sides[12] = new Array(x - 1, _local3 + 1, _local2, "left");
_local1.click_sides[13] = new Array(x, _local3 + 1, _local2, "left");
_local1.click_sides[14] = new Array(x, _local3 + 1, _local2, "right");
_local1.click_sides[15] = new Array(x + 1, _local3 + 1, _local2, "left");
_local1.click_sides[16] = new Array(x + 1, _local3 + 1, _local2, "right");
_local1.click_sides[17] = new Array(x + 1, _local3, _local2 - 1, "top");
_local1.click_sides[18] = new Array(x + 1, _local3, _local2 - 1, "right");
_local1.click_sides[19] = new Array(x + 1, _local3 - 1, _local2 - 1, "top");
_local1.click_sides[20] = new Array(x + 1, _local3 - 1, _local2 - 1, "right");
_local1.click_sides[21] = new Array(x, _local3 - 1, _local2 - 1, "top");
_local1.click_sides[22] = new Array(x, _local3 - 1, _local2 - 1, "right");
_local1.click_sides[23] = new Array(x - 1, _local3 - 1, _local2 - 1, "top");
_local1.click_sides[24] = new Array(x - 1, _local3, _local2 - 1, "top");
_local1.click_sides[25] = new Array(x + 1, _local3 + 1, _local2 - 1, "right");
} else if (side == "right") {
_local1.click_sides[0] = new Array(x, _local3, _local2, "left");
_local1.click_sides[1] = new Array(x, _local3, _local2, "top");
_local1.click_sides[2] = new Array(x, _local3, _local2 - 1, "top");
_local1.click_sides[3] = new Array(x, _local3, _local2 - 1, "right");
_local1.click_sides[4] = new Array(x, _local3 - 1, _local2 - 1, "top");
_local1.click_sides[5] = new Array(x, _local3 - 1, _local2 - 1, "right");
_local1.click_sides[6] = new Array(x, _local3 - 1, _local2, "left");
_local1.click_sides[7] = new Array(x, _local3 - 1, _local2, "right");
_local1.click_sides[8] = new Array(x, _local3 - 1, _local2 + 1, "top");
_local1.click_sides[9] = new Array(x, _local3 - 1, _local2 + 1, "right");
_local1.click_sides[10] = new Array(x, _local3, _local2 + 1, "right");
_local1.click_sides[11] = new Array(x, _local3, _local2 + 1, "top");
_local1.click_sides[12] = new Array(x, _local3 + 1, _local2 + 1, "left");
_local1.click_sides[13] = new Array(x, _local3 + 1, _local2 + 1, "right");
_local1.click_sides[14] = new Array(x, _local3 + 1, _local2, "left");
_local1.click_sides[15] = new Array(x, _local3 + 1, _local2, "right");
_local1.click_sides[16] = new Array(x, _local3 + 1, _local2 - 1, "right");
_local1.click_sides[17] = new Array(x - 1, _local3, _local2 - 1, "top");
_local1.click_sides[18] = new Array(x - 1, _local3 - 1, _local2 - 1, "top");
_local1.click_sides[19] = new Array(x - 1, _local3 - 1, _local2, "top");
_local1.click_sides[20] = new Array(x - 1, _local3 - 1, _local2, "left");
_local1.click_sides[21] = new Array(x - 1, _local3 - 1, _local2 + 1, "top");
_local1.click_sides[22] = new Array(x - 1, _local3 - 1, _local2 + 1, "left");
_local1.click_sides[23] = new Array(x - 1, _local3, _local2 + 1, "top");
_local1.click_sides[24] = new Array(x - 1, _local3, _local2 + 1, "left");
_local1.click_sides[25] = new Array(x - 1, _local3 + 1, _local2 + 1, "left");
}
_local1.set_text_color();
};
cube_game.prototype.reset_text_color = function () {
var _local2 = this;
var _local3;
var _local1 = 0;
while (_local1 < _local2.click_sides.length) {
if (_local2.click_sides[_local1][3] == "top") {
_local3 = new Color(_root[(((("cube" + _local2.click_sides[_local1][0]) + "_") + _local2.click_sides[_local1][1]) + "_") + _local2.click_sides[_local1][2]].top_letter);
} else if (_local2.click_sides[_local1][3] == "right") {
_local3 = new Color(_root[(((("cube" + _local2.click_sides[_local1][0]) + "_") + _local2.click_sides[_local1][1]) + "_") + _local2.click_sides[_local1][2]].right_letter);
} else if (_local2.click_sides[_local1][3] == "left") {
_local3 = new Color(_root[(((("cube" + _local2.click_sides[_local1][0]) + "_") + _local2.click_sides[_local1][1]) + "_") + _local2.click_sides[_local1][2]].left_letter);
}
_local3.setRGB(_local2.normal_text_color);
_local1++;
}
};
cube_game.prototype.set_text_color = function (determine) {
var _local1 = this;
var mc_color;
var _local2 = 0;
while (_local2 < _local1.click_sides.length) {
if ((!_local1.clicked_before(_local1.click_sides[_local2][0], _local1.click_sides[_local2][1], _local1.click_sides[_local2][2], _local1.click_sides[_local2][3])) && (!_local1.shaded(_local1.click_sides[_local2][0], _local1.click_sides[_local2][1], _local1.click_sides[_local2][2], _local1.click_sides[_local2][3]))) {
if (_local1.click_sides[_local2][3] == "top") {
mc_color = new Color(_root[(((("cube" + _local1.click_sides[_local2][0]) + "_") + _local1.click_sides[_local2][1]) + "_") + _local1.click_sides[_local2][2]].top_letter);
} else if (_local1.click_sides[_local2][3] == "right") {
mc_color = new Color(_root[(((("cube" + _local1.click_sides[_local2][0]) + "_") + _local1.click_sides[_local2][1]) + "_") + _local1.click_sides[_local2][2]].right_letter);
} else if (_local1.click_sides[_local2][3] == "left") {
mc_color = new Color(_root[(((("cube" + _local1.click_sides[_local2][0]) + "_") + _local1.click_sides[_local2][1]) + "_") + _local1.click_sides[_local2][2]].left_letter);
}
mc_color.setRGB(_local1.clickable_text_color);
}
_local2++;
}
var _local3 = 0;
while (_local3 < _local1.click_history.length) {
if (_local1.click_history[_local3][3] == "top") {
mc_color = new Color(_root[(((("cube" + _local1.click_history[_local3][0]) + "_") + _local1.click_history[_local3][1]) + "_") + _local1.click_history[_local3][2]].top_letter);
} else if (_local1.click_history[_local3][3] == "left") {
mc_color = new Color(_root[(((("cube" + _local1.click_history[_local3][0]) + "_") + _local1.click_history[_local3][1]) + "_") + _local1.click_history[_local3][2]].left_letter);
} else {
mc_color = new Color(_root[(((("cube" + _local1.click_history[_local3][0]) + "_") + _local1.click_history[_local3][1]) + "_") + _local1.click_history[_local3][2]].right_letter);
}
mc_color.setRGB(_local1.selected_text_color);
_local3++;
}
};
cube_game.prototype.set_all_normal_color = function () {
var _local2;
var j = 0;
while (j <= 2) {
var _local3 = 0;
while (_local3 <= 2) {
var _local1 = 0;
while (_local1 <= 2) {
_local2 = new Color(_root[(((("cube" + j) + "_") + _local3) + "_") + _local1].top_letter);
_local2.setRGB(this.normal_text_color);
_local2 = new Color(_root[(((("cube" + j) + "_") + _local3) + "_") + _local1].left_letter);
_local2.setRGB(this.normal_text_color);
_local2 = new Color(_root[(((("cube" + j) + "_") + _local3) + "_") + _local1].right_letter);
_local2.setRGB(this.normal_text_color);
_local1++;
}
_local3++;
}
j++;
}
};
cube_game.prototype.set_score = function (num_letters) {
var _local1 = _root;
var _local2 = new Array(null, null, null, 100, 200, 300, 500, 800);
if (num_letters >= 10) {
_local1.score = Number(_local1.score) + 1000;
} else {
_local1.score = Number(_local1.score) + Number(_local2[num_letters]);
}
};
cube_game.prototype.add_letter = function (x, y, z, side) {
var _local1 = this;
_local1.current_word[_local1.current_num_clicks] = _local1.letter_information[x][y][z][_local1[side]];
_local1.current_num_clicks++;
};
cube_game.prototype.add_word = function () {
var _local3 = this;
var index = _local3.words.length;
var new_word = new String();
if (_local3.current_word.length >= _local3.smallest_word) {
var _local1 = 0;
while (_local1 < _local3.current_word.length) {
new_word = new_word + _local3.current_word[_local1];
_local1++;
}
if (!new_word.check_match(_local3.words)) {
if (_root.check_spelling(new_word.toLowerCase())) {
_local3.remove_pieces();
_local3.check_game_over();
_local3.words.unshift(new_word);
_local3.set_score(new_word.length);
_local3.current_word = new Array();
_local3.previous_click_history = new Array();
_local3.previous_click_history.copy(_local3.click_history);
_local3.click_history = new Array();
_local3.current_num_clicks = 0;
_local3.set_all_normal_color();
_local3.display_words_list();
_local3.display_current_letters();
if (!_local3.use_quiz) {
_root.timeKeeper.delta = _root.timeKeeper.delta + _local3.extra_time[new_word.length];
} else if (new_word.length >= 4) {
var question = _root.questions.pop();
_root.questions.unshift(question);
_root.quiz_prompt.question = question.text;
_local1 = 0;
while (_local1 < _root.num_choices_per_question) {
var _local2 = _root.quiz_prompt["choice" + _local1];
_local2.field = question.choices[_local1];
_local2.index = String.fromCharCode(65 + _local1);
_local2.correct = _local1 == question.answer;
_local2.word = new_word;
_local1++;
}
_root.quiz_prompt.play();
_root.timeKeeper.pause_timer();
}
var _sound = new Sound();
_sound.attachSound("word_in_dictionary");
_sound.start(0, 1);
} else {
_local3.game_on = false;
_root.prompts.gotoAndStop("noWord");
var _sound = new Sound();
_sound.attachSound("not_in_dictionary");
_sound.start(0, 1);
}
} else {
_local3.game_on = false;
_root.prompts.gotoAndStop("duplicate");
}
}
};
cube_game.prototype.check_valid_word = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.checkWordScore()) {
_local1.remove_pieces();
_local1.check_game_over();
_local1.words.unshift(_local2.currentword);
_local1.current_word = new Array();
_local1.previous_click_history = new Array();
_local1.previous_click_history.copy(_local1.click_history);
_local1.click_history = new Array();
_local1.current_num_clicks = 0;
_local1.set_all_normal_color();
_local1.display_words_list();
_local1.display_current_letters();
} else {
_local1.game_on = false;
_local2.prompts.gotoAndStop("noWord");
}
};
cube_game.prototype.take_away_last_letter = function (mode) {
var _local2 = this;
var _local1 = new Array();
var _local3;
if (_local2.current_num_clicks > 0) {
_local2.current_word.pop();
_local1 = _local2.click_history.pop();
_local2.click_times[_local1[0]][_local1[1]][_local1[2]][_local2[_local1[3]]]--;
_local2.determine_one_coloring(_local1[0], _local1[1], _local1[2]);
if (mode == "show sides") {
_local3 = _local2.click_history.length;
_local2.reset_text_color();
_local2.show_clickable_sides(_local2.click_history[_local3 - 1][0], _local2.click_history[_local3 - 1][1], _local2.click_history[_local3 - 1][2], _local2.click_history[_local3 - 1][3]);
if (_local3 == 0) {
if (_local1[3] == "top") {
mc_color = new Color(_root[(((("cube" + _local1[0]) + "_") + _local1[1]) + "_") + _local1[2]].top_letter);
} else if (_local1[3] == "left") {
mc_color = new Color(_root[(((("cube" + _local1[0]) + "_") + _local1[1]) + "_") + _local1[2]].left_letter);
} else {
mc_color = new Color(_root[(((("cube" + _local1[0]) + "_") + _local1[1]) + "_") + _local1[2]].right_letter);
}
mc_color.setRGB(_local2.normal_text_color);
}
}
_local2.current_num_clicks--;
}
_local2.display_current_letters();
if (mode == "no show sides") {
_local2.reset_text_color();
}
};
cube_game.prototype.take_away_last_word = function () {
var _local2 = this;
var len1 = _local2.previous_click_history.length;
var len2 = _local2.click_history.length;
var _local1 = new Array();
if (len1 != 0) {
if (_local2.words.length != 0) {
var _local3 = 0;
while (_local3 < _local2.last_removed_pieces.length) {
_root[_local2.last_removed_pieces[_local3]]._visible = true;
_root[_local2.last_removed_pieces[_local3]].active = true;
_local3++;
}
_local3 = 0;
while (_local3 < len1) {
_local1 = _local2.previous_click_history.pop();
_local2.click_times[_local1[0]][_local1[1]][_local1[2]][_local2[_local1[3]]]--;
_local2.determine_one_coloring(_local1[0], _local1[1], _local1[2]);
_local3++;
}
}
_local2.words.pop();
_local2.display_words_list();
}
};
cube_game.prototype.display_current_letters = function () {
_root.current_word_display = this.current_word.concat_to_string();
};
cube_game.prototype.display_words_list = function () {
var _local1 = this;
var line = 0;
_root.word_list1 = (_root.word_list2 = "");
_local1.sorted_words = new Array();
var j = _local1.smallest_word;
while (j <= _local1.largest_word) {
_local1.sorted_words[j] = new Array();
j++;
}
var k = 0;
while (k < _local1.words.length) {
_local1.sorted_words[_local1.words[k].length].push(_local1.words[k]);
k++;
}
var _local3 = _local1.smallest_word;
while (_local3 <= _local1.largest_word) {
if (_local1.sorted_words[_local3][0] != null) {
field = _local1.return_field(line);
_root[field] = _root[field] + ((("-" + _local3) + " Letters -") + newline);
line++;
var _local2 = 0;
while (_local2 < _local1.sorted_words[_local3].length) {
field = _local1.return_field(line);
_root[field] = _root[field] + ((" " + _local1.sorted_words[_local3][_local2]) + newline);
line++;
_local2++;
}
}
_local3++;
}
};
cube_game.prototype.return_field = function (n) {
var _local1 = n;
var _local2 = this;
if ((_local2.page == 1) && (_local1 < 21)) {
return("word_list1");
}
if (((_local2.page == 1) && (_local1 >= 21)) && (_local1 < 42)) {
return("word_list2");
}
if (((_local2.page == 2) && (_local1 >= 42)) && (_local1 < 63)) {
return("word_list1");
}
if (((_local2.page == 2) && (_local1 >= 63)) && (_local1 < 84)) {
return("word_list2");
}
return(undefined);
};
thesite = "";
error = -1;
gameid = 1002;
tableid = -1;
session_key = "";
data_string_array = "";
correctwords = "";
flashtimes = "";
finalflashtime = 0;
finalscore = 0;
players = 1;
testing = true;
this.distribution = "aaabbbcccdddeeefffggghhhiiijjkkllmmmnnnooopppqrrrssstttuvvwxyz";
this.data_string_array = "";
var j = 0;
while (j < 100) {
this.data_string_array = this.data_string_array + this.distribution.charAt(Math.floor(Math.random() * this.distribution.length));
j++;
}
data_string_array = data_string_array.toUpperCase();
Math.trans = 0.0174532925199433 /* Math.PI/180 */;
currentscore = 0;
score = currentscore;
wordScore = 10;
countRemoved = 0;
game = new cube_game(158, 343, -30, 45, 59.4);
game.create_game();
stop();
Instance of Symbol 102 MovieClip "cube" in Frame 5
onClipEvent (load) {
if (this._name == "cube") {
this._visible = false;
}
}
Instance of Symbol 135 MovieClip "timeKeeper" in Frame 5
onClipEvent (load) {
num_minutes = 5;
num_seconds = 0;
num_total_seconds = (num_minutes * 60) + num_seconds;
delta = getTimer();
this.pause_timer = function () {
this.paused = true;
this.paused_time = getTimer();
};
this.unpause_timer = function () {
this.paused = false;
delta = delta + (getTimer() - this.paused_time);
};
this.paused = false;
}
onClipEvent (enterFrame) {
if (!this.paused) {
time_left = Math.round(num_total_seconds - ((getTimer() - delta) / 1000));
_root.flashtime = time_left;
mins = Math.floor(time_left / 60);
secs = time_left % 60;
if (secs < 10) {
time_limit = ((mins + ":") + "0") + secs;
} else {
time_limit = (mins + ":") + secs;
}
if (mins < 0) {
time_limit = "0:00";
_root.endGameFunction(true);
}
}
}
Instance of Symbol 153 MovieClip "prompts" in Frame 5
onClipEvent (load) {
this.swapDepths(5000);
}
onClipEvent (keyDown) {
if (Key.isDown(16)) {
}
}
Instance of Symbol 167 MovieClip "quiz_prompt" in Frame 5
onClipEvent (load) {
this.swapDepths(16005);
}
Frame 6
this.stop();
Symbol 20 MovieClip Frame 1
stop();
Instance of Symbol 19 MovieClip "swfloader" in Symbol 20 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 30 MovieClip Frame 1
_root.dictionary_loaders = new Array();
var j = 0;
while (j < 26) {
var letter = String.fromCharCode(j + 97);
if (_root.preliminary_alphabet.join().indexOf(letter) != -1) {
_root.dictionary_loaders[j] = new LoadVars();
_root.dictionary_loaders[j].load(("Dictionary/dict" + letter) + ".txt");
}
j++;
}
_root.check_spelling = function (word) {
var _local2 = word.substr(0, 1);
var index = (_local2.charCodeAt(0) - 97);
var _local3 = _root.dictionary_loaders[index];
var _local1 = 0;
while (_local3[_local2 + _local1] != undefined) {
if (_local3[_local2 + _local1] == word) {
return(true);
}
_local1++;
}
return(false);
};
this.fill._width = 1;
this.onEnterFrame = function () {
var _local2 = _root;
var total = 0;
var _local1 = 0;
while (_local1 < 26) {
total = total + _local2.dictionary_loaders[_local1].getBytesTotal();
_local1++;
}
total = 720000 /* 0x0AFC80 */;
var loaded = 0;
_local1 = 0;
while (_local1 < 26) {
loaded = loaded + _local2.dictionary_loaders[_local1].getBytesLoaded();
_local1++;
}
if (loaded >= total) {
loaded = total;
}
this.fill._width = this.fill._width + ((((this.frame._width * loaded) / total) - this.fill._width) / 5);
var all_started = true;
_local1 = 0;
while (_local1 < 26) {
var _local3 = String.fromCharCode(_local1 + 97);
if ((_local2.preliminary_alphabet.join().indexOf(_local3) != -1) && (_local2.dictionary_loaders[_local1].getBytesLoaded() <= 0)) {
all_started = false;
}
_local1++;
}
if ((loaded >= total) && (all_started)) {
_local2.nextFrame();
}
};
stop();
Symbol 39 MovieClip Frame 1
_parent.stop();
Symbol 39 MovieClip Frame 65
stop();
_parent.play();
Symbol 45 Button
on (press) {
getURL ("http://www.urgames.com", "new");
}
Symbol 49 Button
on (press) {
getURL ("http://www.gamesforyourwebsite.com", "new");
}
Symbol 53 Button
on (press) {
getURL ("http://www.cheats2go.com", "new");
}
Symbol 57 Button
on (release) {
getURL ("http://www.urgames.com", "new");
}
Symbol 62 Button
on (press) {
this.nextFrame();
}
Symbol 70 Button
on (press) {
if (_parent.active) {
_parent._parent.game.on_click(_parent.j, _parent.k, _parent.s, "top");
}
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 79 Button
on (press) {
if (_parent.active) {
_parent._parent.game.on_click(_parent.j, _parent.k, _parent.s, "left");
}
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 88 Button
on (press) {
if (_parent.active) {
_parent._parent.game.on_click(_parent.j, _parent.k, _parent.s, "right");
}
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 108 Button
on (release) {
game.take_away_last_letter("show sides");
}
Symbol 113 Button
on (release) {
game.add_word();
}
Symbol 120 Button
on (press) {
_root.game.page = 2;
_root.game.display_words_list();
_root.pageMC.gotoAndPlay("page1");
}
Symbol 123 Button
on (press) {
_root.game.page = 1;
_root.game.display_words_list();
_root.pageMC.gotoAndPlay("page2");
}
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 2
stop();
Symbol 141 Button
on (release) {
this.gotoAndStop(1);
_parent.game.game_on = true;
var len = _parent.game.click_history.length;
var j = 0;
while (j < len) {
_parent.game.take_away_last_letter("no show sides");
j++;
}
_parent.game.set_all_normal_color();
}
Symbol 147 Button
on (release) {
this.gotoAndStop(1);
_parent.game.game_on = true;
_root[(((("cube" + x) + "_") + y) + "_") + z]._alpha = false;
_root[(((("cube" + x) + "_") + y) + "_") + z].active = false;
_root[(((("cube" + x) + "_") + y) + "_") + z].removeMovieClip();
_root.game.clicked_removed_pieces[_root.game.clicked_removed_pieces.length] = new Array(x, y, z);
var len = _parent.game.click_history.length;
var j = 0;
while (j < len) {
_parent.game.take_away_last_letter("no show sides");
j++;
}
_root.countRemoved++;
if (_root.countRemoved >= 27) {
_root.endGameFunction();
}
_parent.game.determine_all_shaded_sides();
_root.game.check_game_over();
var _sound = new Sound();
_sound.attachSound("block_removed");
_sound.start(0, 1);
}
Symbol 151 Button
on (release) {
this.gotoAndStop(1);
_parent.game.game_on = true;
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 11
_root.finished();
Symbol 157 Button
on (press) {
_parent._parent.evaluate_answer(this);
}
Symbol 167 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 4
stop();
Symbol 167 MovieClip Frame 46
_parent.answer_prompt_done(true);
this.gotoAndStop(2);
Symbol 167 MovieClip Frame 103
_parent.answer_prompt_done(false);
this.gotoAndStop(2);
Symbol 172 Button
on (release) {
if (hiddenmenuloaded == "yes") {
this.hiddenmenu_mc._visible = false;
hiddenmenuloaded = "no";
} else {
this.hiddenmenu_mc._visible = true;
hiddenmenuloaded = "yes";
}
}
Instance of Symbol 174 MovieClip "hiddenmenu_mc" in Symbol 175 MovieClip Frame 1
onClipEvent (load) {
var hiddenmenuloaded:String = "no";
this._visible = false;
}
Symbol 184 Button
on (press) {
_root.words = [];
_root.word_list1 = "";
_root.word_list2 = "";
this.gotoAndStop("Starting Screen");
}