Frame 1
MochiAd.showPreGameAd({id:"dfa4f75cd84270ae", res:"480x480", background:16763391, color:13404381, outline:4456516, no_bg:true});
mochi.MochiServices.connect("dfa4f75cd84270ae");
Frame 12
function make_new_array(width, height) {
var _local1 = new Array(width);
i = 0;
while (i < width) {
_local1[i] = new Array(height);
j = 0;
while (j < height) {
_local1[i][j] = 0;
j++;
}
i++;
}
return(_local1);
}
var grid_width = 7;
var grid_height = 8;
var round_over = 0;
var actual_score = 0;
var groups = 0;
var blown_up = false;
var timer_txt = 9;
var fired = false;
var start_level = 1;
var max_level_allowed = 9;
var game_mode = "basic";
var predictive = false;
var high_scores = new Array(0, 0, 0, 0, 0);
var i = 0;
var j = 0;
var required = 9;
var tile_grid = make_new_array(grid_width, grid_height);
var tile_multiple = make_new_array(grid_width, grid_height);
var tile_names = make_new_array(grid_width, grid_height);
var grid_check = make_new_array(grid_width, grid_height);
var star_grid = make_new_array(grid_width, grid_height);
var safe_to_click = true;
var num_tiles = 0;
var t_bonus_av = 0;
var score_av = 0;
var groups_av = 0;
var combo_av = 0;
var num_combos = 0;
var menu_val = 0;
var music_play = 0;
var sound_play = true;
var playing_game = false;
this.tune_sound = new Sound(music);
tune_sound.startTime = getTimer();
this.sound_group1 = new Sound();
this.sound_whoosh1 = new Sound();
this.sound_bomb1 = new Sound();
this.sound_level_up = new Sound();
this.sound_siren = new Sound();
this.sound_shoot = new Sound();
mus_button.onRelease = function () {
if (music_play == 0) {
music_play = 2;
mus_button.gotoAndStop("music_off");
if (playing_game == true) {
tune_sound.stop();
tune_sound.elapsedTime = getTimer() - tune_sound.startTime;
tune_sound.elapsedTime = tune_sound.elapsedTime % tune_sound.duration;
}
}
if (music_play == 1) {
music_play = 0;
mus_button.gotoAndStop("music_on");
if (playing_game == true) {
tune_sound.start(tune_sound.elapsedTime / 1000, 1);
tune_sound.startTime = getTimer() - tune_sound.elapsedTime;
}
}
if (music_play == 2) {
music_play = 1;
}
};
mus_button.onRollOver = function () {
safe_to_click = false;
};
mus_button.onRollOut = function () {
safe_to_click = true;
};
sound_button.onRelease = function () {
sound_play = !sound_play;
sound_button.gotoAndStop("sound_" + sound_play);
};
sound_button.onRollOver = function () {
safe_to_click = false;
};
sound_button.onRollOut = function () {
safe_to_click = true;
};
Frame 22
if (menu_val == 0) {
titles.playback_button._visible = false;
titles.playrecord_button._visible = false;
}
titles.level_selector._visible = true;
if (max_level_allowed == 1) {
titles.level_selector._visible = false;
}
Frame 35
stop();
game_mode = "not_chosen";
titles.enabled = true;
Frame 36
titles.play_button.enabled = true;
titles.timed_button.enabled = true;
titles.extended_button.enabled = true;
titles.how_to_button.enabled = true;
titles.arcade_leader_button.enabled = true;
titles.timed_leader_button.enabled = true;
titles.basic_leader_button.enabled = true;
titles.website.enabled = true;
if (game_mode == "not_chosen") {
gotoAndStop ("title_page");
}
Frame 72
required = 9;
stop();
playing_game = true;
var framerate = 0;
num_tiles = 0;
t_bonus_av = 0;
score_av = 0;
groups_av = 0;
combo_av = 0;
num_combos = 0;
safe_to_click = true;
required_tile.star_mum.gotoAndStop("start");
Instance of Symbol 410 MovieClip "controller" in Frame 72
onClipEvent (load) {
function getRandom() {
seed = (seed * 9301) + 49297;
seed = seed % 233280;
if (_parent.predictive == false) {
return(Math.random());
}
return(seed / 233280);
}
function RandomSeed(seed) {
if (seed != null) {
this.seed = seed;
} else {
this.seed = 0;
}
}
function create_power_up(power) {
if (power_list.length < 15) {
play_sound("power_up");
var _local6 = "p_up" + depth;
attachMovie("power_up", _local6, depth);
depth++;
this[_local6]._y = 11;
this[_local6]._x = 500;
this[_local6].gotoAndPlay(power);
this[_local6].xdest = 150 + (power_list.length * 16);
this[_local6].power_name = power;
power_list.push(_local6);
this[_local6].onEnterFrame = function () {
if (this._x > this.xdest) {
this._x = this._x + ((this.xdest - this._x) / 24);
}
if ((this._x - this.xdest) < 0.1) {
this._x = this.xdest;
}
};
this[_local6].onRollOver = function () {
_parent.safe_to_click = false;
this.power_background.gotoAndPlay("active");
};
this[_local6].onRollOut = function () {
_parent.safe_to_click = true;
this.power_background.gotoAndStop("default");
};
this[_local6].onRelease = function () {
if (okay_to_click == true) {
var _local3 = -1;
var _local4 = 0;
var _local5 = false;
while (_local5 == false) {
_local3++;
if (power_list[_local3] == this._name) {
_local5 = true;
}
if (_local3 > power_list.length) {
_local5 = true;
trace("didn't find");
}
}
_local4 = _local3;
while (_local4 < power_list.length) {
move_name = power_list[_local4];
_parent.controller[move_name].xdest = _parent.controller[move_name].xdest - 16;
_local4++;
}
_parent.safe_to_click = true;
power_list.splice(_local3, 1);
power_up_fired(this.power_name);
this.removeMovieClip();
}
};
}
}
function power_up_fired(power_up_name) {
switch (power_up_name) {
case "star" :
this[player_tile].star_mum.gotoAndStop("pulse");
star_in_tile = true;
break;
case "shoot" :
this[player_tile].gotoAndStop("value99");
game_status = 10;
power_selected = power_up_name;
break;
case "megashoot" :
this[player_tile].gotoAndStop("megashoot");
game_status = 10;
power_selected = power_up_name;
break;
case "row_up" :
this[player_tile].gotoAndStop("value99");
game_status = 10;
power_selected = power_up_name;
row_guide.p_up_box.gotoAndStop("row_col_up");
break;
case "col_up" :
this[player_tile].gotoAndStop("value99");
game_status = 10;
power_selected = power_up_name;
col_guide.p_up_box.gotoAndStop("row_col_up");
break;
case "col_blast" :
this[player_tile].gotoAndStop("value99");
game_status = 10;
power_selected = power_up_name;
col_guide.p_up_box.gotoAndStop("row_col_blast");
break;
case "row_blast" :
this[player_tile].gotoAndStop("value99");
game_status = 10;
power_selected = power_up_name;
row_guide.p_up_box.gotoAndStop("row_col_blast");
break;
case "hourglass" :
if (hourglass_time == 0) {
this.death_timer.gotoAndPlay("frozen");
this.death_timer.nearly = false;
}
hourglass_time = hourglass_time + 900;
break;
default :
trace("error: you've triggered a power up that doesn't exist");
}
}
function clear_arrays() {
i = 0;
while (i < _parent.grid_width) {
j = 0;
while (j < (_parent.grid_height + 1)) {
_parent.tile_grid[i][j] = 99;
_parent.tile_multiple[i][j] = "one";
_parent.tile_names[i][j] = "empty";
_parent.grid_check[i][j] = 0;
_parent.star_grid[i][j] = false;
j++;
}
_parent.tile_grid[i][_parent.grid_height] = 99;
i++;
}
}
function check_for_simple_sum(x_grid, y_grid, checking) {
var _local7 = _parent.required;
var _local14 = 0;
var _local12 = 0;
var _local11 = 0;
var _local15 = 0;
var _local6 = 1;
var _local5 = 1;
var _local3 = 0;
var _local4 = 0;
var _local2 = 0;
var _local8 = 0;
_local3 = x_grid;
_local5 = -1;
_local2 = 0;
_local8 = 0;
if (x_grid < 1) {
x_grid = 0;
_local14 = 0;
_local8 = 1;
}
while (_local8 == 0) {
while ((_local2 <= _local7) && ((_local3 - _local5) >= 0)) {
_local5++;
_local2 = _local2 + get_value(_local3 - _local5, y_grid);
if ((_local3 - _local5) < 0) {
_local5 = _local3 + 1;
_local8 = 1;
}
}
_local14 = (_local3 - _local5) + 1;
_local8 = 1;
}
_local3 = x_grid;
_local5 = 0;
_local2 = 0;
_local8 = 0;
if (x_grid > 5) {
x_grid = 6;
_local12 = 6;
_local8 = 1;
}
_local2 = _local2 + get_value(_local3 + _local5, y_grid);
while (_local8 == 0) {
while ((_local2 <= _local7) && ((_local3 + _local5) < _parent.grid_width)) {
_local5++;
_local2 = _local2 + get_value(_local3 + _local5, y_grid);
if ((_local3 + _local5) > 6) {
_local5 = (6 - _local3) + 1;
_local8 = 1;
}
}
_local8 = 1;
_local12 = (_local3 + _local5) - 1;
}
_local4 = y_grid;
_local6 = -1;
_local2 = 0;
_local8 = 0;
if (y_grid < 1) {
y_grid = 0;
_local15 = 0;
_local8 = 1;
}
while (_local8 == 0) {
while ((_local2 <= _local7) && ((_local4 - _local6) >= 0)) {
_local6++;
_local2 = _local2 + get_value(x_grid, _local4 - _local6);
if ((_local4 - _local6) < 0) {
_local6 = _local4 + 1;
_local8 = 1;
}
}
_local8 = 1;
_local15 = (_local4 - _local6) + 1;
}
_local4 = y_grid;
_local6 = 0;
_local2 = 0;
_local8 = 0;
if (y_grid > (_parent.grid_height - 3)) {
y_grid = _parent.grid_height - 2;
_local11 = _parent.grid_height - 2;
_local8 = 1;
}
while (_local8 == 0) {
while ((_local2 <= _local7) && ((_local4 + _local6) < (_parent.grid_height - 1))) {
_local6++;
_local2 = _local2 + get_value(x_grid, _local4 + _local6);
if ((_local4 + _local6) > 6) {
_local6 = (6 - _local4) + 1;
_local8 = 1;
}
}
_local8 = 1;
_local11 = (_local4 + _local6) - 1;
if (y_grid > 5) {
_local11 = 6;
}
}
_local3 = _local14;
_local5 = 1;
_local2 = 0;
_local8 = 0;
while (_local8 == 0) {
_local2 = get_value(_local3, y_grid);
while ((_local2 < _local7) && ((_local3 + _local5) <= _local12)) {
_local2 = _local2 + get_value(_local3 + _local5, y_grid);
_local5++;
}
if ((checking == true) && (_local2 == _local7)) {
delta_check = _parent.grid_check[_local3][y_grid];
is_the_same = true;
i = _local3;
while (i < (_local3 + _local5)) {
if (_parent.grid_check[i][y_grid] != delta_check) {
is_the_same = false;
}
i++;
}
if (is_the_same == true) {
_local2 = _local7 + 1;
}
}
if ((_local2 == _local7) && (checking == true)) {
stack_i = 0;
while (stack_i < check_stackx1.length) {
if (((_local3 == check_stackx1[stack_i]) && (y_grid == check_stacky1[stack_i])) && (((_local3 + _local5) - 1) == check_stackx2[stack_i])) {
_local2 = _local7 + 1;
}
stack_i++;
}
}
if (_local2 == _local7) {
i = _local3;
while (i < (_local3 + _local5)) {
increase_value(i, y_grid);
i++;
}
check_stackx1.unshift(_local3);
check_stackx2.unshift((_local3 + _local5) - 1);
check_stacky1.unshift(y_grid);
check_stacky2.unshift(y_grid);
show_match3("across", _local3, y_grid, _local5);
}
_local3++;
_local5 = 1;
if ((_local2 == 99) || (_local3 >= _local12)) {
_local8 = 1;
_local2 = 0;
}
}
_local4 = _local15;
_local6 = 1;
_local2 = 0;
_local8 = 0;
while (_local8 == 0) {
_local2 = get_value(x_grid, _local4);
while ((_local2 < _local7) && ((_local4 + _local6) <= _local11)) {
_local2 = _local2 + get_value(x_grid, _local4 + _local6);
_local6++;
}
if ((checking == true) && (_local2 == _local7)) {
delta_check = _parent.grid_check[x_grid][_local4];
is_the_same = true;
i = _local4;
while (i < (_local4 + _local6)) {
if (_parent.grid_check[x_grid][i] != delta_check) {
is_the_same = false;
}
i++;
}
if (is_the_same == true) {
_local2 = _local7 + 1;
}
}
if ((_local2 == _local7) && (checking == true)) {
stack_i = 0;
while (stack_i < check_stackx1.length) {
if (((_local4 == check_stacky1[stack_i]) && (x_grid == check_stackx1[stack_i])) && (((_local4 + _local6) - 1) == check_stacky2[stack_i])) {
_local2 = _local7 + 1;
}
stack_i++;
}
}
if (_local2 == _local7) {
i = _local4;
while (i < (_local4 + _local6)) {
increase_value(x_grid, i);
i++;
}
check_stackx1.unshift(x_grid);
check_stackx2.unshift(x_grid);
check_stacky1.unshift(_local4);
check_stacky2.unshift((_local4 + _local6) - 1);
show_match3("up", x_grid, _local4, _local6);
}
_local4++;
_local6 = 1;
if ((_local2 == 99) || (_local4 >= _local11)) {
_local8 = 1;
_local2 = 0;
}
}
}
function increase_value(xgrid, ygrid) {
mc_to_increase = _parent.tile_names[xgrid][ygrid];
switch (_parent.tile_multiple[xgrid][ygrid]) {
case "one" :
_parent.tile_multiple[xgrid][ygrid] = "three";
this[mc_to_increase].multiplier.gotoAndPlay("three");
break;
case "three" :
_parent.tile_multiple[xgrid][ygrid] = "four";
this[mc_to_increase].multiplier.gotoAndPlay("four");
break;
case "four" :
_parent.tile_multiple[xgrid][ygrid] = "five";
this[mc_to_increase].multiplier.gotoAndPlay("five");
break;
case "five" :
_parent.tile_multiple[xgrid][ygrid] = "boom";
this[mc_to_increase].multiplier.gotoAndPlay("five");
break;
case "boom" :
this[mc_to_increase].multiplier.gotoAndPlay("five");
_parent.tile_multiple[xgrid][ygrid] = "boom";
break;
default :
trace("this should never be read: you have a loose boom");
trace(_parent.tile_multiple);
}
}
function show_match3(direction_string, start_x, start_y, end_block) {
increase_score(end_block);
create_score_mc(direction_string, start_x, start_y, end_block);
timer_bonus = 1;
add_timer_bonus();
play_sound("group");
switch (direction_string) {
case "up" :
var _local1 = (start_x * tile_width) + grid_left;
var _local4 = grid_bottom - (start_y * tile_width);
var _local3 = _local4 - (end_block * tile_width);
show_match_group(_local1, _local3, tile_width, _local4 - _local3);
while (_local4 > _local3) {
create_flash_tile(_local1, _local4, end_block);
_local4 = _local4 - tile_width;
}
break;
case "across" :
_local1 = (start_x * tile_width) + grid_left;
var _local5 = _local1 + (end_block * tile_width);
_local4 = grid_bottom - (start_y * tile_width);
show_match_group(_local1, _local4 - tile_width, _local5 - _local1, tile_width);
while (_local1 < _local5) {
create_flash_tile(_local1, _local4, end_block);
_local1 = _local1 + tile_width;
}
break;
default :
trace("error in the information passed to this function");
}
}
function play_sound(sound_name) {
if (_parent.sound_play == true) {
switch (sound_name) {
case "boo" :
_parent.sound_level_up.attachSound("boo_sound");
_parent.sound_level_up.start();
break;
case "group" :
_parent.sound_group1.attachSound("group");
_parent.sound_group1.start();
_parent.sound_group1.setVolume(100);
break;
case "whoosh" :
_parent.sound_whoosh1.attachSound("combo");
if ((getTimer() - _parent.sound_whoosh1.start_timer) > _parent.sound_whoosh1.duration) {
_parent.sound_whoosh1.start();
_parent.sound_whoosh1.setVolume(100);
_parent.sound_whoosh1.start_timer = getTimer();
}
break;
case "click" :
_parent.sound_level_up.attachSound("click");
if ((getTimer() - _parent.sound_level_up.start_timer) > _parent.sound_level_up.duration) {
_parent.sound_level_up.start();
_parent.sound_level_up.start_timer = getTimer();
}
break;
case "power_up" :
_parent.sound_shoot.attachSound("power_up_sound");
_parent.sound_shoot.start();
break;
case "bomb" :
_parent.sound_bomb1.attachSound("bomb");
_parent.sound_bomb1.start();
break;
case "lev" :
_parent.sound_level_up.attachSound("level_up_sound");
_parent.sound_level_up.start();
break;
case "siren" :
_parent.sound_siren.attachSound("siren");
_parent.sound_siren.start(0, 3);
break;
case "shoot" :
_parent.sound_shoot.attachSound("zap");
_parent.sound_shoot.start();
break;
case "star" :
_parent.sound_shoot.attachSound("shoot");
_parent.sound_shoot.start();
break;
case "bubble" :
_parent.sound_level_up.attachSound("bubble");
_parent.sound_level_up.start();
break;
case "buzz" :
_parent.sound_level_up.attachSound("buzz");
_parent.sound_level_up.start();
break;
case "cheer" :
_parent.sound_bomb1.attachSound("cheer");
if ((getTimer() - _parent.sound_bomb1.start_timer) > _parent.sound_bomb1.duration) {
_parent.sound_bomb1.start();
_parent.sound_bomb1.start_timer = getTimer();
}
break;
case "cheer2" :
_parent.sound_siren.attachSound("cheer2");
if ((getTimer() - _parent.sound_siren.start_timer) > _parent.sound_siren.duration) {
_parent.sound_siren.start();
_parent.sound_siren.start_timer = getTimer();
}
break;
case "cheer3" :
_parent.sound_bomb1.attachSound("cheer3");
if ((getTimer() - _parent.sound_bomb1.start_timer) > _parent.sound_bomb1.duration) {
_parent.sound_bomb1.start();
_parent.sound_bomb1.start_timer = getTimer();
}
break;
}
}
}
function create_flash_tile(x1, y1, number) {
flash_tile = "flash_tile" + depth;
attachMovie("flashy_tile", flash_tile, depth);
switch (number) {
case 1 :
case 2 :
case 3 :
this[flash_tile].flash_tile_art.gotoAndStop("one");
break;
case 4 :
case 5 :
this[flash_tile].flash_tile_art.gotoAndStop("four");
break;
case 6 :
case 7 :
this[flash_tile].flash_tile_art.gotoAndStop("six");
break;
default :
trace("wrong number shown");
}
this[flash_tile]._x = x1;
this[flash_tile]._y = y1;
depth++;
}
function show_match_group(x1, y1, wd, ht) {
depth++;
match_tile = "match_tile" + depth;
attachMovie("match_show", match_tile, depth - 5000);
this[match_tile]._x = x1;
this[match_tile]._y = y1;
this[match_tile]._width = wd;
this[match_tile]._height = ht;
}
function create_score_mc(direction_string, start_x, start_y, end_block) {
var _local7 = ((end_block * end_block) * end_block) * end_block;
score_display = "tile_score" + (depth + 2000);
attachMovie("tile_score", score_display, depth + 2000);
score_up_text = "+" + _local7;
if (levl > 1) {
score_up_text = (("" + score_up_text) + " x") + levl;
}
this[score_display].tile_score_text.text = score_up_text;
switch (direction_string) {
case "up" :
var _local3 = (start_x * tile_width) + grid_left;
var _local5 = grid_bottom - (start_y * tile_width);
var _local4 = _local5 - (end_block * tile_width);
this[score_display]._x = _local3 + (tile_width / 2);
this[score_display]._y = _local4;
break;
case "across" :
_local3 = (start_x * tile_width) + grid_left;
var _local6 = _local3 + (end_block * tile_width);
_local5 = grid_bottom - (start_y * tile_width);
this[score_display]._x = (_local3 + _local6) / 2;
this[score_display]._y = _local5 - 56;
break;
default :
trace("error in the information passed to this function");
}
depth++;
}
function show_combo_score(val) {
combo_display = "combo_score" + depth;
attachMovie("combo_score", combo_display, depth + 250);
combo_text = "+" + val;
if (levl > 1) {
combo_text = combo_text + (" x" + levl);
}
this[combo_display].combo_score_text.text = combo_text;
this[combo_display]._x = grid_left;
this[combo_display]._y = grid_bottom + 10;
depth++;
var _local4 = _parent.combo_av * _parent.num_combos;
_parent.num_combos++;
_local4 = _local4 + val;
_parent.combo_av = _local4 / _parent.num_combos;
_parent.actual_score = _parent.actual_score + (val * levl);
if (val > 1000) {
play_sound("cheer");
}
}
function add_timer_bonus() {
var _local2 = _parent.timer_txt;
if (_parent.game_mode == "timed") {
_parent.actual_score = _parent.actual_score + (_local2 * _parent.groups);
}
}
function increase_score(tiles) {
_parent.groups++;
_parent.actual_score = _parent.actual_score + ((((tiles * tiles) * tiles) * tiles) * levl);
if (_parent.game_mode == "extended") {
switch (tiles) {
case 0 :
case 1 :
case 2 :
case 3 :
case 4 :
case 5 :
break;
case 6 :
create_power_up("hourglass");
break;
case 7 :
create_power_up("row_up");
break;
}
}
}
function get_value(xg, yg) {
var _local2 = _parent.tile_grid[xg][yg];
return(_local2);
}
function fill_next_array() {
i = 0;
while (i < 6) {
var _local2 = Math.floor(getRandom() * max_number) + 1;
if (((_local2 == max_number) && (max_number > 5)) && (_parent.game_mode == "timed")) {
_local2 = 99;
}
if ((_local2 > 6) && (_parent.game_mode == "basic")) {
_local2 = Math.floor(getRandom() * 4) + 1;
}
if (((_local2 > (max_number - 2)) && (max_number > 7)) && (_parent.game_mode == "timed")) {
_local2 = 99;
}
next_tile[i] = _local2;
star_count++;
star_tile[i] = false;
if (((star_count % 10) == 0) && (_parent.game_mode != "extended")) {
star_tile[i] = true;
}
i++;
}
}
function create_tile() {
var _local4 = next_tile.shift();
star_in_tile = star_tile.shift();
var _local5 = _root._xmouse;
player_tile = "tile" + depth;
attachMovie("numbers_tile", player_tile, depth);
depth++;
_local5 = Math.floor((_local5 - grid_left) / tile_width);
_local5 = (_local5 * tile_width) + grid_left;
if (_local5 < grid_left) {
_local5 = grid_left;
}
if (_local5 > (grid_left + (tile_width * 6))) {
_local5 = grid_left + (tile_width * 6);
}
if (_local4 != 99) {
this[player_tile]._x = _local5;
this[player_tile]._y = grid_top - 4;
}
this[player_tile].gotoAndStop("value" + _local4);
star_count++;
this[player_tile].star_mum.gotoAndStop("start");
if (_local4 == 99) {
game_status = 10;
star_count--;
}
this[player_tile].multiplier.gotoAndPlay("not_dropped");
if ((star_in_tile == true) && (_local4 != 99)) {
this[player_tile].star_mum.gotoAndStop("pulse");
}
play_tile_number = _local4;
tile_state = 0;
_local4 = Math.floor(getRandom() * max_number) + 1;
if ((_local4 > 6) && (_parent.game_mode == "basic")) {
_local4 = Math.floor(getRandom() * (_parent.required - 3)) + 1;
}
if (((_local4 == next_tile[4]) && (_parent.game_mode == "basic")) && (_local4 > 3)) {
_local4--;
}
if ((reticule_timer == 6) && (_parent.game_mode == "timed")) {
_local4 = 99;
}
reticule_timer++;
reticule_timer = reticule_timer % (levl + 4);
next_tile.push(_local4);
if ((((star_count % 10) == 0) && (_local4 != 99)) && (_parent.game_mode != "extended")) {
star_tile.push(true);
} else {
star_tile.push(false);
}
z = 0;
while (z < 6) {
z_tile_name = "next_tile_" + z;
_parent[z_tile_name].gotoAndStop("value" + next_tile[z]);
if (next_tile[z] == 99) {
_parent[z_tile_name].bomb.gotoAndPlay("rotate");
}
if ((star_tile[z] == true) && (next_tile[z] != 99)) {
_parent[z_tile_name].star_mum.gotoAndStop("pulse");
} else {
_parent[z_tile_name].star_mum.gotoAndStop("start");
}
z++;
}
_parent.required_tile.gotoAndStop("value" + _parent.required);
current_time = getTimer();
okay_to_click = true;
this.t_bonus._y = grid_bottom;
var _local6 = _parent.t_bonus_av * _parent.num_tiles;
_parent.num_tiles++;
_local6 = _local6 + _parent.timer_txt;
_parent.t_bonus_av = _local6 / _parent.num_tiles;
}
function move_mouse_tile() {
switch (game_status) {
case 1 :
var _local4 = _root._xmouse;
_local4 = Math.floor((_local4 - grid_left) / tile_width);
_local4 = (_local4 * tile_width) + grid_left;
if (_local4 < grid_left) {
_local4 = grid_left;
}
if (_local4 > (grid_left + (tile_width * 6))) {
_local4 = grid_left + (tile_width * 6);
}
this[player_tile]._x = _local4;
this[player_tile]._y = grid_top - 4;
if (row_guide_on == true) {
row_guide.gotoAndPlay("fade");
row_guide_on = false;
}
if (_local4 != old_xp) {
play_sound("click");
old_xp = _local4;
}
break;
case 2 :
var _local6 = false;
if (((this[player_tile]._y - grid_top) % tile_width) == 0) {
_local6 = check_array();
}
if (_local6 == false) {
this[player_tile]._y = this[player_tile]._y + tile_width;
}
if (_local6 == true) {
game_status = 3;
store_tile();
i = 0;
while (i < _parent.grid_width) {
j = 0;
while (j < (_parent.grid_height - 1)) {
if (_parent.tile_multiple[i][j] == "boom") {
game_status = 4;
}
j++;
}
i++;
}
}
break;
case 3 :
while (check_stackx1.length > 1) {
check_stackx1.shift();
check_stackx2.shift();
check_stacky1.shift();
check_stacky2.shift();
}
game_status = 1;
if (y_grid == (_parent.grid_height - 2)) {
are_we_done();
}
if ((_parent.round_over == 0) || (_parent.round_over > 4)) {
create_tile();
}
break;
case 4 :
_parent.blown_up = false;
bomb_clear();
combo_loop++;
if (combo_loop == 4) {
play_sound("cheer");
}
if (combo_loop == 5) {
play_sound("cheer2");
}
if (combo_loop > 5) {
play_sound("cheer3");
}
game_status = 5;
break;
case 5 :
if (_parent.blown_up == true) {
game_status = 6;
}
break;
case 6 :
lower_rows();
_parent.blown_up = false;
game_status = 7;
break;
case 7 :
game_status = 8;
check_i = 0;
while (check_i < _parent.grid_width) {
check_j = 0;
while (check_j < (_parent.grid_height - 1)) {
if ((_parent.grid_check[check_i][check_j] > 0) && (_parent.tile_names[check_i][check_j] != "empty")) {
check_for_simple_sum(check_i, check_j, true);
}
check_j++;
}
check_i++;
}
i = 0;
while (i < _parent.grid_width) {
j = 0;
while (j < (_parent.grid_height - 1)) {
if (_parent.tile_multiple[i][j] == "boom") {
game_status = 4;
}
j++;
}
i++;
}
break;
case 8 :
if (combo_stack.length > 1) {
play_sound("whoosh");
combo_bonus();
} else {
game_status = 9;
i = 0;
while (i < _parent.grid_width) {
j = 0;
while (j < _parent.grid_height) {
_parent.grid_check[i][j] = 0;
j++;
}
i++;
}
while (check_stackx1.length > 1) {
check_stackx1.shift();
check_stackx2.shift();
check_stacky1.shift();
check_stacky2.shift();
}
if (combo_score > 0) {
show_combo_score(combo_score);
}
}
break;
case 9 :
game_status = 3;
combo_score = 0;
combo_add = 30;
if (_parent.game_mode == "extended") {
if (combo_loop == 3) {
create_power_up("shoot");
}
if (combo_loop == 4) {
create_power_up("star");
}
if (combo_loop == 5) {
create_power_up("megashoot");
}
if (combo_loop == 6) {
create_power_up("col_up");
}
if (combo_loop == 7) {
create_power_up("col_blast");
}
if (combo_loop > 7) {
create_power_up("row_blast");
}
}
combo_loop = 0;
break;
case 10 :
align_blaster_tile();
if (row_guide_on == false) {
row_guide.gotoAndPlay("start");
row_guide_on = true;
}
_parent._fired = false;
break;
case 11 :
align_blaster_tile();
this[player_tile].bomb.gotoAndPlay("fired");
_parent.fired = false;
_local4 = _root._xmouse;
var _local5 = _root._ymouse;
_local4 = Math.floor((_local4 - grid_left) / tile_width);
if (_local4 < 0) {
_local4 = 0;
}
if (_local4 > 6) {
_local4 = 6;
}
_local5 = Math.floor((grid_bottom - _local5) / tile_width);
if (_local5 < 0) {
_local5 = 0;
}
if (_local5 > 6) {
_local5 = 6;
}
if ((_parent.tile_names[_local4][_local5] != "empty") && (_parent.game_mode == "timed")) {
increase_value(_local4, _local5);
}
if (_parent.game_mode == "extended") {
col_guide.p_up_box.gotoAndStop("dead");
row_guide.p_up_box.gotoAndStop("dead");
switch (power_selected) {
case "shoot" :
if (_parent.tile_names[_local4][_local5] != "empty") {
increase_value(_local4, _local5);
}
break;
case "megashoot" :
if (_parent.tile_names[_local4][_local5] != "empty") {
mc_to_increase = _parent.tile_names[_local4][_local5];
_parent.tile_multiple[_local4][_local5] = "boom";
this[mc_to_increase].multiplier.gotoAndPlay("five");
}
break;
case "row_up" :
zap_i = 0;
while (zap_i < _parent.grid_width) {
if (_parent.tile_names[zap_i][_local5] != "empty") {
increase_value(zap_i, _local5);
}
zap_i++;
}
show_match_group(grid_left, (grid_bottom - tile_width) - (_local5 * tile_width), tile_width * 7, tile_width);
play_sound("group");
break;
case "col_up" :
zap_i = 0;
while (zap_i < (_parent.grid_height - 1)) {
if (_parent.tile_names[_local4][zap_i] != "empty") {
increase_value(_local4, zap_i);
}
zap_i++;
}
show_match_group((_local4 * tile_width) + grid_left, grid_top, tile_width, tile_width * 7);
play_sound("group");
break;
case "col_blast" :
zap_i = 0;
while (zap_i < (_parent.grid_height - 1)) {
if (_parent.tile_names[_local4][zap_i] != "empty") {
mc_to_increase = _parent.tile_names[_local4][zap_i];
_parent.tile_multiple[_local4][zap_i] = "boom";
this[mc_to_increase].multiplier.gotoAndPlay("five");
}
zap_i++;
}
show_match_group((_local4 * tile_width) + grid_left, grid_top, tile_width, tile_width * 7);
break;
case "row_blast" :
zap_i = 0;
while (zap_i < _parent.grid_width) {
if (_parent.tile_names[zap_i][_local5] != "empty") {
mc_to_increase = _parent.tile_names[zap_i][_local5];
_parent.tile_multiple[zap_i][_local5] = "boom";
this[mc_to_increase].multiplier.gotoAndPlay("five");
}
zap_i++;
}
show_match_group(grid_left, (grid_bottom - tile_width) - (_local5 * tile_width), tile_width * 7, tile_width);
}
}
game_status = 12;
play_sound("shoot");
break;
case 12 :
if (_parent.fired == true) {
game_status = 13;
}
break;
case 13 :
game_status = 7;
}
}
function align_blaster_tile() {
var _local4 = _root._xmouse - 32;
var _local3 = _root._ymouse + 32;
if (_local4 < grid_left) {
_local4 = grid_left;
}
if (_local4 > (grid_left + (tile_width * 6))) {
_local4 = grid_left + (tile_width * 6);
}
if (_local3 > grid_bottom) {
_local3 = grid_bottom;
}
if (_local3 < (grid_bottom - (tile_width * 6))) {
_local3 = grid_bottom - (tile_width * 6);
}
this[player_tile]._x = _local4;
this[player_tile]._y = _local3;
var _local6 = Math.floor((_local4 - grid_left) / tile_width);
var _local5 = Math.floor((grid_bottom - _local3) / tile_width);
if ((_local6 != old_xp) || (_local5 != old_yp)) {
play_sound("click");
old_xp = _local6;
old_yp = _local5;
}
}
function wait(time) {
var _local1 = getTimer() + (time * 1000);
do {
var now = getTimer();
} while (now < _local1);
}
function get_grid_position() {
x_grid = this[player_tile]._x;
y_grid = this[player_tile]._y;
x_grid = (x_grid - grid_left) / tile_width;
y_grid = (grid_bottom - y_grid) / tile_width;
x_grid = Math.floor(x_grid);
y_grid = Math.floor(y_grid);
}
function store_tile() {
if (y_grid < (_parent.grid_height - 1)) {
_parent.tile_grid[x_grid][y_grid] = play_tile_number;
_parent.tile_multiple[x_grid][y_grid] = "one";
var _local3 = "place_tile" + depth;
duplicateMovieClip (this[player_tile], _local3, depth);
this[_local3].gotoAndStop("value" + play_tile_number);
this[_local3].star_mum.gotoAndStop("start");
if (star_in_tile == true) {
this[_local3].star_mum.gotoAndStop("pulse");
_parent.star_grid[x_grid][y_grid] = true;
}
_parent.tile_names[x_grid][y_grid] = _local3;
depth++;
removeMovieClip(this[player_tile]);
check_for_simple_sum(x_grid, y_grid, false);
} else {
_parent.round_over = 1;
match_x = 0;
match_y = 0;
}
}
function are_we_done() {
var _local3 = 0;
var _local2 = 0;
i = 0;
while (i < _parent.grid_width) {
_local2 = _parent.tile_grid[i][_parent.grid_height - 2];
if (_local2 == 99) {
_local3 = 1;
}
i++;
}
if (_local3 == 0) {
_parent.round_over = 1;
}
}
function check_array() {
var _local4 = true;
var _local3 = 0;
var _local6 = Math.floor(this[player_tile]._x);
var _local5 = Math.floor(this[player_tile]._y);
get_grid_position();
if (y_grid > (_parent.grid_height - 1)) {
return(true);
}
_local3 = _parent.tile_grid[x_grid][y_grid - 1];
if (_local3 == 99) {
_local4 = false;
}
return(_local4);
}
function update_score() {
if ((_parent.actual_score - display_score) > 200) {
display_score = display_score + 99;
}
if ((_parent.actual_score - display_score) > 100) {
display_score = display_score + 16;
}
if ((_parent.actual_score - display_score) > 25) {
display_score = display_score + 3;
}
if (display_score < _parent.actual_score) {
display_score++;
}
if (display_score > _parent.actual_score) {
display_score = _parent.actual_score;
}
_parent.game_score.text = display_score;
_parent.group_score.text = "x" + (_parent.groups + 1);
}
function calculate_high_scores() {
var _local2 = 0;
while (_local2 < _parent.high_scores.length) {
this_score = _parent.high_scores[_local2];
if (_parent.actual_score > this_score) {
_parent.high_scores.splice(_local2, 0, _parent.actual_score);
_local2 = _parent.high_scores.length;
_parent.high_scores.length--;
}
_local2++;
}
_parent.round_over = 3;
_parent.score_av = _parent.actual_score / _parent.num_tiles;
_parent.groups_av = _parent.groups / _parent.num_tiles;
}
function clear_board() {
this[player_tile].multiplier.gotoAndPlay("end");
i = 0;
while (i < _parent.grid_width) {
j = 0;
while (j < _parent.grid_height) {
mc_to_destroy = _parent.tile_names[i][j];
this[mc_to_destroy].multiplier.gotoAndPlay("end");
j++;
}
i++;
}
}
function game_over() {
this._rotation = 0;
depth++;
attachMovie("game_over", "g_o_name", depth);
g_o_name._x = 216;
g_o_name._y = 316;
play_sound("boo");
_parent.tune_sound.stop();
while (next_level_stack.length > 1) {
remove_nxt_level_blob();
}
_parent.round_over = 4;
}
function bomb_clear() {
var _local3 = false;
i1 = 0;
while (i1 < _parent.grid_width) {
j1 = 0;
while (j1 < (_parent.grid_height - 1)) {
if (_parent.tile_multiple[i1][j1] == "boom") {
add_combo_blob();
mc_to_destroy = _parent.tile_names[i1][j1];
this[mc_to_destroy].multiplier.gotoAndPlay("nova");
play_sound("bomb");
if (_parent.star_grid[i1][j1] == true) {
depth++;
new_star = "star" + depth;
attachMovie("star_dad", new_star, depth);
depth++;
this[new_star].star_baby.gotoAndPlay("fly_away");
this[new_star].star_baby._x = this[mc_to_destroy]._x + 24;
this[new_star].star_baby._y = this[mc_to_destroy]._y - 24;
this[new_star].star_baby.x_dest = star_x_dest;
if (star_x_dest > 56) {
star_x_dest = star_x_dest - 20;
}
}
combo_stacky.unshift(j1);
combo_stackx.unshift(i1);
remove_nxt_level_blob();
}
j1++;
}
i1++;
}
}
function add_combo_blob() {
var _local2 = (combo_stack.length * 16) + 32;
if (_local2 > ((grid_left - 16) + (tile_width * 7))) {
_local2 = (grid_left - 16) + (tile_width * 7);
}
combo_name = "combo_blob" + combo_stack.length;
combo_stack.push(combo_name);
attachMovie("combo_blob", combo_name, depth);
this[combo_name]._x = _local2;
this[combo_name]._y = grid_bottom + 16;
depth++;
}
function combo_bonus() {
mc_to_kill = combo_stack[combo_stack.length - 1];
this[mc_to_kill].gotoAndPlay("explode");
combo_score = combo_score + combo_add;
combo_add = combo_add + 20;
combo_stack.pop();
}
function lower_rows() {
i = 0;
while (i < _parent.grid_width) {
j = 0;
while (j < _parent.grid_height) {
_parent.grid_check[i][j] = 0;
j++;
}
i++;
}
while (check_stackx1.length > 1) {
check_stackx1.shift();
check_stackx2.shift();
check_stacky1.shift();
check_stacky2.shift();
}
while (combo_stacky.length > 1) {
row = combo_stacky[0];
col = combo_stackx[0];
j = row;
while (j < (_parent.grid_height - 1)) {
if (_parent.tile_names[col][j + 1] != "empty") {
mc_to_move = _parent.tile_names[col][j + 1];
this[mc_to_move]._y = this[mc_to_move]._y + tile_width;
_parent.grid_check[col][j + 1]++;
}
j++;
}
_parent.tile_multiple[col].splice(row, 1);
_parent.tile_grid[col].splice(row, 1);
_parent.tile_names[col].splice(row, 1);
_parent.grid_check[col].splice(row, 1);
_parent.star_grid[col].splice(row, 1);
_parent.tile_multiple[col][_parent.grid_height] = "one";
_parent.tile_grid[col][_parent.grid_height] = 99;
_parent.tile_names[col][_parent.grid_height] = "empty";
_parent.grid_check[col][_parent.grid_height] = 0;
_parent.star_grid[col][_parent.grid_height] = false;
combo_stacky.shift();
combo_stackx.shift();
}
}
function nxt_level(total) {
var _local4 = 402;
var _local3 = 312;
var _local2 = 8;
depth++;
i = 0;
while (i < total) {
x_pos = _local4 + ((i % _local2) * 8);
y_pos = _local3 + (Math.floor(i / _local2) * 8);
mc_name = ("next_level" + (levl * 100)) + i;
_parent.attachMovie("next_level", mc_name, depth);
_parent[mc_name]._x = x_pos;
_parent[mc_name]._y = y_pos;
depth++;
next_level_stack.push(mc_name);
i++;
}
}
function remove_nxt_level_blob() {
mc_to_kill = next_level_stack[next_level_stack.length - 1];
_parent[mc_to_kill].gotoAndPlay("remove");
next_level_stack.pop();
if (((next_level_stack.length == 1) && (_parent.round_over != 1)) && (_parent.round_over != 2)) {
levl++;
max_number++;
if (_parent.game_mode != "basic") {
if (max_number == 7) {
increase_required(11);
}
if (max_number == 9) {
increase_required(15);
}
if (max_number == 13) {
increase_required(19);
}
}
if ((_parent.game_mode == "basic") && (max_number > 7)) {
max_number = 7;
}
if (max_number > 14) {
max_number == 14;
}
nxt_lvl = levl * 16;
if (nxt_lvl > 120) {
nxt_lvl = 120;
}
depth++;
attachMovie("level_up", "level_up_notice", depth);
level_up_notice._x = grid_left + ((tile_width * 7) / 2);
level_up_notice._y = grid_bottom - ((tile_width * 7) / 2);
play_sound("lev");
nxt_level(nxt_lvl);
if (_parent.game_mode == "extended") {
this.death_timer._y = grid_bottom;
this.death_timer.nearly = false;
if (hourglass_time == 0) {
this.death_timer.gotoAndStop("default");
}
}
}
}
function increase_required(val) {
_parent.required = val;
change_round = true;
updateAfterEvent();
seed = 111;
star_count = 8;
if (levl > _parent.max_level_allowed) {
_parent.max_level_allowed = levl;
}
}
function move_timer_bonus() {
y_pos = this.t_bonus._y;
if (y_pos > grid_top) {
if (_parent.game_mode != "timed") {
this.t_bonus._y = this.t_bonus._y - (0.6 + (levl * 0.1));
}
if (_parent.game_mode == "timed") {
this.t_bonus._y = this.t_bonus._y - (1.2 + (levl * 0.3));
}
if (this.t_bonus._y <= grid_top) {
if (_parent.game_mode == "timed") {
if (game_status == 1) {
okay_to_click = false;
game_status = 2;
play_sound("buzz");
this[player_tile]._y = grid_top;
this[player_tile].multiplier.gotoAndPlay("one");
}
if (game_status == 10) {
game_status = 11;
okay_to_click = false;
}
}
this.t_bonus._y = grid_top;
}
}
_parent.timer_txt = Math.floor(((y_pos - grid_top) / (grid_bottom - grid_top)) * 10);
_parent.timer_txt = Math.min(_parent.timer_txt, 9);
}
function move_death_timer() {
if (hourglass_time == 0) {
this.death_timer._y = this.death_timer._y - (0.02 + (levl * 0.004));
if (this.death_timer._y < grid_top) {
_parent.round_over = 1;
}
if ((this.death_timer._y < (grid_top + 64)) && (this.death_timer.nearly == false)) {
this.death_timer.gotoAndPlay("close");
this.death_timer.nearly = true;
}
}
if (hourglass_time > 0) {
hourglass_time--;
if (hourglass_time == 0) {
this.death_timer.gotoAndPlay("thaw");
this.death_timer.nearly = false;
}
}
}
function row_help() {
var _local2 = _root._ymouse;
_local2 = Math.floor((grid_bottom - _local2) / tile_width);
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 6) {
_local2 = 6;
}
row_guide._x = grid_left;
row_guide._y = grid_bottom - (_local2 * tile_width);
}
function col_help() {
var _local2 = _root._xmouse;
_local2 = Math.floor((_local2 - grid_left) / tile_width);
_local2 = (_local2 * tile_width) + grid_left;
if (_local2 < grid_left) {
_local2 = grid_left;
}
if (_local2 > (grid_left + (tile_width * 6))) {
_local2 = grid_left + (tile_width * 6);
}
col_guide._x = _local2;
col_guide._y = grid_bottom;
}
function set_up_start() {
levl = _parent.start_level;
nxt_lvl = levl * 16;
}
function calc_star_bonus() {
var _local4 = 0;
var _local3 = 50;
star_timer++;
if (star_dead_timer > 1) {
star_dead_timer--;
}
rotate = star_timer / 40;
if (rotate < 1) {
rotate = 1;
}
rot = rot + rotate;
rot = rot % 360;
if (star_dead_timer == 1) {
if (star_bonus > 0) {
if (_parent.game_mode == "extended") {
if (star_bonus == 3) {
create_power_up("shoot");
}
if (star_bonus == 4) {
create_power_up("megashoot");
}
if (star_bonus == 5) {
create_power_up("col_up");
}
if (star_bonus == 6) {
create_power_up("hourglass");
}
if (star_bonus == 7) {
create_power_up("row_blast");
}
if (star_bonus > 7) {
create_power_up("col_blast");
}
}
while (star_bonus > 0) {
_local4 = _local4 + _local3;
_local3 = _local3 + 50;
star_bonus--;
}
combo_display = "combo_score" + depth;
attachMovie("star_bonus_text", combo_display, depth + 250);
combo_text = "+" + _local4;
if (levl > 1) {
combo_text = combo_text + (" x" + levl);
}
this[combo_display].star_text.text = combo_text;
this[combo_display]._x = grid_left;
this[combo_display]._y = 20;
depth++;
_parent.actual_score = _parent.actual_score + (_local4 * levl);
play_sound("whoosh");
if (_local4 > 500) {
play_sound("cheer2");
}
}
}
}
function unpause_game() {
pause_rotation = pause_rotation + ((pause_rot_final - pause_rotation) / 10);
this._rotation = pause_rotation;
if (pause_rotation < 0.1) {
this._rotation = 0;
pause_rotation = 0;
pause_status = 0;
}
}
function pause_game() {
pause_rotation = pause_rotation + ((pause_rot_final - pause_rotation) / 10);
this._rotation = pause_rotation;
if (pause_rotation > 89.9) {
this._rotation = 90;
pause_rotation = 90;
pause_status = 0;
}
}
var play_tile_number = 0;
var seed = 111;
var depth = 6000;
var tile_state = 0;
var drop_tile = 0;
var player_tile = "";
var x_grid = 0;
var y_grid = 0;
var y_vel = 2;
var old_xp = 0;
var old_yp = 0;
this.createEmptyMovieClip("line_draw_mc", 100000);
var display_score = 0;
var next_tile = new Array(6);
var star_tile = new Array(6);
var current_time = 0;
var new_time = 0;
var timer_bonus = 0;
var match_x = 0;
var match_y = 0;
var total_matches = 0;
var tile_width = 48;
var game_status = 1;
var combo_stackx = new Array(1);
var combo_stacky = new Array(1);
var check_stackx1 = new Array(1);
var check_stacky1 = new Array(1);
var check_stackx2 = new Array(1);
var check_stacky2 = new Array(1);
var max_number = 4;
var combo_stack = new Array(1);
var combo_score = 0;
var combo_add = 30;
var next_level_stack = new Array(1);
var nxt_lvl = 8;
levl = 1;
var change_round = false;
var star_count = 8;
var star_x_dest = 376;
var star_bonus = 0;
var star_timer = 0;
var star_dead_timer = 0;
var rotate = 0;
var rot = 0;
var combo_loop = 0;
var val = 1;
var power_list = new Array(0);
var power_selected = "none";
var hourglass_time = 0;
var player_dead = false;
Randomseed(seed);
var grid_left = 48;
var grid_bottom = 432;
var grid_top = 96;
var row_guide_on = false;
_parent.groups = 0;
_parent.actual_score = 0;
display_score = 0;
combo_stackx[0] = "finished";
combo_stacky[0] = "finished";
_parent.round_over = 5;
_parent.required_tile.multiplier.gotoAndPlay("multiple_up");
var game_paused = 0;
var pause_round = 0;
var pause_rotation = 0;
var pause_rot_final = 90;
var pause_status = 0;
var reticule_timer = 0;
game_status = 1;
required_flash = 0;
required_flash_timer = 0;
set_up_start();
clear_arrays();
fill_next_array();
nxt_level(nxt_lvl);
create_tile();
this[player_tile]._alpha = 25;
attachMovie("grid_box", "col_guide", depth - 600);
attachMovie("grid_box", "row_guide", depth - 601);
attachMovie("timer_bonus", "t_bonus", 31000);
attachMovie("d_timer", "death_timer", 31001);
this.t_bonus._x = 6;
this.death_timer._x = 40;
this.t_bonus._y = grid_bottom;
col_guide._height = tile_width * 8;
row_guide._width = tile_width * 7;
row_guide.gotoAndStop("dead");
col_guide.p_up_box.gotoAndStop("dead");
row_guide.p_up_box.gotoAndStop("dead");
row_help();
col_help();
var okay_to_click = false;
_parent.tune_sound.attachSound("main_tune");
_parent.tune_sound.setVolume(40);
_parent.tune_sound.elapsedTime = 0;
if (_parent.music_play == 0) {
_parent.tune_sound.start(0, 1);
_parent.tune_sound.startTime = getTimer();
}
play_sound("siren");
_parent.sound_whoosh1.start_timer = 0;
_parent.sound_level_up.start_timer = 0;
_parent.sound_bomb1.start_timer = 0;
_parent.sound_siren.start_timer = 0;
if (_parent.game_mode == "extended") {
this.death_timer._y = grid_bottom;
this.death_timer.nearly = false;
this.t_bonus._alpha = 0;
}
if (_parent.game_mode == "basic") {
this.death_timer._visible = false;
this.t_bonus._alpha = 0;
}
if (_parent.game_mode == "timed") {
this.death_timer._visible = false;
}
this._rotation = 0;
this._xscale = 100;
this._yscale = 100;
}
onClipEvent (enterFrame) {
if (((getTimer() - _parent.tune_sound.startTime) > _parent.tune_sound.duration) && (_parent.music_play == 0)) {
_parent.tune_sound.start(0, 1);
_parent.tune_sound.startTime = getTimer();
}
update_score();
if (player_dead == false) {
row_help();
col_help();
if (_parent.round_over < 8) {
calc_star_bonus();
}
if (((Key.isDown(112) || (Key.isDown(80))) && (game_paused == 0)) && (_parent.round_over == 0)) {
pause_round = _parent.round_over;
_parent.round_over = 8;
_parent.safe_to_click = false;
pause_rot_final = 90;
pause_status = 1;
game_paused = 1;
}
if (((!Key.isDown(112)) && (!Key.isDown(80))) && (game_paused == 1)) {
game_paused = 2;
}
if ((Key.isDown(112) || (Key.isDown(80))) && (game_paused == 2)) {
_parent.round_over = pause_round;
_parent.safe_to_click = true;
pause_rot_final = 0;
pause_status = 2;
game_paused = 3;
}
if (((!Key.isDown(112)) && (!Key.isDown(80))) && (game_paused == 3)) {
game_paused = 0;
}
if (pause_status == 1) {
pause_game();
}
if (pause_status == 2) {
unpause_game();
}
depth = depth % 30000;
}
switch (_parent.round_over) {
case 0 :
if (change_round == false) {
move_mouse_tile();
move_timer_bonus();
} else {
_parent.round_over = 7;
_parent.required_tile.multiplier.gotoAndPlay("multiple_up");
play_sound("siren");
}
if (_parent.game_mode == "extended") {
move_death_timer();
}
break;
case 1 :
col_guide.gotoAndPlay("fade");
clear_board();
_parent.round_over = 2;
player_dead = true;
this.death_timer._visible = false;
this.t_bonus._alpha = 0;
break;
case 2 :
game_over();
_parent.round_over = 3;
break;
case 3 :
break;
case 4 :
calculate_high_scores();
_parent.gotoAndPlay("scores");
_parent.round_over = 8;
break;
case 5 :
move_mouse_tile();
this[player_tile]._alpha = 25;
_parent.required_tile._x = 192;
_parent.required_text._x = 181;
required_flash_timer++;
if (required_flash_timer > 75) {
_parent.round_over = 6;
required_flash_timer = 0;
}
if (required_flash_timer > 30) {
_parent.required_tile.gotoAndStop("value" + _parent.required);
}
break;
case 6 :
move_mouse_tile();
if (_parent.required_tile._x < 411) {
_parent.required_tile._x = _parent.required_tile._x + 30;
}
if (_parent.required_text._x < 402) {
_parent.required_text._x = _parent.required_text._x + 50;
}
if (_parent.required_tile._x > 411) {
_parent.required_tile._x = 411;
}
if (_parent.required_text._x > 402) {
_parent.required_text._x = 402;
}
if ((_parent.required_tile._x == 411) && (_parent.required_text._x == 402)) {
required_flash_timer++;
}
if (required_flash_timer > 20) {
required_flash_timer = 0;
_parent.round_over = 0;
okay_to_click = true;
_parent.required_tile.multiplier.gotoAndStop("required");
this[player_tile]._alpha = 100;
change_round = false;
}
break;
case 7 :
this[player_tile]._alpha = 25;
move_mouse_tile();
if (_parent.required_tile._x > 192) {
_parent.required_tile._x = _parent.required_tile._x - 50;
}
if (_parent.required_text._x > 181) {
_parent.required_text._x = _parent.required_text._x - 30;
}
if (_parent.required_tile._x < 192) {
_parent.required_tile._x = 192;
}
if (_parent.required_text._x < 181) {
_parent.required_text._x = 181;
}
if ((_parent.required_tile._x == 192) && (_parent.required_text._x == 181)) {
_parent.round_over = 5;
_parent.required_tile.multiplier.gotoAndPlay("multiple_up");
}
updateAfterEvent();
break;
case 8 :
break;
default :
trace("you should never get here!");
}
}
onClipEvent (mouseUp) {
if ((_parent.safe_to_click == true) && (okay_to_click == true)) {
if ((game_status == 1) && (_parent.round_over == 0)) {
var x_posn = Math.floor(this[player_tile]._x);
var y_posn = grid_top;
get_grid_position();
if (_parent.tile_grid[x_grid][_parent.grid_height - 2] != 99) {
play_sound("buzz");
} else {
game_status = 2;
this[player_tile]._y = grid_top;
this[player_tile].multiplier.gotoAndPlay("one");
okay_to_click = false;
play_sound("bubble");
}
}
if (game_status == 10) {
game_status = 11;
okay_to_click = false;
}
}
}
Frame 81
this.tune_sound.stop();
playing_game = false;
game_level = controller.levl;
Frame 91
var bc_x = 0;
var bc_y = 0;
var x_axis = "x_axis";
var y_axis = "y_axis";
var analyse_done = 0;
var env_num = 0;
switch (game_mode) {
case "basic" :
bc_x = ((groups_av - 0.2) + (controller.levl * 0.3)) * 25;
bc_y = ((t_bonus_av - 6) / 3) * 100;
break;
case "extended" :
bc_x = (num_tiles / 700) * 100;
bc_y = ((t_bonus_av - 6) / 3) * 100;
break;
case "timed" :
bc_x = (score_av * num_tiles) / 15000;
bc_y = ((t_bonus_av - 4) / 4) * 100;
}
bc_x = Math.min(bc_x, 95);
bc_y = Math.min(bc_y, 95);
bc_x = Math.max(bc_x, 5);
bc_y = Math.max(bc_y, 5);
if (game_mode != "extended") {
env_num = (Math.floor(bc_x / 25) * 4) + Math.floor(bc_y / 25);
} else {
env_num = (Math.floor(bc_y / 25) * 4) + Math.floor(bc_x / 25);
}
Frame 102
play();
Frame 111
stop();
Frame 120
stop();
analyse_cont.onRelease = function () {
gotoAndPlay ("really_done");
};
Frame 126
analyse_done = 0;
Frame 136
stop();
game_score.text = actual_score;
switch (game_mode) {
case "basic" :
mochi.MochiScores.showLeaderboard({boardID:"2d7ef79b5e94f28e", score:actual_score, numScores:20});
break;
case "extended" :
mochi.MochiScores.showLeaderboard({boardID:"07c5ae67b775c381", score:actual_score, numScores:20});
break;
case "timed" :
mochi.MochiScores.showLeaderboard({boardID:"6b6f33b8b6d501bb", score:actual_score, numScores:20});
}
Frame 147
var now = new Date();
var current_time = now.getHours();
var rand = Math.floor(Math.random() * 3);
var frame_to_go = ((1 + (rand * 24)) + current_time);
if ((now.getDay() == 0) || (now.getDay() == 6)) {
if ((current_time > 6) && (current_time < 20)) {
switch (now.getMonth()) {
case 11 :
case 0 :
case 1 :
frame_to_go = "winter";
break;
case 2 :
case 3 :
case 4 :
frame_to_go = "spring";
break;
case 5 :
case 6 :
case 7 :
frame_to_go = "summer";
break;
case 8 :
case 9 :
case 10 :
frame_to_go = "autumn";
break;
default :
trace("huh");
}
}
}
text_advice.gotoAndStop(frame_to_go);
Frame 315
MochiAd.showInterLevelAd({id:"dfa4f75cd84270ae", res:"480x480", no_bg:true});
Frame 324
round_over = 0;
gotoAndPlay ("start");
Symbol 21 MovieClip [star] Frame 1
stop();
Symbol 21 MovieClip [star] Frame 25
star_status = 0;
play();
Symbol 21 MovieClip [star] Frame 35
star_status = 1;
Symbol 21 MovieClip [star] Frame 65
stop();
Symbol 21 MovieClip [star] Frame 79
stop();
Instance of Symbol 21 MovieClip [star] "star_baby" in Symbol 22 MovieClip [star_dad] Frame 1
onClipEvent (load) {
var x_vel = 0;
var x_acc = 1;
var y_vel = 0;
var y_acc = 1;
var y_dest = 32;
var dead_timer = 0;
var max_star_time = 900;
}
onClipEvent (enterFrame) {
this._rotation = _parent._parent.rot;
switch (star_status) {
case 1 :
this._x = this._x + x_vel;
this._y = this._y + y_vel;
if (this._x > x_dest) {
x_vel = (x_dest - this._x) / 10;
}
if (this._x < x_dest) {
x_vel = (x_dest - this._x) / 10;
}
if (this._y > y_dest) {
y_vel = (y_dest - this._y) / 10;
}
if (this._y < y_dest) {
y_vel = (y_dest - this._y) / 10;
}
if ((Math.abs(this._y - y_dest) < 1) && (Math.abs(this._x - x_dest) < 1)) {
this._x = x_dest;
this._y = y_dest;
star_status = 2;
}
_parent._parent.star_timer = 0;
break;
case 2 :
if (_parent._parent.star_timer > max_star_time) {
star_status = 3;
x_dest = 56;
x_vel = 0;
_parent._parent.play_sound("star");
_parent._parent.star_x_dest = 376;
}
break;
case 3 :
this._x = this._x + x_vel;
if (this._x > x_dest) {
x_vel = (x_dest - this._x) / 6;
}
if (this._x < x_dest) {
x_vel = (x_dest - this._x) / 6;
}
if (Math.abs(this._x - x_dest) < 1) {
star_status = 4;
star_timer = 0;
}
break;
case 4 :
dead_timer++;
if (dead_timer > 5) {
_parent._parent.star_bonus++;
_parent._parent.star_dead_timer = 20;
star_status = 5;
}
break;
case 5 :
dead_timer++;
this._rotation = 0;
this._alpha = 150 - (dead_timer * 10);
this._yscale = 25 + (dead_timer * 15);
if (dead_timer <= 20) {
break;
}
_parent.removeMovieClip();
}
}
Symbol 28 MovieClip Frame 1
instruction_star.gotoAndPlay("pulse");
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 20
play();
Symbol 75 MovieClip Frame 29
stop();
Symbol 75 MovieClip Frame 30
play();
Symbol 75 MovieClip Frame 50
gotoAndPlay ("five");
Symbol 75 MovieClip Frame 60
play();
Symbol 75 MovieClip Frame 70
stop();
Symbol 75 MovieClip Frame 80
stop();
Symbol 75 MovieClip Frame 104
play();
_parent.gotoAndStop("value0");
Symbol 75 MovieClip Frame 134
_parent.removeMovieClip();
Symbol 75 MovieClip Frame 145
play();
Symbol 75 MovieClip Frame 179
gotoAndPlay ("multiple_up");
Symbol 75 MovieClip Frame 183
stop();
Symbol 75 MovieClip Frame 226
_parent._parent._parent.blown_up = true;
_parent.removeMovieClip();
Symbol 76 MovieClip Frame 1
title_multi01.gotoAndPlay("five");
Symbol 102 MovieClip [bomb_up] Frame 1
play();
Symbol 102 MovieClip [bomb_up] Frame 65
gotoAndPlay ("rotate");
Symbol 102 MovieClip [bomb_up] Frame 74
play();
Symbol 102 MovieClip [bomb_up] Frame 101
stop();
_parent._parent._parent.fired = true;
_parent.removeMovieClip();
Symbol 108 MovieClip [numbers_tile] Frame 1
stop();
Symbol 108 MovieClip [numbers_tile] Frame 11
stop();
Symbol 108 MovieClip [numbers_tile] Frame 21
stop();
Symbol 108 MovieClip [numbers_tile] Frame 31
stop();
Symbol 108 MovieClip [numbers_tile] Frame 41
stop();
Symbol 108 MovieClip [numbers_tile] Frame 51
stop();
Symbol 108 MovieClip [numbers_tile] Frame 61
stop();
Symbol 108 MovieClip [numbers_tile] Frame 71
stop();
Symbol 108 MovieClip [numbers_tile] Frame 81
stop();
Symbol 108 MovieClip [numbers_tile] Frame 91
stop();
Symbol 108 MovieClip [numbers_tile] Frame 110
stop();
Symbol 108 MovieClip [numbers_tile] Frame 130
play();
Symbol 108 MovieClip [numbers_tile] Frame 145
gotoAndPlay ("??");
Symbol 108 MovieClip [numbers_tile] Frame 150
stop();
Symbol 108 MovieClip [numbers_tile] Frame 160
stop();
Symbol 108 MovieClip [numbers_tile] Frame 170
stop();
Symbol 108 MovieClip [numbers_tile] Frame 180
stop();
Instance of Symbol 21 MovieClip [star] "star" in Symbol 108 MovieClip [numbers_tile] Frame 190
onClipEvent (load) {
var mood = 0;
var star_x = 32;
var star_y = -34;
var destination_x = 0;
var destination_y = 32;
}
onClipEvent (enterFrame) {
this._x = star_x;
this._y = star_y;
switch (mood) {
case 0 :
break;
case 1 :
mood = 2;
break;
case 2 :
x_grid = _parent._x;
y_grid = _parent._y;
x_grid = (x_grid - _parent._parent.grid_left) / _parent._parent.tile_width;
y_grid = (_parent._parent.grid_bottom - y_grid) / _parent._parent.tile_width;
x_grid = Math.floor(x_grid);
y_grid = Math.floor(y_grid);
if (_parent._parent._parent.tile_multiple[x_grid][y_grid] == "boom") {
star_tile = "star_bonus" + _parent._parent.depth;
_parent._parent._parent.attachMovie("star", numbers_tile, _parent._parent.depth);
_parent._parent.depth++;
_parent._parent._parent[star_tile].gotoAndPlay("star");
_parent._parent._parent[star_tile].star.gotoAndPlay("fly_away");
trace("boom");
}
case 3 :
this.gotoAndPlay("fly_away");
break;
case 2 :
}
}
Symbol 108 MovieClip [numbers_tile] Frame 210
stop();
Symbol 110 MovieClip [match_show] Frame 1
Symbol 110 MovieClip [match_show] Frame 18
stop();
this.removeMovieClip();
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 11
stop();
Symbol 114 MovieClip Frame 21
stop();
Symbol 115 MovieClip [flashy_tile] Frame 25
stop();
this.removeMovieClip();
Symbol 118 MovieClip [tile_score] Frame 33
this.removeMovieClip();
Symbol 120 MovieClip Frame 1
eg_tile01.multiplier.gotoAndPlay("one");
eg_tile02.multiplier.gotoAndPlay("one");
eg_tile03.multiplier.gotoAndPlay("one");
eg_tile01.star_mum.gotoAndStop("start");
eg_tile02.star_mum.gotoAndStop("start");
eg_tile03.star_mum.gotoAndStop("start");
eg_tile01.gotoAndStop("value3");
eg_tile02.gotoAndStop("value3");
eg_tile03.gotoAndStop("value3");
Symbol 120 MovieClip Frame 27
eg_tile01.multiplier.gotoAndPlay("three");
eg_tile02.multiplier.gotoAndPlay("three");
eg_tile03.multiplier.gotoAndPlay("three");
example_score01.tile_score_text.text = "+81";
Symbol 120 MovieClip Frame 57
gotoAndPlay ("start");
Symbol 126 MovieClip Frame 1
eg_tile01.gotoAndStop("value3");
eg_tile02.gotoAndStop("value3");
eg_tile03.gotoAndStop("value3");
eg_tile04.gotoAndStop("value3");
eg_tile05.gotoAndStop("value3");
eg_tile01.multiplier.gotoAndPlay("one");
eg_tile02.multiplier.gotoAndPlay("one");
eg_tile03.multiplier.gotoAndPlay("one");
eg_tile04.multiplier.gotoAndPlay("one");
eg_tile05.multiplier.gotoAndPlay("one");
eg_tile01.star_mum.gotoAndStop("start");
eg_tile02.star_mum.gotoAndStop("start");
eg_tile03.star_mum.gotoAndStop("start");
eg_tile04.star_mum.gotoAndStop("start");
eg_tile05.star_mum.gotoAndStop("start");
Symbol 126 MovieClip Frame 27
eg_tile01.multiplier.gotoAndPlay("three");
eg_tile02.multiplier.gotoAndPlay("four");
eg_tile03.multiplier.gotoAndPlay("five");
eg_tile04.multiplier.gotoAndPlay("four");
eg_tile05.multiplier.gotoAndPlay("three");
example_score01.tile_score_text.text = "+81";
example_score02.tile_score_text.text = "+81";
example_score03.tile_score_text.text = "+81";
Symbol 126 MovieClip Frame 57
gotoAndPlay ("start");
Symbol 132 MovieClip Frame 1
eg_tile01.gotoAndStop("value3");
eg_tile02.gotoAndStop("value3");
eg_tile03.gotoAndStop("value3");
eg_tile04.gotoAndStop("value3");
eg_tile01.multiplier.gotoAndPlay("one");
eg_tile02.multiplier.gotoAndPlay("five");
eg_tile03.multiplier.gotoAndPlay("one");
eg_tile04.multiplier.gotoAndPlay("one");
eg_tile01.star_mum.gotoAndStop("start");
eg_tile02.star_mum.gotoAndStop("start");
eg_tile03.star_mum.gotoAndStop("start");
eg_tile04.star_mum.gotoAndStop("start");
Symbol 132 MovieClip Frame 27
eg_tile01.multiplier.gotoAndPlay("three");
eg_tile02.multiplier.gotoAndPlay("nova");
eg_tile03.multiplier.gotoAndPlay("three");
example_score01.tile_score_text.text = "+81";
Symbol 132 MovieClip Frame 56
eg_tile01.multiplier.gotoAndPlay("four");
eg_tile04.multiplier.gotoAndPlay("three");
eg_tile03.multiplier.gotoAndPlay("four");
example_score02.tile_score_text.text = "+81";
Symbol 132 MovieClip Frame 98
gotoAndPlay ("start");
Symbol 133 MovieClip Frame 1
multiple_rule.gotoAndPlay("five");
Symbol 144 MovieClip Frame 1
eg_reticule.gotoAndPlay("value99");
Symbol 151 MovieClip Frame 1
tile_state2.gotoAndPlay("three");
tile_state3.gotoAndPlay("four");
tile_state4.gotoAndPlay("five");
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 10
play();
Symbol 166 MovieClip Frame 18
gotoAndPlay ("active");
Symbol 171 MovieClip [power_up] Frame 1
stop();
Symbol 171 MovieClip [power_up] Frame 10
play();
Symbol 171 MovieClip [power_up] Frame 28
gotoAndPlay ("shoot");
Symbol 171 MovieClip [power_up] Frame 30
play();
Symbol 171 MovieClip [power_up] Frame 48
gotoAndPlay ("megashoot");
Symbol 171 MovieClip [power_up] Frame 50
play();
Symbol 171 MovieClip [power_up] Frame 58
gotoAndPlay ("row_up");
Symbol 171 MovieClip [power_up] Frame 60
play();
Symbol 171 MovieClip [power_up] Frame 68
gotoAndPlay ("col_up");
Symbol 171 MovieClip [power_up] Frame 70
play();
Symbol 171 MovieClip [power_up] Frame 78
gotoAndPlay ("row_blast");
Symbol 171 MovieClip [power_up] Frame 80
play();
Symbol 171 MovieClip [power_up] Frame 88
gotoAndPlay ("col_blast");
Symbol 171 MovieClip [power_up] Frame 90
play();
Symbol 171 MovieClip [power_up] Frame 98
gotoAndPlay ("star");
Symbol 171 MovieClip [power_up] Frame 100
play();
Symbol 171 MovieClip [power_up] Frame 108
gotoAndPlay ("hourglass");
Symbol 172 MovieClip Frame 1
p_up_tut01.gotoAndStop("star");
p_up_tut02.gotoAndStop("shoot");
p_up_tut03.gotoAndStop("megashoot");
p_up_tut04.gotoAndStop("row_up");
p_up_tut05.gotoAndStop("col_up");
p_up_tut06.gotoAndStop("row_blast");
p_up_tut07.gotoAndStop("col_blast");
p_up_tut08.gotoAndStop("hourglass");
Symbol 175 MovieClip Frame 1
eg_reticule.gotoAndPlay("value99");
Symbol 176 MovieClip [instructions_panel] Frame 1
var prev_label = "page 1";
var next_label = "page 1a";
previous_button._visible = false;
back_button1.onRelease = function () {
_parent.gotoAndPlay("rules_off");
};
next_button.onRelease = function () {
gotoAndStop(next_label);
};
previous_button.onRelease = function () {
gotoAndStop(prev_label);
};
stop();
Symbol 176 MovieClip [instructions_panel] Frame 10
prev_label = "page 1a";
next_label = "page 3";
stop();
Symbol 176 MovieClip [instructions_panel] Frame 20
prev_label = "page 2";
next_label = "page 4";
stop();
Symbol 176 MovieClip [instructions_panel] Frame 30
prev_label = "page 3";
next_label = "page 5";
stop();
Symbol 176 MovieClip [instructions_panel] Frame 40
prev_label = "page 4";
next_label = "page 6";
stop();
Symbol 176 MovieClip [instructions_panel] Frame 50
prev_label = "page 1";
next_label = "page 2";
previous_button._visible = true;
stop();
Symbol 176 MovieClip [instructions_panel] Frame 60
prev_label = "page 5";
next_label = "page 7";
next_button._visible = true;
stop();
Symbol 176 MovieClip [instructions_panel] Frame 70
prev_label = "page 6";
next_label = "page 7";
next_button._visible = false;
stop();
Symbol 177 MovieClip [Instructions] Frame 1
_parent.titles.play_button.enabled = false;
_parent.titles.how_to_button.enabled = false;
_parent.titles.playrecord_button.enabled = false;
_parent.titles.playback_button.enabled = false;
_parent.titles.timed_button.enabled = false;
_parent.titles.extended_button.enabled = false;
_parent.titles.level_selector.level_up_button.enabled = false;
_parent.titles.level_selector.level_down_button.enabled = false;
Symbol 177 MovieClip [Instructions] Frame 15
stop();
Symbol 177 MovieClip [Instructions] Frame 25
_parent.titles.play_button.enabled = true;
_parent.titles.how_to_button.enabled = true;
_parent.titles.playrecord_button.enabled = true;
_parent.titles.playback_button.enabled = true;
_parent.titles.timed_button.enabled = true;
_parent.titles.extended_button.enabled = true;
_parent.titles.level_selector.level_up_button.enabled = true;
_parent.titles.level_selector.level_down_button.enabled = true;
Symbol 177 MovieClip [Instructions] Frame 40
this.removeMovieClip();
Symbol 179 MovieClip [combo_score] Frame 60
this.removeMovieClip();
Symbol 208 MovieClip [high_score_box] Frame 1
continue_button.onRelease = function () {
_parent.gotoAndPlay("exit");
};
Symbol 209 MovieClip [high_score_table] Frame 15
stop();
Symbol 209 MovieClip [high_score_table] Frame 45
_parent.gotoAndPlay("start_again");
this.removeMovieClip();
Symbol 213 MovieClip [combo_blob] Frame 1
stop();
Symbol 213 MovieClip [combo_blob] Frame 10
play();
Symbol 213 MovieClip [combo_blob] Frame 25
this.removeMovieClip();
Symbol 220 MovieClip [next_level] Frame 1
stop();
Symbol 220 MovieClip [next_level] Frame 10
play();
Symbol 220 MovieClip [next_level] Frame 53
this.removeMovieClip();
Symbol 222 MovieClip [level_up] Frame 34
this.removeMovieClip();
Symbol 233 MovieClip [d_timer] Frame 1
stop();
Symbol 233 MovieClip [d_timer] Frame 10
play();
Symbol 233 MovieClip [d_timer] Frame 16
stop();
Symbol 233 MovieClip [d_timer] Frame 25
play();
Symbol 233 MovieClip [d_timer] Frame 32
gotoAndStop ("default");
Symbol 233 MovieClip [d_timer] Frame 40
play();
Symbol 233 MovieClip [d_timer] Frame 48
gotoAndPlay ("close");
Symbol 235 MovieClip [game_over] Frame 30
game_over_num.star_mum.gotoAndStop("start");
game_over_num.multiplier.gotoAndStop("five");
Symbol 235 MovieClip [game_over] Frame 85
_parent._parent.round_over = 4;
stop();
Symbol 243 MovieClip [grid_box] Frame 30
stop();
Symbol 243 MovieClip [grid_box] Frame 40
play();
Symbol 243 MovieClip [grid_box] Frame 59
stop();
Symbol 246 MovieClip [star_bonus_text] Frame 50
this.removeMovieClip();
Symbol 280 MovieClip Frame 1
stop();
Symbol 281 MovieClip [note] Frame 1
stop();
Symbol 281 MovieClip [note] Frame 3
play();
Symbol 281 MovieClip [note] Frame 35
play();
Symbol 281 MovieClip [note] Frame 90
_parent.bc_x_status = 4;
stop();
Symbol 314 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 341 MovieClip Frame 1
_parent._parent._parent.analyse_done++;
Symbol 341 MovieClip Frame 38
gotoAndPlay ("start");
Symbol 341 MovieClip Frame 45
stop();
Instance of Symbol 314 MovieClip "x_line" in Symbol 363 MovieClip [brain_chart] Frame 1
onClipEvent (load) {
this._x = 4.8;
this._y = 0;
var y_dest = 0;
var y_vel = 0;
var y_status = false;
}
onClipEvent (enterFrame) {
if ((y_status == false) && (_parent._parent._parent.analyse_done > 3)) {
y_dest = -(_parent._parent._parent.bc_x * 2);
this._y = this._y - y_vel;
frame_num = Math.floor((-this._y) / 2);
this.gotoAndStop(frame_num);
y_vel = Math.abs((y_dest - this._y) / 24);
if (y_vel < 0.3) {
y_vel = 0.3;
}
if (Math.abs(y_dest - this._y) < 1) {
this._y = y_dest;
_parent.bc_x_status = 1;
y_status = true;
}
}
}
Instance of Symbol 337 MovieClip "y_line" in Symbol 363 MovieClip [brain_chart] Frame 1
onClipEvent (load) {
this._y = 0;
this._x = 284;
var y_dest = 0;
var y_vel = 0;
var y_status = false;
}
onClipEvent (enterFrame) {
if ((y_status == false) && (_parent._parent._parent.analyse_done > 3)) {
y_dest = -(_parent._parent._parent.bc_y * 2);
this._y = this._y - y_vel;
frame_num = Math.floor((-this._y) / 2);
this.gotoAndStop(frame_num);
y_vel = Math.abs((y_dest - this._y) / 24);
if (y_vel < 0.3) {
y_vel = 0.3;
}
if (Math.abs(y_dest - this._y) < 1) {
this._y = y_dest;
_parent.bc_y_status = 1;
y_status = true;
}
}
}
Instance of Symbol 341 MovieClip "analyse_this" in Symbol 363 MovieClip [brain_chart] Frame 1
onClipEvent (enterFrame) {
if (_parent._parent._parent.analyse_done > 3) {
this.gotoAndStop("end");
}
}
Symbol 389 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 10
stop();
Symbol 394 MovieClip [Title_page] Frame 1
predictive_button.gotoAndStop("predictive_" + _parent.predictive);
level_selector._visible = false;
predictive_button._visible = false;
how_to_button.onRelease = function () {
combo_name = "combo_blob" + combo_stack.length;
combo_stack.push(combo_name);
_parent.attachMovie("instructions", "rules", 1);
_parent.rules._x = 239;
_parent.rules._y = 40;
};
play_button.onRelease = function () {
_parent.gotoAndPlay("titles_off");
_parent.recording = 0;
_parent.seq_total = 1;
_parent.record._visible = false;
_parent.record_button._visible = false;
_parent.game_mode = "basic";
};
timed_button.onRelease = function () {
_parent.gotoAndPlay("titles_off");
_parent.recording = 0;
_parent.seq_total = 1;
_parent.record._visible = false;
_parent.record_button._visible = false;
_parent.game_mode = "timed";
};
extended_button.onRelease = function () {
_parent.gotoAndPlay("titles_off");
_parent.recording = 0;
_parent.seq_total = 1;
_parent.record._visible = false;
_parent.record_button._visible = false;
_parent.game_mode = "extended";
};
website.onRelease = function () {
getURL ("http://www.mygamingwebsite.com/", "_blank");
};
predictive_button.onRelease = function () {
_parent.predictive = !_parent.predictive;
predictive_button.gotoAndStop("predictive_" + _parent.predictive);
};
timed_leader_button.onRelease = function () {
mochi.MochiScores.showLeaderboard({boardID:"6b6f33b8b6d501bb", numScores:20});
play_button.enabled = false;
timed_button.enabled = false;
extended_button.enabled = false;
how_to_button.enabled = false;
arcade_leader_button.enabled = false;
timed_leader_button.enabled = false;
basic_leader_button.enabled = false;
website.enabled = false;
};
arcade_leader_button.onRelease = function () {
mochi.MochiScores.showLeaderboard({boardID:"07c5ae67b775c381", numScores:20});
play_button.enabled = false;
timed_button.enabled = false;
extended_button.enabled = false;
how_to_button.enabled = false;
arcade_leader_button.enabled = false;
timed_leader_button.enabled = false;
basic_leader_button.enabled = false;
website.enabled = false;
};
basic_leader_button.onRelease = function () {
mochi.MochiScores.showLeaderboard({boardID:"2d7ef79b5e94f28e", numScores:20});
play_button.enabled = false;
timed_button.enabled = false;
extended_button.enabled = false;
how_to_button.enabled = false;
arcade_leader_button.enabled = false;
timed_leader_button.enabled = false;
basic_leader_button.enabled = false;
website.enabled = false;
};
Symbol 512 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if (options.clip != mochi.MochiServices.__get__clip()) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 513 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 514 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 403 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 10
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 10
stop();
Symbol 422 MovieClip Frame 1
stop();
Instance of Symbol 363 MovieClip [brain_chart] "brainy" in Symbol 422 MovieClip Frame 1
onClipEvent (load) {
var bc_x_status = 0;
var bc_y_status = 0;
}
onClipEvent (enterFrame) {
if ((bc_x_status == 1) && (bc_y_status == 1)) {
bc_x_status = 3;
env_name = "statement" + _parent._parent.env_num;
this.attachMovie("note", env_name, 1000);
this[env_name]._x = 150;
this[env_name]._y = -280;
this[env_name].gotoAndPlay("appear");
if (_parent._parent.game_mode == "extended") {
_parent._parent.env_num = _parent._parent.env_num + 16;
}
this[env_name].note_mc.gotoAndStop(_parent._parent.env_num + 1);
}
if (bc_x_status == 4) {
bc_x_status = 10;
_parent._parent.gotoAndPlay("done");
}
}