Frame 1
this.stop();
Frame 2
function set_pattern1() {
this.pattern_array = [[6, 5, 1], [4, 2, 1], [3, 1, 1], [3, 3, 1], [6, 2, 1], [6, 6, 1], [6, 4, 1], [2, 2, 1], [3, 2, 1], [5, 5, 1], [7, 5, 1], [3, 5, 1], [3, 2, 2], [6, 5, 2], [3, 5, 2], [6, 2, 2]];
}
function set_pattern2() {
this.pattern_array = [[1, 5, 1], [1, 1, 1], [2, 1, 1], [8, 2, 1], [7, 1, 1], [8, 6, 1], [7, 6, 1], [1, 2, 1], [8, 1, 1], [1, 6, 1], [8, 5, 1], [3, 3, 1], [2, 6, 1], [4, 3, 1], [4, 2, 1], [5, 2, 1], [5, 3, 1], [6, 3, 1], [3, 4, 1], [4, 4, 1], [5, 4, 1], [6, 4, 1], [4, 5, 1], [5, 5, 1], [5, 4, 2], [5, 3, 2], [4, 4, 2], [4, 3, 2]];
}
function set_pattern3() {
this.pattern_array = [[1, 4, 1], [1, 1, 1], [3, 1, 1], [8, 3, 1], [6, 1, 1], [8, 6, 1], [6, 6, 1], [1, 3, 1], [8, 1, 1], [1, 6, 1], [8, 4, 1], [3, 6, 1], [4, 3, 1], [5, 3, 1], [4, 4, 1], [5, 4, 1], [6, 6, 2], [3, 6, 2], [6, 1, 2], [3, 1, 2], [4, 3, 2], [5, 3, 2], [5, 4, 2], [4, 4, 2], [4, 3, 3], [4, 4, 3], [5, 4, 3], [5, 3, 3]];
}
function set_pattern4() {
this.pattern_array = [[3, 5, 1], [5, 3, 1], [3, 3, 1], [6, 4, 1], [5, 4, 1], [3, 4, 1], [4, 3, 1], [6, 3, 1], [4, 4, 1], [3, 1, 1], [3, 2, 1], [2, 2, 1], [4, 2, 1], [6, 5, 1], [5, 5, 1], [1, 3, 1], [2, 3, 1], [2, 4, 1], [6, 6, 1], [7, 3, 1], [7, 5, 1], [8, 4, 1], [7, 4, 1], [6, 2, 1], [5, 4, 2], [3, 4, 2], [4, 3, 2], [3, 3, 2], [6, 4, 2], [6, 3, 2], [6, 5, 2], [7, 4, 2], [2, 3, 2], [3, 2, 2], [3, 3, 3], [6, 4, 3]];
}
function set_pattern5() {
this.pattern_array = [[1, 3, 1], [1, 4, 1], [8, 3, 1], [8, 4, 1], [2, 3, 1], [7, 3, 1], [7, 4, 1], [2, 4, 1], [3, 3, 1], [3, 4, 1], [4, 3, 1], [4, 4, 1], [5, 3, 1], [5, 4, 1], [6, 3, 1], [6, 4, 1], [1, 1, 1], [8, 1, 1], [7, 1, 1], [2, 1, 1], [3, 1, 1], [4, 1, 1], [5, 1, 1], [6, 1, 1], [1, 6, 1], [8, 6, 1], [2, 6, 1], [7, 6, 1], [3, 6, 1], [4, 6, 1], [5, 6, 1], [6, 6, 1], [8, 4, 2], [1, 3, 2], [2, 4, 2], [3, 3, 2], [4, 4, 2], [5, 3, 2], [6, 4, 2], [7, 3, 2], [8, 1, 2], [2, 1, 2], [4, 1, 2], [6, 1, 2], [1, 6, 2], [3, 6, 2], [5, 6, 2], [7, 6, 2]];
}
function set_pattern6() {
this.pattern_array = [[1, 4, 1], [1, 6, 1], [2, 6, 1], [2, 2, 1], [3, 6, 1], [6, 1, 1], [2, 5, 1], [4, 3, 1], [1, 1, 1], [1, 3, 1], [3, 1, 1], [8, 1, 1], [7, 1, 1], [8, 2, 1], [8, 4, 1], [1, 2, 1], [1, 5, 1], [2, 1, 1], [8, 3, 1], [7, 2, 1], [7, 5, 1], [6, 6, 1], [7, 6, 1], [8, 5, 1], [8, 6, 1], [5, 3, 1], [4, 4, 1], [5, 4, 1], [4, 1, 1], [5, 1, 1], [4, 6, 1], [5, 6, 1], [4, 3, 2], [2, 1, 2], [4, 4, 2], [5, 3, 2], [1, 5, 2], [1, 6, 2], [1, 1, 2], [1, 2, 2], [5, 4, 2], [8, 5, 2], [8, 6, 2], [2, 6, 2], [7, 6, 2], [7, 1, 2], [8, 1, 2], [8, 2, 2], [1, 1, 3], [8, 1, 3], [5, 3, 3], [5, 4, 3], [4, 3, 3], [4, 4, 3], [1, 6, 3], [8, 6, 3]];
}
function set_pattern7() {
this.pattern_array = [[1, 1, 1], [2, 2, 1], [3, 3, 1], [4, 4, 1], [5, 5, 1], [6, 6, 1], [2, 1, 1], [3, 1, 1], [8, 6, 1], [7, 6, 1], [3, 2, 1], [4, 2, 1], [4, 3, 1], [5, 3, 1], [5, 4, 1], [6, 4, 1], [6, 5, 1], [7, 5, 1], [1, 6, 1], [2, 6, 1], [3, 6, 1], [2, 5, 1], [3, 5, 1], [4, 5, 1], [3, 4, 1], [6, 1, 1], [7, 1, 1], [8, 1, 1], [5, 2, 1], [6, 2, 1], [7, 2, 1], [6, 3, 1], [4, 3, 2], [4, 4, 2], [5, 3, 2], [3, 5, 2], [2, 6, 2], [2, 1, 2], [4, 2, 2], [5, 4, 2], [6, 5, 2], [7, 6, 2], [7, 1, 2], [6, 2, 2], [4, 5, 2], [5, 5, 2], [3, 2, 2], [5, 2, 2], [4, 2, 3], [5, 2, 3], [5, 3, 3], [5, 4, 3], [4, 3, 3], [4, 4, 3], [4, 5, 3], [5, 5, 3], [4, 3, 4], [4, 4, 4], [5, 4, 4], [5, 3, 4]];
}
function set_pattern8() {
this.pattern_array = [[2, 4, 1], [3, 4, 1], [4, 4, 1], [2, 5, 1], [3, 5, 1], [4, 5, 1], [5, 4, 1], [6, 4, 1], [7, 4, 1], [5, 5, 1], [6, 5, 1], [7, 5, 1], [2, 2, 1], [3, 2, 1], [4, 2, 1], [2, 3, 1], [3, 3, 1], [4, 3, 1], [5, 2, 1], [6, 2, 1], [7, 2, 1], [5, 3, 1], [6, 3, 1], [7, 3, 1], [8, 3, 1], [8, 4, 1], [1, 3, 1], [1, 4, 1], [4, 1, 1], [5, 1, 1], [4, 6, 1], [5, 6, 1], [3, 2, 2], [3, 3, 2], [3, 4, 2], [3, 5, 2], [4, 2, 2], [4, 3, 2], [4, 4, 2], [2, 3, 2], [2, 4, 2], [4, 5, 2], [7, 3, 2], [7, 4, 2], [5, 3, 2], [5, 4, 2], [6, 3, 2], [6, 4, 2], [5, 2, 2], [6, 2, 2], [5, 5, 2], [6, 5, 2], [3, 3, 3], [6, 3, 3], [3, 4, 3], [6, 4, 3], [4, 3, 3], [4, 4, 3], [5, 3, 3], [5, 4, 3], [4, 3, 4], [5, 3, 4], [4, 4, 4], [5, 4, 4]];
}
function set_pattern9() {
this.pattern_array = [[2, 5, 1], [1, 6, 1], [2, 6, 1], [4, 3, 1], [7, 5, 1], [5, 3, 1], [7, 6, 1], [8, 6, 1], [1, 1, 1], [2, 2, 1], [7, 1, 1], [8, 1, 1], [7, 2, 1], [8, 2, 1], [8, 5, 1], [1, 2, 1], [1, 5, 1], [2, 1, 1], [4, 4, 1], [5, 4, 1], [4, 3, 2], [2, 1, 2], [2, 2, 2], [4, 4, 2], [5, 3, 2], [1, 5, 2], [1, 6, 2], [1, 1, 2], [1, 2, 2], [5, 4, 2], [8, 5, 2], [8, 6, 2], [2, 5, 2], [2, 6, 2], [7, 5, 2], [7, 6, 2], [7, 1, 2], [8, 1, 2], [7, 2, 2], [8, 2, 2], [1, 1, 3], [8, 1, 3], [1, 2, 3], [8, 2, 3], [2, 1, 3], [2, 2, 3], [7, 1, 3], [7, 2, 3], [5, 3, 3], [5, 4, 3], [4, 3, 3], [4, 4, 3], [2, 5, 3], [2, 6, 3], [1, 5, 3], [1, 6, 3], [8, 5, 3], [8, 6, 3], [7, 5, 3], [7, 6, 3]];
}
function set_pattern10() {
this.pattern_array = [[3, 3, 1], [1, 6, 1], [2, 4, 1], [2, 2, 1], [1, 5, 1], [2, 6, 1], [1, 3, 1], [1, 1, 1], [2, 3, 1], [4, 6, 1], [3, 6, 1], [1, 2, 1], [1, 4, 1], [3, 5, 1], [6, 6, 1], [3, 4, 1], [4, 4, 1], [4, 5, 1], [2, 5, 1], [5, 6, 1], [5, 5, 1], [8, 1, 1], [7, 1, 1], [8, 2, 1], [7, 2, 1], [6, 1, 1], [5, 1, 1], [8, 3, 1], [8, 4, 1], [6, 2, 1], [7, 3, 1], [1, 4, 2], [2, 3, 2], [3, 4, 2], [2, 4, 2], [1, 5, 2], [1, 6, 2], [1, 3, 2], [1, 2, 2], [2, 5, 2], [3, 5, 2], [4, 5, 2], [2, 6, 2], [3, 6, 2], [4, 6, 2], [5, 6, 2], [8, 1, 2], [7, 1, 2], [6, 1, 2], [7, 2, 2], [8, 2, 2], [8, 3, 2], [1, 3, 3], [2, 6, 3], [2, 4, 3], [2, 5, 3], [1, 4, 3], [1, 5, 3], [1, 6, 3], [3, 5, 3], [3, 6, 3], [4, 6, 3], [7, 1, 3], [8, 1, 3], [8, 2, 3], [1, 4, 4], [1, 5, 4], [2, 5, 4], [1, 6, 4], [2, 6, 4], [3, 6, 4], [8, 1, 4], [1, 5, 5], [1, 6, 5], [2, 6, 5], [1, 6, 6]];
}
Frame 3
function setSound() {
if (this.sound_flg == undefined) {
this.sound_flg = true;
}
trace("set_sound " + this.sound_flg);
this.allSound = new Sound();
if (this.sound_flg == false) {
this.allSound.setVolume(0);
} else {
this.allSound.setVolume(100);
}
}
function playSE(se_name) {
se = new Sound(this);
se.attachSound(se_name);
se.start(0, 1);
}
function writeData() {
so.data.sound = this.sound_flg;
so.data.high_score = this.high_score;
so.flush();
}
function init_game() {
this.game_level = 1;
this.stage_num = 1;
this.depth_pai = 10000;
this.depth_select = 100000 /* 0x0186A0 */;
this.depth_get_score = 110000 /* 0x01ADB0 */;
this.depth_window = 120000 /* 0x01D4C0 */;
this.score = 0;
this.undo_cnt = 3;
this.delete_cnt = 3;
}
function set_pattern(n) {
n = n % 10;
switch (n) {
case 1 :
this.set_pattern1();
break;
case 2 :
this.set_pattern2();
break;
case 3 :
this.set_pattern3();
break;
case 4 :
this.set_pattern4();
break;
case 5 :
this.set_pattern5();
break;
case 6 :
this.set_pattern6();
break;
case 7 :
this.set_pattern7();
break;
case 8 :
this.set_pattern8();
break;
case 9 :
this.set_pattern9();
break;
case 0 :
this.set_pattern10();
}
}
function init_map_array() {
this.map_array = [];
z = 0;
while (z < this.map_max_z) {
this.map_array.push([]);
y = 0;
while (y < this.map_max_y) {
this.map_array[z].push([]);
x = 0;
while (x < this.map_max_x) {
var _local2 = -1;
if ((y == 0) || (y == (this.map_max_y - 1))) {
_local2 = 99;
}
if ((x == 0) || (x == (this.map_max_x - 1))) {
_local2 = 99;
}
this.map_array[z][y].push([_local2, false]);
x++;
}
y++;
}
z++;
}
}
function set_stage() {
this.pai_mc_list = [];
this.pai_total_cnt = 0;
var _local8 = "pai";
i = 0;
while (i < this.pattern_array.length) {
var _local6 = this.pattern_array[i][3];
var _local3 = this.pattern_array[i][2];
var _local5 = this.pattern_array[i][0];
var _local4 = this.pattern_array[i][1];
var _local7 = this.depth_pai + i;
var _local2 = "pai" + i;
this.attachMovie(_local8, _local2, _local7);
this[_local2].mx = _local5;
this[_local2].my = _local4;
this[_local2].mz = _local3;
this[_local2].kind_num = _local6;
this.map_array[_local3][_local4][_local5] = [_local6, this[_local2]];
i++;
}
}
function setPaiCursor(flg) {
i = 0;
while (i < this.pai_mc_list.length) {
this.pai_mc_list[i].useHandCursor = flg;
i++;
}
}
function setBtnCursor(flg) {
this.mc_btn_undo.useHandCursor = flg;
this.mc_btn_delete.useHandCursor = flg;
this.mc_btn_giveup.useHandCursor = flg;
}
function entry(target) {
this.pai_total_cnt++;
this.pai_mc_list.push(target);
}
function setDelete() {
if (this.delete_cnt > 0) {
this.delete_mode_flg = true;
this.mc_delete.disp(true);
} else {
_root.playSE("se_ng");
}
}
function endDelete() {
this.delete_mode_flg = false;
this.mc_delete.disp(false);
}
function addUndoList() {
var _local3 = [];
i = 0;
while (i < this.pai_mc_list.length) {
_local3.push(this.pai_mc_list[i].getUndo());
i++;
}
var _local2 = new Object();
_local2.pai = _local3;
_local2.score = this.score;
_local2.last_tesu = this.last_tesu;
_local2.combo_cnt = this.combo_cnt;
_local2.pai_total_cnt = this.pai_total_cnt;
_local2.pai_kind_list = this.pai_kind_list.slice();
this.undo_list.push(_local2);
}
function setUndo() {
if (this.undo_list.length == 0) {
trace("undo\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093");
_root.playSE("se_ng");
return(undefined);
}
if (this.undo_cnt > 0) {
_root.playSE("se_undo");
this.init_map_array();
var _local3 = this.undo_list.pop();
i = 0;
while (i < _local3.pai.length) {
_local3.pai[i][0].setUndo(_local3.pai[i]);
i++;
}
this.score = _local3.score;
this.last_tesu = _local3.last_tesu;
this.combo_cnt = _local3.combo_cnt;
this.pai_total_cnt = _local3.pai_total_cnt;
this.pai_kind_list = _local3.pai_kind_list;
this.undo_cnt--;
this.mc_btn_undo.init();
} else {
_root.playSE("se_ng");
}
}
function unentry_pai_mc() {
i = 0;
while (i < this.pai_mc_list.length) {
this.pai_mc_list[i].removeMovieClip();
i++;
}
}
function init_pai_kind() {
var _local4 = this.pattern_array.length / 4;
if ((this.pattern_array.length % 4) != 0) {
trace("err \u724C\u306E\u6570\u304C\uFF14\u306E\u500D\u6570\u3067\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093");
}
var _local3 = [];
this.pai_kind_list = [];
i = 0;
while (i < _local4) {
this.pai_kind_list.push(0);
j = 0;
while (j < 4) {
_local3.push(i);
this.pai_kind_list[i]++;
j++;
}
i++;
}
this.snumlist = this.shaffle_list(_local3);
i = 0;
while (i < this.pattern_array.length) {
var _local2 = this.snumlist[i];
this.pattern_array[i].push(_local2);
i++;
}
}
function shaffle_list(nlist) {
var _local4 = [];
while (nlist.length > 0) {
var _local2 = this.randomInt(nlist.length) - 1;
_local4.push(nlist[_local2]);
nlist.splice(_local2, 1);
}
return(_local4);
}
function randomInt(maxnum) {
var _local1 = Math.random() * maxnum;
if (_local1 == 0) {
_local1 = 1;
} else {
_local1 = Math.ceil(_local1);
}
return(_local1);
}
this.score = 0;
this.high_score = 5000;
this.sound_flg = true;
so = SharedObject.getLocal("mydata");
if (so.data.high_score == undefined) {
trace("not found sharedObject");
so.data.sound = this.sound_flg;
so.data.high_score = this.high_score;
} else {
trace("find so");
this.sound_flg = so.data.sound;
this.high_score = so.data.high_score;
trace("this.high_score = " + this.high_score);
}
this.map_max_x = 10;
this.map_max_y = 8;
this.map_max_z = 10;
this.pai_width = 30;
this.pai_height = 30;
this.base_x = 120 - this.pai_width;
this.base_y = 70 - this.pai_height;
this.init_game();
this.setSound();
Frame 4
function check_tesu() {
if (this.last_tesu == 0) {
this.attachMovie("window_gameover", "mc_window", this.depth_window++);
this.mc_window._alpha = 0;
return("game_over");
}
return("standby");
}
function count_tesu() {
this.last_tesu--;
}
function entry_delete() {
this.fm_cnt = 0;
this.fall_pai_cnt = 0;
this.stat = "delete";
this.delete_end_flg = false;
this.combo_cnt++;
}
function add_fall_pai_cnt(n) {
this.fall_pai_cnt = this.fall_pai_cnt + n;
}
function wait_delete() {
this.frm_cnt++;
if (this.delete_end_flg) {
if (this.fall_pai_cnt == 0) {
this.stat = this.check_clear();
if (this.stat != "stage_clear") {
this.stat = this.check_tesu();
}
} else {
this.stat = "fall";
}
}
}
function entry_fall() {
this.stat = "fall";
this.fall_pai_cnt = 0;
this.fall_end_flg = false;
}
function wait_fall() {
if (this.fall_end_flg) {
if (this.fall_pai_cnt == 0) {
this.stat = this.check_clear();
if (this.stat != "stage_clear") {
this.stat = this.check_tesu();
}
}
}
}
function tezumari() {
}
function check_clear() {
if (this.pai_total_cnt == 0) {
trace("stage_clear");
this.attachMovie("window_stage_clear", "mc_window", this.depth_window++);
this.mc_window._alpha = 0;
return("stage_clear");
}
var _local2 = true;
i = 0;
while (i < this.pai_kind_list.length) {
if (this.pai_kind_list[i] >= 2) {
_local2 = false;
}
i++;
}
if (_local2) {
if ((this.delete_cnt == 0) && (this.undo_cnt == 0)) {
this.attachMovie("window_gameover", "mc_window", this.depth_window++);
this.mc_window._alpha = 0;
return("tezumari");
}
}
return("standby");
}
function check_select(target_mc, nmx, nmy, nmz) {
var _local2 = [0, 0, 0, 0];
_local2[0] = this.map_array[nmz][nmy - 1][nmx][0];
_local2[1] = this.map_array[nmz][nmy][nmx + 1][0];
_local2[2] = this.map_array[nmz][nmy + 1][nmx][0];
_local2[3] = this.map_array[nmz][nmy][nmx - 1][0];
this.mc_select.entry(target_mc, _local2);
}
function set_get_score(nx, ny, num) {
this.score = this.score + num;
if (this.score >= this.high_score) {
this.high_score = this.score;
}
var _local3 = "get_score";
var _local2 = "gs" + this.depth_get_score;
this.attachMovie(_local3, _local2, this.depth_get_score++);
this[_local2]._x = nx;
this[_local2]._y = ny;
this[_local2].get_score = num;
}
this.onEnterFrame = function () {
switch (this.stat) {
case "delete" :
this.wait_delete();
break;
case "fall" :
this.wait_fall();
break;
case "tezumari" :
this.tezumari();
}
};
Frame 10
this.stop();
Frame 20
this.stat = "init_stage";
this.pai_total_cnt = 0;
this.pai_mc_list = [];
this.set_pattern(this.stage_num);
this.init_pai_kind();
this.init_map_array();
this.set_stage();
this.combo_cnt = 1;
this.undo_list = [];
this.window_flg = false;
this.delete_mode_flg = false;
if (this.score >= this.high_score) {
this.high_score = this.score;
}
this.attachMovie("select", "mc_select", this.depth_select);
this.attachMovie("window_stageIn", "mc_window", this.depth_window);
this.mc_btn_undo.init();
this.mc_btn_delete.init();
Frame 21
i = 0;
while (i < this.pai_mc_list.length) {
this.pai_mc_list[i].init_around_kind_list();
i++;
}
i = 0;
while (i < this.pai_mc_list.length) {
this.pai_mc_list[i].check_around_kind_list();
i++;
}
i = 0;
while (i < this.pai_mc_list.length) {
this.pai_mc_list[i].gotoAndPlay("go");
i++;
}
var n = (this.pai_total_cnt + 10);
if (n > 90) {
n = 90;
}
this.last_tesu = n - ((this.game_level - 1) * 5);
Frame 30
this.stat = "standby";
this.frm_cnt = 0;
this.delete_end_flg = false;
this.fall_end_flg = false;
this.stop();
Symbol 47 MovieClip Frame 1
this.stop();
Symbol 52 MovieClip [pai] Frame 1
function init() {
this.selectflg = false;
this.init_x = ((_root.base_x + (this.mx * _parent.pai_width)) - ((this.mz - 1) * 5)) + (_parent.pai_width / 2);
this.init_y = ((_root.base_y + (this.my * _parent.pai_height)) - ((this.mz - 1) * 10)) + (_parent.pai_height / 2);
this._x = this.init_x;
this._y = this.init_y;
this.setSwap();
this.stat = "stay";
}
function setSwap() {
this.swapDepths(((this.mz * 10000) + (this.my * 100)) + this.mx);
}
function getUndo() {
return([this, this.mx, this.my, this.mz, this.emptyflg]);
}
function setUndo(n) {
this.mx = n[1];
this.my = n[2];
this.mz = n[3];
this.emptyflg = n[4];
if (!this.emptyflg) {
_parent.map_array[this.mz][this.my][this.mx] = [this.kind_num, this];
this._visible = true;
this.init();
this.gotoAndPlay("go");
} else {
this.stat = "stay";
this._visible = false;
_parent.map_array[this.mz][this.my][this.mx] = [-1, false];
}
}
function set_pai_graphics(n) {
this.kind_num = n;
this.mc_pai_g.gotoAndStop(n + 1);
}
function select() {
this.selectflg = true;
this.gotoAndStop("select");
}
function unselect() {
this.selectflg = false;
_parent.mc_layer_disp.unentry();
this.gotoAndStop("stay");
}
function delete_pai() {
_parent.pai_total_cnt--;
this.emptyflg = true;
_parent.map_array[this.mz][this.my][this.mx] = [-1, false];
_parent.pai_kind_list[this.kind_num]--;
if (!_root.delete_mode_flg) {
_parent.set_get_score(this._x, this._y, 100 * _parent.combo_cnt);
} else {
_parent.playSE("se_get");
_parent.entry_delete();
_root.endDelete();
}
this.gotoAndPlay("delete");
}
function delete_mc() {
trace("delete");
}
function entry_fall() {
this.stat = "fall";
_parent.add_fall_pai_cnt(1);
_parent.map_array[this.mz][this.my][this.mx] = [-1, false];
this.mz--;
_parent.map_array[this.mz][this.my][this.mx] = [this.kind_num, this];
this.fix_x = ((this.mx * _parent.pai_width) - ((this.mz - 1) * 5)) + (_parent.pai_width / 2);
this.fix_y = ((this.my * _parent.pai_height) - ((this.mz - 1) * 10)) + (_parent.pai_height / 2);
_parent.entry_fall();
}
function fall() {
var _local5 = (this.fix_x - this._x) / 2;
var _local4 = (this.fix_y - this._y) / 2;
if (_local4 < 0.1) {
this._x = _root.base_x + this.fix_x;
this._y = _root.base_y + this.fix_y;
_parent.fall_end_flg = true;
this.stat = "stay";
this.check_around();
} else {
this._x = this._x + _local5;
this._y = this._y + _local4;
}
this.setSwap();
}
function entry_slide(ndirect) {
_parent.map_array[this.mz][this.my][this.mx] = [-1, false];
switch (ndirect) {
case "top" :
this.direct_x = 0;
this.direct_y = -1;
this.my--;
break;
case "right" :
this.direct_x = 1;
this.direct_y = 0;
this.mx++;
break;
case "bottom" :
this.direct_x = 0;
this.direct_y = 1;
this.my++;
break;
case "left" :
this.direct_x = -1;
this.direct_y = 0;
this.mx--;
}
this.dx = this.direct_x * 6;
this.dy = this.direct_y * 6;
_parent.map_array[this.mz][this.my][this.mx] = [this.kind_num, this];
this.slideflg = true;
this.slide_cnt = 0;
this.stat = "slide";
_parent.stat = "slide";
this.direct = ndirect;
}
function slide() {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this.slide_cnt == 4) {
if (this.mz > 1) {
var _local4 = true;
while (_local4) {
if (_parent.map_array[this.mz - 1][this.my][this.mx][0] == -1) {
_parent.map_array[this.mz][this.my][this.mx][0] = -1;
this.mz--;
_parent.map_array[this.mz][this.my][this.mx] = [this.kind_num, this];
this._x = ((_root.base_x + (this.mx * _parent.pai_width)) - ((this.mz - 1) * 5)) + (_parent.pai_width / 2);
this._y = ((_root.base_y + (this.my * _parent.pai_height)) - ((this.mz - 1) * 10)) + (_parent.pai_height / 2);
if (this.mz == 1) {
_local4 = false;
}
} else {
_local4 = false;
}
}
}
if (_parent.map_array[this.mz][this.my + this.direct_y][this.mx + this.direct_x][0] == -1) {
this.entry_slide(this.direct);
} else {
_parent.count_tesu();
this.slideflg = false;
this.stat = "stay";
if (this.check_around() == false) {
this.stat = "stay";
_parent.stat = "standby";
_parent.check_tesu();
_root.combo_cnt = 1;
_root.playSE("se_move");
} else {
_parent.entry_delete();
_parent.playSE("se_get");
}
}
this.setSwap();
} else {
this.slide_cnt++;
}
}
function check_around() {
var _local3 = false;
if (this.kind_num == _parent.map_array[this.mz][this.my - 1][this.mx][0]) {
_local3 = true;
_parent.map_array[this.mz][this.my - 1][this.mx][1].delete_pai();
}
if (this.kind_num == _parent.map_array[this.mz][this.my][this.mx + 1][0]) {
_local3 = true;
_parent.map_array[this.mz][this.my][this.mx + 1][1].delete_pai();
}
if (this.kind_num == _parent.map_array[this.mz][this.my + 1][this.mx][0]) {
_local3 = true;
_parent.map_array[this.mz][this.my + 1][this.mx][1].delete_pai();
}
if (this.kind_num == _parent.map_array[this.mz][this.my][this.mx - 1][0]) {
_local3 = true;
_parent.map_array[this.mz][this.my][this.mx - 1][1].delete_pai();
}
if (_local3) {
_parent.playSE("se_get");
this.delete_pai();
}
return(_local3);
}
function init_around_kind_list() {
this.init_around_kind_list = [];
if (_parent.map_array[this.mz][this.my - 1][this.mx][1] != false) {
this.init_around_kind_list.push(_parent.map_array[this.mz][this.my - 1][this.mx][0]);
}
if (_parent.map_array[this.mz][this.my][this.mx + 1][1] != false) {
this.init_around_kind_list.push(_parent.map_array[this.mz][this.my][this.mx + 1][0]);
}
if (_parent.map_array[this.mz][this.my + 1][this.mx][1] != false) {
this.init_around_kind_list.push(_parent.map_array[this.mz][this.my + 1][this.mx][0]);
}
if (_parent.map_array[this.mz][this.my][this.mx - 1][1] != false) {
this.init_around_kind_list.push(_parent.map_array[this.mz][this.my][this.mx - 1][0]);
}
}
function check_around_kind_list() {
var _local3 = false;
h = 0;
while (h < this.init_around_kind_list.length) {
if (this.init_around_kind_list[h] == this.kind_num) {
_local3 = true;
}
h++;
}
if (_local3) {
m = 0;
while (m < _parent.pai_mc_list.length) {
this.r = _parent.pai_mc_list[m].change_check(this.init_around_kind_list, this.kind_num);
if (this.r != -100) {
this.kind_num = this.r;
_parent.map_array[this.mz][this.my][this.mx][0] = this.kind_num;
return(undefined);
}
m++;
}
trace("Err \u7F6E\u304D\u63DB\u3048\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F");
}
}
function change_check(nlist, ckind_num) {
var _local3 = true;
if (this.kind_num == ckind_num) {
_local3 = false;
}
j = 0;
while (j < this.init_around_kind_list.length) {
if (ckind_num == this.init_around_kind_list[j]) {
_local3 = false;
}
j++;
}
j = 0;
while (j < nlist.length) {
if (nlist[j] == this.kind_num) {
_local3 = false;
}
j++;
}
if (_local3) {
_local3 = this.kind_num;
this.kind_num = ckind_num;
_parent.map_array[this.mz][this.my][this.mx][0] = this.kind_num;
return(_local3);
}
return(-100);
}
_parent.entry(this);
this.emptyflg = false;
this.init();
this.onEnterFrame = function () {
switch (this.stat) {
case "slide" :
this.slide();
break;
case "fall" :
this.fall();
}
};
this.onRollOver = function () {
if (_parent.map_array[this.mz + 1][this.my][this.mx][0] != -1) {
return(undefined);
}
if (_parent.delete_mode_flg) {
_root.playSE("se_paiOver");
this.gotoAndStop("over");
} else {
if (_parent.stat != "standby") {
return(undefined);
}
if (_parent.window_flg) {
return(undefined);
}
_parent.mc_layer_disp.entry(this.mx, this.my);
}
};
this.onRollOut = function () {
if (_parent.delete_mode_flg) {
this.gotoAndStop("stay");
}
_parent.mc_layer_disp.unentry();
};
this.onDragOut = function () {
if (_parent.delete_mode_flg) {
this.gotoAndStop("stay");
}
};
this.onRelease = function () {
if (!_parent.delete_mode_flg) {
_parent.mc_select.checkSlide();
}
_parent.mc_layer_disp.unentry();
};
this.onReleaseOutside = function () {
if (!_parent.delete_mode_flg) {
_parent.mc_select.checkSlide();
}
_parent.mc_layer_disp.unentry();
};
this.onPress = function () {
if (_parent.map_array[this.mz + 1][this.my][this.mx][0] != -1) {
return(undefined);
}
if (this.emptyflg) {
return(undefined);
}
if (_root.delete_mode_flg) {
_root.addUndoList();
_root.delete_cnt--;
_root.mc_btn_delete.init();
this.delete_pai();
} else {
if (_parent.stat != "standby") {
return(undefined);
}
if (this.selectflg) {
this.parent_mc.unentry_select();
return(undefined);
}
if (_parent.window_flg) {
return(undefined);
}
_parent.check_select(this, this.mx, this.my, this.mz);
_parent.playSE("se_select");
}
};
Symbol 52 MovieClip [pai] Frame 2
this.stop();
Symbol 52 MovieClip [pai] Frame 3
this.set_pai_graphics(this.kind_num);
Symbol 52 MovieClip [pai] Frame 6
this.stop();
Symbol 52 MovieClip [pai] Frame 11
this.stop();
Symbol 52 MovieClip [pai] Frame 25
_parent.delete_end_flg = true;
var i = 1;
while (_parent.map_array[this.mz + i][this.my][this.mx][0] >= 0) {
_parent.map_array[this.mz + i][this.my][this.mx][1].entry_fall();
i++;
}
this._visible = false;
this.stop();
Symbol 58 MovieClip Frame 1
function entry(n) {
if (n == -1) {
this.stat = "stay";
this._visible = true;
} else {
this._visible = false;
}
}
function unentry() {
this.stat = "stay";
this.gotoAndStop("stay");
}
function checkOver() {
if (this.stat == "over") {
_root.addUndoList();
_parent.entry_press(this.my_direct);
return(true);
}
return(false);
}
this.onEnterFrame = function () {
if (this._visible) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (this.stat != "over") {
_root.playSE("se_over");
this.stat = "over";
this.gotoAndStop("over");
}
} else if (this.stat != "stay") {
this.stat = "stay";
this.gotoAndStop("stay");
}
}
};
Symbol 58 MovieClip Frame 5
this.stop();
Symbol 58 MovieClip Frame 10
this.stop();
Symbol 59 MovieClip [select] Frame 1
function entry(target_mc, direct_array) {
this._x = target_mc._x;
this._y = target_mc._y;
this.mc_top.entry(direct_array[0]);
this.mc_right.entry(direct_array[1]);
this.mc_bottom.entry(direct_array[2]);
this.mc_left.entry(direct_array[3]);
this.target_mc = target_mc;
}
function unentry() {
this.mc_top.unentry();
this.mc_right.unentry();
this.mc_bottom.unentry();
this.mc_left.unentry();
this._y = 550;
_parent.mc_layer_disp.unentry();
}
function entry_press(ndirect) {
this.target_mc.entry_slide(ndirect);
this.unentry();
}
function checkSlide() {
this.mc_top.checkOver();
this.mc_right.checkOver();
this.mc_bottom.checkOver();
this.mc_left.checkOver();
this.mc_top.unentry();
this.mc_right.unentry();
this.mc_bottom.unentry();
this.mc_left.unentry();
this._y = 550;
}
this.unentry();
this.stop();
Instance of Symbol 58 MovieClip "mc_top" in Symbol 59 MovieClip [select] Frame 1
//component parameters
onClipEvent (construct) {
my_direct = "top";
}
Instance of Symbol 58 MovieClip "mc_right" in Symbol 59 MovieClip [select] Frame 1
//component parameters
onClipEvent (construct) {
my_direct = "right";
}
Instance of Symbol 58 MovieClip "mc_bottom" in Symbol 59 MovieClip [select] Frame 1
//component parameters
onClipEvent (construct) {
my_direct = "bottom";
}
Instance of Symbol 58 MovieClip "mc_left" in Symbol 59 MovieClip [select] Frame 1
//component parameters
onClipEvent (construct) {
my_direct = "left";
}
Symbol 69 MovieClip Frame 1
this.onRelease = function () {
if (_parent.btn_flg) {
_root.playSE("se_btnPress");
_parent.btn_flg = false;
_parent.play();
}
};
this.onRollOver = function () {
_root.playSE("se_btnOver");
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("stay");
};
this.onDragOut = function () {
this.gotoAndStop("stay");
};
this.onReleaseOutside = function () {
this.gotoAndStop("stay");
};
this.stop();
Symbol 71 MovieClip [window_gameover] Frame 1
this.btn_flg = false;
this.stat = "in";
_parent.window_flg = true;
_parent.setBtnCursor(false);
_parent.setPaiCursor(false);
_root.writeData();
Symbol 71 MovieClip [window_gameover] Frame 30
this.onEnterFrame = function () {
if (!(this.stat === "in")) {
} else if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
this.stat = "wait";
gotoAndPlay ("wait");
}
};
Symbol 71 MovieClip [window_gameover] Frame 31
this.stop();
Instance of Symbol 69 MovieClip in Symbol 71 MovieClip [window_gameover] Frame 39
//component parameters
onClipEvent (construct) {
txt = "Return";
}
Symbol 71 MovieClip [window_gameover] Frame 44
this.btn_flg = true;
this.stop();
Symbol 71 MovieClip [window_gameover] Frame 59
_root.unentry_pai_mc();
_root.init_game();
_root.gotoAndPlay("title");
this.removeMovieClip();
Symbol 74 MovieClip [window_stageIn] Frame 1
txt = "Stage" + _root.stage_num;
_parent.window_flg = true;
Symbol 74 MovieClip [window_stageIn] Frame 20
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
};
Symbol 74 MovieClip [window_stageIn] Frame 30
_parent.window_flg = false;
this.removeMovieClip();
Symbol 76 MovieClip Frame 1
this.onRelease = function () {
if (this._name == "yes") {
_root.writeData();
_root.unentry_pai_mc();
_root.init_game();
_root.gotoAndPlay("title");
}
_root.playSE("se_btnPress");
_parent.closeWindow();
};
this.onRollOver = function () {
_root.playSE("se_btnOver");
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("stay");
};
this.onDragOut = function () {
this.gotoAndStop("stay");
};
this.onReleaseOutside = function () {
this.gotoAndStop("stay");
};
this.stop();
Symbol 80 MovieClip [window_giveUp] Frame 1
function closeWindow() {
_parent.window_flg = false;
_parent.mc_btn_giveup.useHandCursor = true;
_parent.setPaiCursor(true);
_parent.setBtnCursor(true);
this.removeMovieClip();
}
_parent.window_flg = true;
_parent.setBtnCursor(false);
_parent.setPaiCursor(false);
stop();
Symbol 83 MovieClip [window_tezumari] Frame 30
trace("goto next stage");
_parent.unentry_pai_mc();
_parent.stage_num++;
_parent.gotoAndPlay("stage_init");
this.removeMovieClip();
Symbol 92 MovieClip Frame 1
this.useHandCursor = false;
this.onPress = function () {
_parent.skipAdd();
};
Symbol 93 MovieClip [window_stage_clear] Frame 1
function skipAdd() {
if (this.stat == "add") {
se.stop();
_root.score = _root.score + this.bonus;
this.bonus = 0;
this.stat = "wait";
this.gotoAndPlay("wait");
}
}
this.bonus = _root.last_tesu * 50;
this.txt = ("Stage " + _root.stage_num) + " Clear";
this.txt_last = _root.last_tesu;
this.btn_flg = false;
this.stat = "in";
this.wait_cnt = 0;
this.useHandCursor = false;
this.onEnterFrame = function () {
switch (this.stat) {
case "in" :
if (this._alpha < 100) {
this._alpha = this._alpha + 10;
} else {
this.stat = "addstay";
}
break;
case "addstay" :
if (wait_cnt == 30) {
this.stat = "add";
se = new Sound(this);
se.attachSound("se_addScore");
se.start(0, 10000);
} else {
wait_cnt++;
}
break;
case "add" :
if (this.bonus == 0) {
se.stop();
this.stat = "wait";
this.gotoAndPlay("wait");
} else {
this.bonus = this.bonus - 25;
_root.score = _root.score + 25;
}
}
};
Symbol 93 MovieClip [window_stage_clear] Frame 2
this.stop();
Instance of Symbol 69 MovieClip in Symbol 93 MovieClip [window_stage_clear] Frame 10
//component parameters
onClipEvent (construct) {
txt = "Next Stage";
}
Symbol 93 MovieClip [window_stage_clear] Frame 15
this.btn_flg = true;
this.stop();
Symbol 93 MovieClip [window_stage_clear] Frame 30
trace("goto next stage");
_parent.unentry_pai_mc();
if ((_parent.stage_num % 10) == 0) {
_parent.game_level++;
}
if ((_parent.stage_num % 4) == 0) {
_parent.delete_cnt++;
if (_parent.delete_cnt > 5) {
_parent.delete_cnt = 5;
}
} else {
_parent.undo_cnt++;
if (_parent.undo_cnt > 5) {
_parent.undo_cnt = 5;
}
}
_parent.stage_num++;
_parent.gotoAndPlay("stage_init");
this.removeMovieClip();
Symbol 102 MovieClip Frame 1
this.stop();
Symbol 103 MovieClip [get_score] Frame 2
this._x = this._x - 5;
this.mc_g.ads = this.get_score;
Symbol 103 MovieClip [get_score] Frame 25
this.removeMovieClip();
Symbol 111 MovieClip Frame 1
this.load_finish_flg = false;
this.stop();
this.onEnterFrame = function () {
if (this.load_finish_flg == false) {
this.loaded_size = _root.getBytesLoaded();
this.total_size = _root.getBytesTotal();
if (this.loaded_size >= this.total_size) {
this.load_finish_flg = true;
this.gotoAndPlay("ok");
} else {
var _local4 = (this.loaded_size / this.total_size) * 100;
var _local3 = Math.round(_local4);
this.mc_bar._width = 300 * (_local3 / 100);
}
}
};
Symbol 111 MovieClip Frame 19
_parent.play();
Symbol 124 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 1
this.onRelease = function () {
if (_parent.btn_flg) {
_root.playSE("se_btnPress");
_parent.gotoAndPlay("start");
}
};
this.onRollOver = function () {
_root.playSE("se_btnOver");
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("stay");
};
this.onDragOut = function () {
this.gotoAndStop("stay");
};
this.onReleaseOutside = function () {
this.gotoAndStop("stay");
};
this.stop();
Symbol 143 MovieClip Frame 1
function gameStart() {
this.target_x = 650;
this.target_y = -10;
}
function entry() {
this.stat = "start";
this.target_x = 440;
this.target_y = 40;
}
this.stat = "stay";
this.entry();
this.stop();
this.onPress = function () {
this.stat = "drag";
this.startDrag();
};
this.onRelease = function () {
this.stat = "start";
this.stopDrag();
};
this.onEnterFrame = function () {
if (!(this.stat === "start")) {
} else {
this._x = this._x + ((this.target_x - this._x) / 5);
this._y = this._y + ((this.target_y - this._y) / 5);
}
};
Symbol 144 MovieClip Frame 1
btn_flg = false;
Symbol 144 MovieClip Frame 8
btn_flg = true;
this.stop();
Symbol 144 MovieClip Frame 9
btn_flg = false;
Symbol 144 MovieClip Frame 16
_root.gotoAndPlay("stage_init");
this.stop();
Symbol 147 MovieClip Frame 1
this.useHandCursor = false;
this.onPress = function () {
_parent.mc_select.unentry();
_parent.mc_layer_disp.unentry();
};
Symbol 165 MovieClip Frame 1
this.stop();
Symbol 166 MovieClip Frame 1
function init() {
i = 1;
while (i <= 5) {
if (i <= _root.undo_cnt) {
this["mc_s" + i].gotoAndStop(1);
} else {
this["mc_s" + i].gotoAndStop(2);
}
i++;
}
}
this.init();
this.onPress = function () {
if (_root.stat != "standby") {
return(undefined);
}
if (!_root.window_flg) {
_root.setUndo();
}
};
this.onRollOver = function () {
_root.playSE("se_btnOver");
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("stay");
};
this.onDragOut = function () {
this.gotoAndStop("stay");
};
this.onReleaseOutside = function () {
this.gotoAndStop("stay");
};
this.stop();
Symbol 168 MovieClip Frame 1
function init() {
i = 1;
while (i <= 5) {
if (i <= _root.delete_cnt) {
this["mc_s" + i].gotoAndStop(1);
} else {
this["mc_s" + i].gotoAndStop(2);
}
i++;
}
}
this.init();
this.onPress = function () {
if (_root.stat != "standby") {
return(undefined);
}
if (!_root.window_flg) {
_root.setDelete();
}
};
this.onRollOver = function () {
_root.playSE("se_btnOver");
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("stay");
};
this.onDragOut = function () {
this.gotoAndStop("stay");
};
this.onReleaseOutside = function () {
this.gotoAndStop("stay");
};
this.stop();
Symbol 170 MovieClip Frame 1
this.onRelease = function () {
if (_root.stat != "standby") {
return(undefined);
}
if (!_parent.window_flg) {
_root.playSE("se_btnPress");
_parent.attachMovie("window_giveUp", "mc_window", _parent.depth_window++);
}
};
this.onRollOver = function () {
_root.playSE("se_btnOver");
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("stay");
};
this.onDragOut = function () {
this.gotoAndStop("stay");
};
this.onReleaseOutside = function () {
this.gotoAndStop("stay");
};
this.stop();
Symbol 175 MovieClip Frame 1
function entry(n) {
if ((n >= 0) && (n < 50)) {
this._visible = true;
this.mc_pai_g.gotoAndStop(n + 1);
} else {
this._visible = false;
}
}
function unentry() {
this._visible = false;
}
this.unentry();
this.stop();
Symbol 175 MovieClip Frame 2
this.stop();
Symbol 176 MovieClip Frame 1
function entry(nx, ny) {
i = 1;
while (i < 8) {
var _local3 = _parent.map_array[i][ny][nx][0];
this["mc_layer_" + i].entry(_local3);
i++;
}
}
function unentry() {
i = 1;
while (i < 8) {
this["mc_layer_" + i].unentry();
i++;
}
}
this.stop();
Symbol 180 MovieClip Frame 1
function disp(flg) {
_parent.window_flg = flg;
_parent.setBtnCursor(!flg);
this._visible = flg;
}
this._visible = false;
this.useHandCursor = false;
this.onPress = function () {
_root.endDelete();
};