Frame 1
stop();
this.onEnterFrame = function () {
if (this.getBytesTotal() <= this.getBytesLoaded()) {
delete this.onEnterFrame;
gotoAndStop ("select");
}
};
menu_cm = new ContextMenu();
menu_cm.builtInItems.forward_back = false;
menu_cm.builtInItems.loop = false;
menu_cm.builtInItems.play = false;
menu_cm.builtInItems.quality = false;
menu_cm.builtInItems.rewind = false;
menu_cm.builtInItems.zoom = false;
_root.menu = menu_cm;
q0 = "276000080300800015500209700082300400000050000001004360004508007160003004030000521276145983349867215518239746682371459493652178751984362924518637165723894837496521";
q1 = "700800004500100007090020080004002700010000020009500800050040030400005008300006001723859164548163297196427583634982715815674329279531846951748632462315978387296451";
q2 = "500360090006000004080001002050900600008000500009006010100400080800000100020098003542367891316289754987541362751932648268714539439856217173425986894673125625198473";
q3 = "000140820014000003030006000060007200002000900001500040000200050800000360043059000957143826614825793238976514569487231482361975371592648196238457825714369743659182";
q4 = "000030000080905060407000309000103000060040010000806000902000607070408090000090000695734128283915764417682359529173846768549213134826975942351687371468592856297431";
Frame 6
function start_game(n) {
qnum = n;
gotoAndStop ("game");
}
stop();
qnum = 0;
Frame 12
stop();
Symbol 2 Button
on (press) {
_parent._parent._parent.click_cel(this._name, 0);
}
Symbol 4 MovieClip Frame 1
stop();
Symbol 6 Button
on (press) {
_parent._parent._parent.click_cel(this._name, 1);
}
Symbol 7 Button
on (press) {
_parent._parent._parent.click_cel(this._name, 2);
}
Symbol 8 Button
on (press) {
_parent._parent._parent.click_cel(this._name, 3);
}
Symbol 9 Button
on (press) {
_parent._parent._parent.click_cel(this._name, 4);
}
Symbol 17 MovieClip [mcNumOrg] Frame 1
stop();
tf1._visible = true;
tf2._visible = true;
tf3._visible = true;
tf4._visible = true;
if (_parent._parent._parent.UseMemo) {
bt1._visible = true;
bt2._visible = true;
bt3._visible = true;
bt4._visible = true;
}
Symbol 17 MovieClip [mcNumOrg] Frame 6
stop();
tf1._visible = false;
tf2._visible = false;
tf3._visible = false;
tf4._visible = false;
bt1._visible = false;
bt2._visible = false;
bt3._visible = false;
bt4._visible = false;
Symbol 22 Button
on (release) {
_parent._parent.start_game(Number(this._name.slice(2)));
}
Symbol 25 MovieClip Frame 1
stop();
n = Number(this._name.slice(2));
levtext = ["Easy", "Easy", "Medium", "Medium", "Hard"];
tfLev.text = levtext[n];
dat = eval ("_root.q" + n);
c = 0;
i = 0;
while (i < 9) {
j = 0;
while (j < 9) {
mcName = "mc" + c;
attachMovie("mcSampleNumOrg", mcName, c);
mc = eval (mcName);
mc._x = j * 12;
if (j >= 3) {
mc._x++;
}
if (j >= 6) {
mc._x++;
}
mc._y = i * 12;
if (i >= 3) {
mc._y++;
}
if (i >= 6) {
mc._y++;
}
a = Number(dat.charAt(c));
if (a > 0) {
mc.tfNum.text = a;
} else {
mc.tfNum.text = "";
}
c++;
j++;
}
i++;
}
Symbol 28 Button
on (release) {
getURL ("http://www.nikoli.com/", "_blank");
}
Symbol 41 MovieClip Frame 1
_visible = false;
Symbol 41 MovieClip Frame 2
_visible = true;
Symbol 41 MovieClip Frame 7
stop();
Symbol 44 MovieClip Frame 1
stop();
if (_root.lang > 0) {
tfTitle.text = "Sudoku";
} else {
tfTitle.text = "\u6570\u72EC";
}
Symbol 48 MovieClip Frame 1
stop();
_visible = false;
Symbol 48 MovieClip Frame 2
stop();
_visible = true;
Symbol 48 MovieClip Frame 3
stop();
_visible = true;
Symbol 52 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 1
stop();
_visible = false;
Symbol 57 MovieClip Frame 2
stop();
_visible = true;
mc = eval ((("_parent.mcNumLayer.num_" + _parent._parent.lastTryX) + "_") + _parent._parent.lastTryY);
_x = mc._x;
_y = mc._y;
w = _parent._parent.cel_w;
_xscale = ((100 * w) / 32);
_yscale = ((100 * w) / 32);
Symbol 58 MovieClip Frame 1
_visible = false;
Symbol 58 MovieClip Frame 2
stop();
_visible = true;
Symbol 65 MovieClip Frame 1
stop();
_visible = false;
Symbol 65 MovieClip Frame 2
stop();
_visible = true;
Symbol 65 MovieClip Frame 3
stop();
_visible = true;
Symbol 73 MovieClip Frame 1
stop();
_visible = false;
Symbol 73 MovieClip Frame 2
stop();
_visible = true;
cnt = 0;
var i = 0;
while (i < 10) {
var mc = eval ("mcDot" + i);
var n = ((cnt + i) % 10);
mc.gotoAndStop(1 + n);
i++;
}
onEnterFrame = function () {
cnt++;
if (cnt >= 10) {
cnt = 0;
}
var i = 0;
while (i < 10) {
var mc = eval ("mcDot" + i);
var n = ((cnt + i) % 10);
mc.gotoAndStop(1 + n);
i++;
}
};
Symbol 76 MovieClip Frame 1
function set_disp_time(t) {
disp_time = t;
}
function start_timer() {
draw_time();
start_time = getTimer();
old_s = 0;
onEnterFrame = function () {
var _local2 = getTimer() - start_time;
var _local1 = Math.floor(_local2 / 1000);
if (_local1 > old_s) {
old_s = _local1;
disp_time++;
draw_time();
}
};
}
function draw_time() {
var _local1 = disp_time;
var _local6 = _local1 % 10;
_local1 = Math.floor(_local1 / 10);
var _local5 = _local1 % 6;
_local1 = Math.floor(_local1 / 6);
var _local4 = _local1 % 10;
_local1 = Math.floor(_local1 / 10);
var _local3 = _local1 % 6;
_local1 = Math.floor(_local1 / 6);
var _local2 = _local1;
time_txt = "";
if (_local2 > 0) {
time_txt = time_txt + (_local2 + ":");
}
time_txt = time_txt + ((((((_local3 + "") + _local4) + ":") + _local5) + "") + _local6);
}
function stop_timer() {
delete onEnterFrame;
}
function start_lev_time(dt) {
lev_time = dt.split("-");
}
stop();
_visible = false;
Symbol 76 MovieClip Frame 2
stop();
_visible = true;
str2 = "";
if (_root.lang > 0) {
str2 = str2 + (lev_time[0] + "min-");
str2 = str2 + (lev_time[1] + "min-");
str2 = str2 + (lev_time[2] + "min");
} else {
str2 = str2 + (lev_time[0] + "\u5206-");
str2 = str2 + (lev_time[1] + "\u5206-");
str2 = str2 + (lev_time[2] + "\u5206");
}
tfTime.text = str2;
Symbol 83 MovieClip Frame 1
stop();
Symbol 87 Button
on (release) {
add_val(-1);
}
on (rollOver) {
_parent.popup_appear();
}
on (rollOut, press, dragOut) {
_parent.popup_disappear();
}
Symbol 89 Button
on (release) {
add_val(1);
}
on (rollOver) {
_parent.popup_appear();
}
on (rollOut, press, dragOut) {
_parent.popup_disappear();
}
Symbol 90 MovieClip Frame 1
function init_meter(m) {
max = m;
i = 0;
while (i < 10) {
eval ("mc" + i)._visible = ((i < max) ? true : false);
i++;
}
btRight._x = (max * 6) + 1;
}
function draw_meter() {
i = 0;
while (i < max) {
mc = eval ("mc" + i);
if (i <= val) {
mc.gotoAndStop(2);
} else {
mc.gotoAndStop(1);
}
i++;
}
}
function meter_click(n) {
if (val == n) {
return(undefined);
}
val = n;
draw_meter();
_parent.change_val(val);
}
function add_val(a) {
v = val + a;
if (v < 0) {
return(undefined);
}
if (v >= max) {
return(undefined);
}
val = v;
draw_meter();
_parent.change_val(val);
}
_visible = false;
val = 0;
max = 10;
Instance of Symbol 83 MovieClip "mc0" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc1" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc2" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc3" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc4" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc5" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc6" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc7" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc8" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Instance of Symbol 83 MovieClip "mc9" in Symbol 90 MovieClip Frame 1
on (press) {
_parent.meter_click(Number(this._name.slice(2)));
}
Symbol 90 MovieClip Frame 2
stop();
_visible = true;
Symbol 92 MovieClip Frame 1
function change_val(v) {
_parent._parent.set_line_width(v);
}
function popup_appear() {
_parent.mcPopup.appear(62, -86, "\u7DDA\u306E\u592A\u3055\u3092\u5909\u3048\u307E\u3059", "Change the width of the line", 2);
}
function popup_disappear() {
_parent.mcPopup.disappear();
}
_visible = false;
Symbol 92 MovieClip Frame 2
stop();
_visible = true;
mcMeter.init_meter(6);
mcMeter.val = _parent._parent.WidthLevel;
mcMeter.draw_meter();
Symbol 94 Button
on (release) {
_parent._parent.change_num_key_appear();
}
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 2
stop();
Symbol 99 MovieClip Frame 1
v = _parent._parent.NumKeyAppear;
mcCheckBox.gotoAndStop(1 + v);
Symbol 100 Button
on (release) {
_parent._parent.change_use_memo();
}
Symbol 102 MovieClip Frame 1
v = _parent._parent.UseMemo;
mcCheckBox.gotoAndStop(1 + v);
Symbol 103 Button
on (release) {
_parent._parent.change_num_completed();
}
Symbol 115 MovieClip Frame 1
v = _parent._parent.NumCompleted;
mcCheckBox.gotoAndStop(1 + v);
mcNum._visible = ((v == 0) ? false : true);
Symbol 119 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 1
function appear(x, y, jp, en, f) {
_x = x;
_y = y;
jp_txt = jp;
en_txt = en;
mcFrame.gotoAndStop(1 + f);
gotoAndStop (2);
}
function disappear() {
gotoAndStop (1);
}
stop();
_visible = false;
Symbol 122 MovieClip Frame 2
stop();
_visible = true;
_alpha = -200;
onEnterFrame = function () {
_alpha = (_alpha + 20);
if (_alpha >= 100) {
delete onEnterFrame;
gotoAndStop (3);
}
};
Symbol 122 MovieClip Frame 3
stop();
tf.text = ((_root.lang > 0) ? (en_txt) : (jp_txt));
Symbol 125 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 126 MovieClip Frame 1
stop();
_visible = false;
Symbol 126 MovieClip Frame 2
stop();
_visible = true;
Instance of Symbol 92 MovieClip in Symbol 126 MovieClip Frame 2
/* no clip actions */
Symbol 126 MovieClip Frame 3
stop();
_visible = true;
s = new String();
if (_parent.lvLoad.dataAnswer != "sample answer") {
if (_root.lang > 0) {
s = _parent.lvLoad.dataRomanAnswer;
if (s.length > 0) {
solver_txt = s + "'s solving history";
}
} else {
s = _parent.lvLoad.dataAnswer;
if (s.length > 0) {
solver_txt = s + "\u3055\u3093\u306E\u89E3\u7B54\u5C65\u6B74";
}
}
}
Symbol 129 MovieClip Frame 1
stop();
_visible = false;
Symbol 129 MovieClip Frame 2
stop();
_visible = true;
Symbol 138 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 143 MovieClip Frame 1
function start_title(l, pm, a, a2, s) {
lev = 0;
switch (Number(l)) {
case 1 :
lev = 1;
break;
case 2 :
lev = 2;
break;
case 3 :
lev = 3;
break;
case 4 :
lev = 4;
}
pmode = pm;
author = a;
author2 = a2;
solver = s;
gotoAndStop (2);
}
stop();
_visible = false;
Symbol 143 MovieClip Frame 2
stop();
_visible = true;
if (_root.lang > 0) {
tfTitle.text = "Sudoku";
} else {
tfTitle.text = "\u6570\u72EC";
}
if ((lev >= 1) && (lev <= 4)) {
mcFace.gotoAndStop(lev);
} else {
mcFace._visible = false;
}
str = "";
if (_root.lang > 0) {
switch (lev) {
case 1 :
str = "Easy";
break;
case 2 :
str = "Medium";
break;
case 3 :
str = "Hard";
break;
case 4 :
str = "Extra";
}
} else {
switch (lev) {
case 1 :
str = "\u3089\u304F\u3089\u304F";
break;
case 2 :
str = "\u304A\u3066\u3054\u308D";
break;
case 3 :
str = "\u305F\u3044\u3078\u3093";
break;
case 4 :
str = "\u30A2\u30BC\u30F3";
}
}
tfLevel.text = str;
Symbol 148 Button
on (keyPress "0") {
_parent.input_from_key(0, Key.isDown(32));
}
on (keyPress "1") {
_parent.input_from_key(1, Key.isDown(32));
}
on (keyPress "2") {
_parent.input_from_key(2, Key.isDown(32));
}
on (keyPress "3") {
_parent.input_from_key(3, Key.isDown(32));
}
on (keyPress "4") {
_parent.input_from_key(4, Key.isDown(32));
}
on (keyPress "5") {
_parent.input_from_key(5, Key.isDown(32));
}
on (keyPress "6") {
_parent.input_from_key(6, Key.isDown(32));
}
on (keyPress "7") {
_parent.input_from_key(7, Key.isDown(32));
}
on (keyPress "8") {
_parent.input_from_key(8, Key.isDown(32));
}
on (keyPress "9") {
_parent.input_from_key(9, Key.isDown(32));
}
on (keyPress "<Delete>") {
_parent.input_from_key(0, false);
}
on (keyPress "<Backspace>") {
_parent.input_from_key(0, false);
}
on (keyPress "<Left>") {
_parent.input_dir(-1, 0);
}
on (keyPress "<Right>") {
_parent.input_dir(1, 0);
}
on (keyPress "<Up>") {
_parent.input_dir(0, -1);
}
on (keyPress "<Down>") {
_parent.input_dir(0, 1);
}
Symbol 149 Button
on (release) {
_parent.on_menu_undo();
}
on (rollOver) {
mcPopup.appear(122, 45, "\u4E00\u624B\u623B\u3059", "Undo", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 150 Button
on (release) {
_parent.on_menu_check();
}
on (rollOver) {
mcPopup.appear(214, 45, "\u89E3\u3044\u305F\u3089\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u306D", "Check your solution", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 154 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 157 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 158 Button
on (release) {
_parent.on_menu_clear();
}
on (rollOver) {
mcPopup.appear(30, 45, "\u3053\u306E\u554F\u984C\u3092\u4E2D\u65AD\u3059\u308B", "Back to the beginning", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 161 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 162 Button
on (release) {
_parent.on_menu_try();
}
on (rollOver) {
mcPopup.appear(306, 45, "\u30C8\u30E9\u30A4\u30E2\u30FC\u30C9\u306B\u3059\u308B\u3068\u304D\u306B\u30AF\u30EA\u30C3\u30AF", "Go to Try mode", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 165 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 166 Button
on (release) {
_parent.on_menu_save();
}
on (rollOver) {
mcPopup.appear(510, 45, "\u9014\u4E2D\u4FDD\u5B58\u3059\u308B\u3068\u304D\u306B\u30AF\u30EA\u30C3\u30AF", "Save your unfinished solution", 1);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 169 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 170 Button
on (release) {
_parent.on_menu_try_clear();
}
on (rollOver) {
mcPopup.appear(398, 45, "\u30C8\u30E9\u30A4\u3057\u305F\u3068\u3053\u308D\u3092\u6D88\u53BB\u3057\u307E\u3059", "Delete the trying parts", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 171 Button
on (release) {
_parent.on_menu_try_fix();
}
on (rollOver) {
mcPopup.appear(306, 45, "\u30C8\u30E9\u30A4\u3057\u305F\u3068\u3053\u308D\u3092\u78BA\u5B9A\u3057\u307E\u3059", "Fix the trying parts", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 174 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 177 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 180 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 181 Button
on (release) {
_parent.on_menu_check_return();
}
on (rollOver) {
mcPopup.appear(214, 45, "\u7D9A\u304D\u3092\u89E3\u304F", "Play from the last point", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 184 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 185 Button
on (release) {
_parent.on_menu_clear_cancel();
}
on (rollOver) {
mcPopup.appear(306, 45, "\u7D9A\u304D\u3092\u89E3\u304F", "Play from the last point", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 186 Button
on (release) {
_parent.on_menu_clear_do();
}
on (rollOver) {
mcPopup.appear(214, 45, "\u6700\u521D\u304B\u3089\u3084\u308A\u306A\u304A\u3057", "Back to the beginning", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 189 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 192 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 195 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 199 MovieClip Frame 1
stop();
onPress = function () {
var _local2 = (_xmouse * 100) / 400;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 100) {
_local2 = 100;
}
mcSlider._x = (_local2 * 400) / 100;
mcSlider.startDrag(false, 0, 0, 400, 0);
_parent._parent.start_his_stop();
};
onRelease = function () {
mcSlider.stopDrag();
var _local2 = (_xmouse * 100) / 400;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > 100) {
_local2 = 100;
}
_parent._parent.start_his_jump(_local2);
};
Symbol 202 MovieClip Frame 1
function set_lev() {
i = 0;
while (i < 8) {
if (i > lev) {
eval ("mc" + i).gotoAndStop(2);
} else {
eval ("mc" + i).gotoAndStop(1);
}
i++;
}
}
stop();
lev = 0;
set_lev();
_parent._parent.set_his_play_speed(lev);
onPress = function () {
lev = Math.floor(_xmouse / 8);
if (lev < 0) {
lev = 0;
}
if (lev > 7) {
lev = 7;
}
set_lev();
_parent._parent.set_his_play_speed(lev);
_parent.mcPopup.disappear();
};
onRollOver = function () {
_parent.mcPopup.appear(46, 47, "\u518D\u751F\u30B9\u30D4\u30FC\u30C9\u3092\u5909\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059", "Change playback speed", 0);
};
onRollOut = function () {
_parent.mcPopup.disappear();
};
Symbol 206 Button
on (release) {
_parent.start_his_start();
mcPlayStop.gotoAndStop(1);
}
on (rollOver) {
mcPopup.appear(206, 47, "\u5C65\u6B74\u306E\u5148\u982D\u306B\u79FB\u52D5\u3057\u307E\u3059", "Go to the start", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 208 Button
on (release) {
_parent.replay_back();
mcPlayStop.gotoAndStop(1);
}
on (rollOver) {
mcPopup.appear(492, 47, "1\u624B\u3082\u3069\u308B", "Undo", 1);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 210 Button
on (release) {
_parent.replay_next();
mcPlayStop.gotoAndStop(1);
}
on (rollOver) {
mcPopup.appear(524, 47, "1\u624B\u3059\u3059\u3080", "Redo", 1);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 212 Button
on (release) {
_parent.start_his_end();
mcPlayStop.gotoAndStop(1);
}
on (rollOver) {
mcPopup.appear(238, 47, "\u5C65\u6B74\u306E\u6700\u5F8C\u306B\u79FB\u52D5\u3057\u307E\u3059", "Go to the end", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 214 Button
on (release) {
_parent._parent.start_his_play();
gotoAndStop (2);
}
on (rollOver) {
_parent.mcPopup.appear(160, 47, "\u5C65\u6B74\u3092\u518D\u751F\u3057\u307E\u3059", "Replay your solving history", 0);
}
on (rollOut, press, dragOut) {
_parent.mcPopup.disappear();
}
Symbol 218 Button
on (release) {
_parent._parent.start_his_stop();
gotoAndStop (1);
}
Symbol 219 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 1
function appear(jp, en) {
jp_txt = jp;
en_txt = en;
gotoAndStop (2);
}
function disappear() {
gotoAndStop (1);
}
stop();
_visible = false;
Symbol 223 MovieClip Frame 2
stop();
_visible = true;
_alpha = 0;
onEnterFrame = function () {
_alpha = (_alpha + 20);
if (_alpha >= 100) {
delete onEnterFrame;
gotoAndPlay (3);
}
};
Symbol 223 MovieClip Frame 3
tf.text = ((_root.lang > 0) ? "Finished" : "\u518D\u751F\u7D42\u4E86");
Symbol 224 MovieClip Frame 1
_visible = false;
Symbol 224 MovieClip Frame 2
stop();
_visible = true;
Symbol 224 MovieClip Frame 8
stop();
if (_parent.lvLoad.dataSaveUrl == undefined) {
btSave._visible = false;
mcSaveText._visible = false;
}
Symbol 224 MovieClip Frame 16
stop();
Symbol 224 MovieClip Frame 23
stop();
Symbol 224 MovieClip Frame 30
stop();
Symbol 224 MovieClip Frame 36
stop();
Symbol 224 MovieClip Frame 43
stop();
Symbol 224 MovieClip Frame 50
stop();
Instance of Symbol 219 MovieClip "mcPlayStop" in Symbol 224 MovieClip Frame 50
/* no clip actions */
Symbol 228 Button
on (press) {
_parent.disappear_input_bar();
}
Symbol 235 Button
on (release) {
_parent.input_from_bar(1);
}
Symbol 237 Button
on (release) {
_parent.input_from_bar(2);
}
Symbol 239 Button
on (release) {
_parent.input_from_bar(3);
}
Symbol 241 Button
on (release) {
_parent.input_from_bar(4);
}
Symbol 243 Button
on (release) {
_parent.input_from_bar(5);
}
Symbol 245 Button
on (release) {
_parent.input_from_bar(6);
}
Symbol 247 Button
on (release) {
_parent.input_from_bar(7);
}
Symbol 249 Button
on (release) {
_parent.input_from_bar(8);
}
Symbol 251 Button
on (release) {
_parent.input_from_bar(9);
}
Symbol 255 Button
on (release) {
_parent.disappear_input_bar();
}
Symbol 259 Button
on (release) {
_parent.input_from_bar(0);
}
Symbol 260 MovieClip Frame 1
stop();
_visible = false;
Symbol 260 MovieClip Frame 2
stop();
_visible = true;
Symbol 269 MovieClip Frame 1
stop();
Symbol 271 Button
on (press) {
this._alpha = 0;
tfComment._visible = false;
}
on (release, dragOut) {
this._alpha = 100;
tfComment._visible = true;
}
Symbol 275 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 279 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 285 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 288 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 291 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 294 Button
on (release) {
_parent.on_dialog_save(savemode, tfComment.text);
}
on (rollOver) {
mcPopup.appear(380, 466, "\u89E3\u7B54\u5C65\u6B74\u3092\u767B\u9332\u3057\u307E\u3059", "Register your solving history", 0);
}
on (rollOut, press, dragOut) {
mcPopup.disappear();
}
Symbol 297 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 303 Button
on (release) {
_root.gotoAndStop("select");
}
Symbol 305 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 306 MovieClip Frame 1
stop();
_visible = false;
Symbol 306 MovieClip Frame 2
_visible = true;
play();
Symbol 306 MovieClip Frame 11
function set_kokai(v) {
if (v == 0) {
mcCheck0.mcCheck.gotoAndStop(1);
mcCheck1.mcCheck.gotoAndStop(2);
} else {
mcCheck0.mcCheck.gotoAndStop(2);
mcCheck1.mcCheck.gotoAndStop(1);
}
savemode = v;
}
stop();
switch (Number(_parent.lvLoad.dataLevel)) {
case 1 :
mcChara.gotoAndStop(1);
break;
case 2 :
mcChara.gotoAndStop(2);
break;
case 3 :
mcChara.gotoAndStop(3);
break;
case 4 :
mcChara.gotoAndStop(4);
break;
default :
mcChara.gotoAndStop(1);
}
n = _parent.dataSolveTime;
s0 = n % 10;
n = Math.floor(n / 10);
s1 = n % 6;
n = Math.floor(n / 6);
m0 = n % 10;
n = Math.floor(n / 10);
m1 = n % 6;
n = Math.floor(n / 6);
hh = n;
time_txt = "";
if (hh > 0) {
time_txt = time_txt + (hh + ":");
}
time_txt = time_txt + ((((((m1 + "") + m0) + ":") + s1) + "") + s0);
if (_root.lang > 0) {
tesu = "Steps: " + _parent.HisCnt;
jikan = "Time: " + time_txt;
} else {
tesu = ("\u624B\u6570: " + _parent.HisCnt) + "\u624B";
jikan = "\u6642\u9593: " + time_txt;
}
set_kokai(0);
myListener = new Object();
myListener.onChanged = function () {
var _local2 = 100;
var _local1 = tfComment.text;
if (_local1.length > _local2) {
tfComment.text = _local1.slice(0, _local2);
}
};
tfComment.addListener(myListener);
if (_parent.lvLoad.dataSaveUrl == undefined) {
gotoAndStop ("no_url");
}
Instance of Symbol 282 MovieClip "mcCheck0" in Symbol 306 MovieClip Frame 11
on (press) {
_parent.set_kokai(0);
}
Instance of Symbol 285 MovieClip "mcCheck1" in Symbol 306 MovieClip Frame 11
on (press) {
_parent.set_kokai(1);
}
Symbol 306 MovieClip Frame 20
stop();
Symbol 311 Button
on (release) {
_parent.on_dialog_save(2, tfComment.text);
}
Symbol 312 Button
on (release) {
_parent.on_dialog_save_cancel();
}
Symbol 315 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 318 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 321 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 324 MovieClip Frame 1
stop();
if (_root.lang > 0) {
gotoAndStop (2);
}
Symbol 325 MovieClip Frame 1
stop();
_visible = false;
Symbol 325 MovieClip Frame 2
_visible = true;
Symbol 325 MovieClip Frame 7
stop();
myListener = new Object();
myListener.onChanged = function () {
var _local2 = 100;
var _local1 = tfComment.text;
if (_local1.length > _local2) {
tfComment.text = _local1.slice(0, _local2);
}
};
tfComment.addListener(myListener);
Symbol 329 Button
on (release) {
gotoAndStop(_currentframe + 1);
}
Symbol 335 Button
on (release) {
_parent.loadUrl = tfLoadUrl.text;
_parent.lang = tfLang.text;
gotoAndStop(_currentframe + 1);
}
Symbol 338 Button
on (release) {
gotoAndPlay ("idraw");
}
Symbol 340 MovieClip Frame 1
WidthLevel = 1;
NumKeyAppear = 1;
UseMemo = 1;
NumCompleted = 0;
soName = "gamedesign";
bigMap = 0;
zoom_per = 1;
lvLoad = new Object();
lvLoad.dataPlayMode = "0";
v = ["1", "1", "2", "2", "3"];
lvLoad.dataLevel = v[_root.qnum];
gotoAndPlay ("idraw");
Symbol 340 MovieClip Frame 2
gotoAndStop ("load");
Symbol 340 MovieClip Frame 3
stop();
tfParam.text = "";
tfParam.text = tfParam.text + (("lang=" + _parent.lang) + newline);
tfParam.text = tfParam.text + (("loadUrl=" + _parent.loadUrl) + newline);
Symbol 340 MovieClip Frame 4
stop();
mcTusin.gotoAndStop(2);
System.useCodepage = false;
lvLoad = new LoadVars();
lvLoad.onLoad = function (success) {
mcTusin.gotoAndStop(1);
if (success) {
if (lvLoad.dataErrorValue == 0) {
gotoAndPlay ("idraw");
} else {
gotoAndStop ("error");
}
} else {
gotoAndStop ("error");
}
};
lvLoad.load(_parent.loadUrl);
Symbol 340 MovieClip Frame 10
stop();
Symbol 340 MovieClip Frame 11
stop();
mcTusin.gotoAndStop(2);
System.useCodepage = ((_parent.lang == 0) ? true : false);
lvLoad = new LoadVars();
lvLoad.onLoad = function (success) {
mcTusin.gotoAndStop(1);
if (success) {
gotoAndStop ("loaded");
} else {
gotoAndStop ("error");
}
};
lvLoad.load(_parent.loadUrl);
Symbol 340 MovieClip Frame 16
stop();
tfGet.text = "";
tfGet.text = tfGet.text + (("dataLang=" + lvLoad.dataLang) + newline);
tfGet.text = tfGet.text + (("dataSaveUrl=" + lvLoad.dataSaveUrl) + newline);
tfGet.text = tfGet.text + (("dataErrorValue=" + lvLoad.dataErrorValue) + newline);
tfGet.text = tfGet.text + (("dataErrorMessage=" + lvLoad.dataErrorMessage) + newline);
tfGet.text = tfGet.text + (("dataPlayMode=" + lvLoad.dataPlayMode) + newline);
tfGet.text = tfGet.text + (("dataQuestionNumber=" + lvLoad.dataQuestionNumber) + newline);
tfGet.text = tfGet.text + (("dataReturnUrl=" + lvLoad.dataReturnUrl) + newline);
tfGet.text = tfGet.text + (("dataLevel=" + lvLoad.dataLevel) + newline);
tfGet.text = tfGet.text + (("dataSize=" + lvLoad.dataSize) + newline);
tfGet.text = tfGet.text + (("dataQuestion=" + lvLoad.dataQuestion) + newline);
tfGet.text = tfGet.text + (("dataSolution=" + lvLoad.dataSolution) + newline);
tfGet.text = tfGet.text + (("dataAuthor=" + lvLoad.dataAuthor) + newline);
tfGet.text = tfGet.text + (("dataRomanAuthor=" + lvLoad.dataRomanAuthor) + newline);
tfGet.text = tfGet.text + (("dataTime=" + lvLoad.dataTime) + newline);
tfGet.text = tfGet.text + (("dataMiscData=" + lvLoad.dataMiscData) + newline);
tfGet.text = tfGet.text + (("dataHistory=" + lvLoad.dataHistory) + newline);
tfGet.text = tfGet.text + (("dataSolveCount=" + lvLoad.dataSolveCount) + newline);
tfGet.text = tfGet.text + (("dataSolveTime=" + lvLoad.dataSolveTime) + newline);
tfGet.text = tfGet.text + (("dataSolveComment=" + lvLoad.dataSolveComment) + newline);
tfGet.text = tfGet.text + (("dataAnswer=" + lvLoad.dataAnswer) + newline);
Symbol 340 MovieClip Frame 22
xmax = 9;
ymax = 9;
cel = new Array(ymax);
i = 0;
while (i < ymax) {
cel[i] = new Array(xmax);
j = 0;
while (j < xmax) {
cel[i][j] = new Object();
cel[i][j].num = [0, 0, 0, 0, 0];
cel[i][j].trymode = [0, 0, 0, 0, 0];
cel[i][j].fix = 0;
j++;
}
i++;
}
dataQuestion = eval ("_root.q" + _root.qnum);
c = 0;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
n = Number(dataQuestion.charAt(c));
cel[i][j].num[0] = n;
if (n > 0) {
cel[i][j].fix = 1;
}
c++;
j++;
}
i++;
}
Symbol 340 MovieClip Frame 23
function draw_grid() {
var i;
var j;
var x;
var y;
var lw = (((WidthLevel * cel_w) / 32) / 2);
if (lw < 0) {
lw = 0;
}
var lw2 = (lw * 2);
if (lw2 < 3) {
lw2 = 3;
}
var len = (((xmax * cel_w) + (lw * 10)) + (lw2 * 4));
draw_ox = (area_x + (area_w / 2)) - (len / 2);
draw_oy = (area_y + (area_h / 2)) - (len / 2);
var mc;
var col = color_fix;
mc = mcPuzzle.mcBlack;
mc.clear();
mc.beginFill(col);
mc.lineStyle();
mc.moveTo(draw_ox, draw_oy);
mc.lineTo(draw_ox + len, draw_oy);
mc.lineTo(draw_ox + len, draw_oy + len);
mc.lineTo(draw_ox, draw_oy + len);
mc.endFill();
mc = mcPuzzle.mcWhite;
mc.clear();
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var x = (((draw_ox + lw2) + lw) + (j * (cel_w + lw)));
var y = (((draw_oy + lw2) + lw) + (i * (cel_w + lw)));
if (j >= 3) {
x = x + lw2;
}
if (j >= 6) {
x = x + lw2;
}
if (i >= 3) {
y = y + lw2;
}
if (i >= 6) {
y = y + lw2;
}
mc.beginFill(16777215);
mc.lineStyle();
mc.moveTo(x, y);
mc.lineTo(x + cel_w, y);
mc.lineTo(x + cel_w, y + cel_w);
mc.lineTo(x, y + cel_w);
mc.endFill();
j++;
}
i++;
}
mc = mcPuzzle.mcTate;
mc.clear();
if (WidthLevel == 0) {
j = 1;
while (j < xmax) {
if ((j % 3) == 0) {
} else {
x = ((draw_ox + lw2) + lw) + (j * (cel_w + lw));
if (j >= 3) {
x = x + lw2;
}
if (j >= 6) {
x = x + lw2;
}
mc.lineStyle(0, col, 100);
mc.moveTo(x, draw_oy + lw2);
mc.lineTo(x, (draw_oy + len) - lw2);
}
j++;
}
}
mc = mcPuzzle.mcYoko;
mc.clear();
if (WidthLevel == 0) {
i = 1;
while (i < ymax) {
if ((i % 3) == 0) {
} else {
y = ((draw_oy + lw2) + lw) + (i * (cel_w + lw));
if (i >= 3) {
y = y + lw2;
}
if (i >= 6) {
y = y + lw2;
}
mc.lineStyle(0, col, 100);
mc.moveTo(draw_ox + lw2, y);
mc.lineTo((draw_ox + len) - lw2, y);
}
i++;
}
}
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
mc._x = ((draw_ox + lw2) + lw) + (j * (cel_w + lw));
mc._y = ((draw_oy + lw2) + lw) + (i * (cel_w + lw));
if (j >= 3) {
mc._x = mc._x + lw2;
}
if (j >= 6) {
mc._x = mc._x + lw2;
}
if (i >= 3) {
mc._y = mc._y + lw2;
}
if (i >= 6) {
mc._y = mc._y + lw2;
}
j++;
}
i++;
}
}
function draw_all_cel() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
mc.num0 = numstr[cel[i][j].num[0]];
mc.num1 = numstr2[cel[i][j].num[1]];
mc.num2 = numstr2[cel[i][j].num[2]];
mc.num3 = numstr2[cel[i][j].num[3]];
mc.num4 = numstr2[cel[i][j].num[4]];
mc.gotoAndStop(((cel[i][j].num[0] == 0) ? "sub" : "num"));
var k = 0;
while (k < 5) {
var col = color_txt;
if (k > 0) {
col = color_sub;
}
if (cel[i][j].fix) {
col = color_fix;
}
if (cel[i][j].trymode[k] == 1) {
col = color_try1;
}
if (cel[i][j].trymode[k] == 2) {
col = color_try2;
}
mc["tf" + k].textColor = col;
k++;
}
j++;
}
i++;
}
}
function draw_cel(x, y, imode, n) {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + x) + "_") + y);
switch (imode) {
case 0 :
mc.num0 = numstr[n];
break;
case 1 :
mc.num1 = numstr2[n];
break;
case 2 :
mc.num2 = numstr2[n];
break;
case 3 :
mc.num3 = numstr2[n];
break;
case 4 :
mc.num4 = numstr2[n];
}
mc.gotoAndStop(((cel[y][x].num[0] == 0) ? "sub" : "num"));
var col = color_txt;
if (imode > 0) {
col = color_sub;
}
if (cel[y][x].fix) {
col = color_fix;
}
if (cel[y][x].trymode[imode] == 1) {
col = color_try1;
}
if (cel[y][x].trymode[imode] == 2) {
col = color_try2;
}
mc["tf" + imode].textColor = col;
}
function default_text_color() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
var k = 0;
while (k < 5) {
var col = color_txt;
if (k > 0) {
col = color_sub;
}
if (cel[i][j].fix) {
col = color_fix;
}
if (cel[i][j].trymode[k] == 1) {
col = color_try1;
}
if (cel[i][j].trymode[k] == 2) {
col = color_try2;
}
mc["tf" + k].textColor = col;
k++;
}
j++;
}
i++;
}
}
function appear_curs() {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + curs_x) + "_") + curs_y);
var x = mc._x;
var y = mc._y;
mcPuzzle.mcCurs._visible = true;
mcPuzzle.mcCurs._x = x;
mcPuzzle.mcCurs._y = y;
mcPuzzle.mcCursUnder._visible = true;
mcPuzzle.mcCursUnder._x = x;
mcPuzzle.mcCursUnder._y = y;
mcPuzzle.mcCursUnder.gotoAndStop("num" + input_mode);
}
function disappear_curs() {
mcPuzzle.mcCurs._visible = false;
mcPuzzle.mcCursUnder._visible = false;
}
area_x = 10;
area_y = 85;
area_w = 780;
area_h = 480;
xw = area_w / (xmax + 3);
yw = area_h / (ymax + 3);
cel_w = Math.min(xw, yw);
cel_ox = 0;
cel_oy = 0;
color_txt = 0;
color_sub = 6710886 /* 0x666666 */;
color_fix = 7829367 /* 0x777777 */;
color_try1 = 8930304 /* 0x884400 */;
color_try2 = 16750848 /* 0xFF9900 */;
numstr = ["", "\uFF11", "\uFF12", "\uFF13", "\uFF14", "\uFF15", "\uFF16", "\uFF17", "\uFF18", "\uFF19"];
numstr2 = ["", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
id = 0;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
var mcName = ((("num_" + j) + "_") + i);
mcPuzzle.mcNumLayer.attachMovie("mcNumOrg", mcName, id);
mcPuzzle.mcNumLayer[mcName]._x = j * cel_w;
mcPuzzle.mcNumLayer[mcName]._y = i * cel_w;
mcPuzzle.mcNumLayer[mcName]._xscale = (100 * cel_w) / 32;
mcPuzzle.mcNumLayer[mcName]._yscale = (100 * cel_w) / 32;
mcPuzzle.mcNumLayer[mcName].num0 = "";
mcPuzzle.mcNumLayer[mcName].num1 = "";
mcPuzzle.mcNumLayer[mcName].num2 = "";
mcPuzzle.mcNumLayer[mcName].num3 = "";
mcPuzzle.mcNumLayer[mcName].num4 = "";
id++;
j++;
}
i++;
}
mcPuzzle.mcNumLayer._visible = false;
mcPuzzle.mcCurs._xscale = (100 * cel_w) / 32;
mcPuzzle.mcCurs._yscale = (100 * cel_w) / 32;
mcPuzzle.mcCurs._visible = false;
mcPuzzle.mcCursUnder._xscale = (100 * cel_w) / 32;
mcPuzzle.mcCursUnder._yscale = (100 * cel_w) / 32;
mcPuzzle.mcCursUnder._visible = false;
Symbol 340 MovieClip Frame 24
function enable_input(f) {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
if (cel[i][j].wall) {
} else {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
mc.bt0._visible = f;
}
j++;
}
i++;
}
if (f) {
if (UseMemo) {
enable_memo(true);
} else {
enable_memo(false);
}
mcPuzzle.mcCurs._visible = true;
mcPuzzle.mcCursUnder._visible = true;
} else {
enable_memo(false);
disappear_input_bar();
mcPuzzle.mcCurs._visible = false;
mcPuzzle.mcCursUnder._visible = false;
}
}
function enable_memo(f) {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
if (cel[i][j].wall) {
} else if (cel[i][j].num[0]) {
} else {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
mc.bt1._visible = f;
mc.bt2._visible = f;
mc.bt3._visible = f;
mc.bt4._visible = f;
}
j++;
}
i++;
}
}
gotoAndPlay ("icheck");
Symbol 340 MovieClip Frame 28
function check_clear() {
var _local1;
var _local2;
var _local8;
var _local7;
_local1 = 0;
while (_local1 < ymax) {
_local2 = 0;
while (_local2 < xmax) {
drawpat[_local1][_local2] = 0;
_local2++;
}
_local1++;
}
var _local10 = 0;
_local7 = 0;
while (_local7 < ymax) {
_local8 = 0;
while (_local8 < xmax) {
if (cel[_local7][_local8].num[0] == 0) {
_local10 = 1;
drawpat[_local7][_local8] = 1;
draw_check();
return(0);
}
_local8++;
}
_local7++;
}
if (_local10) {
draw_check();
return(0);
}
var _local3 = new Array(10);
var _local6 = new Array(10);
var _local5 = new Array(10);
var _local9 = 0;
_local8 = 0;
while (_local8 < xmax) {
_local1 = 0;
while (_local1 < 10) {
_local3[_local1] = 0;
_local1++;
}
_local7 = 0;
while (_local7 < ymax) {
var _local4 = cel[_local7][_local8].num[0];
if (_local4 == 0) {
} else {
if (_local3[_local4]) {
_local9 = 1;
drawpat[_local7][_local8] = 1;
drawpat[_local5[_local4]][_local6[_local4]] = 1;
draw_check();
return(0);
}
_local3[_local4]++;
_local6[_local4] = _local8;
_local5[_local4] = _local7;
}
_local7++;
}
_local8++;
}
_local7 = 0;
while (_local7 < ymax) {
_local1 = 0;
while (_local1 < 10) {
_local3[_local1] = 0;
_local1++;
}
_local8 = 0;
while (_local8 < xmax) {
var _local4 = cel[_local7][_local8].num[0];
if (_local4 == 0) {
} else {
if (_local3[_local4]) {
_local9 = 1;
drawpat[_local7][_local8] = 1;
drawpat[_local5[_local4]][_local6[_local4]] = 1;
draw_check();
return(0);
}
_local3[_local4]++;
_local6[_local4] = _local8;
_local5[_local4] = _local7;
}
_local8++;
}
_local7++;
}
_local1 = 0;
while (_local1 < 9) {
_local2 = 0;
while (_local2 < 10) {
_local3[_local2] = 0;
_local2++;
}
_local2 = 0;
while (_local2 < 9) {
_local8 = (Math.floor(_local1 % 3) * 3) + Math.floor(_local2 % 3);
_local7 = (Math.floor(_local1 / 3) * 3) + Math.floor(_local2 / 3);
var _local4 = cel[_local7][_local8].num[0];
if (_local4 == 0) {
} else {
if (_local3[_local4]) {
_local9 = 1;
drawpat[_local7][_local8] = 1;
drawpat[_local5[_local4]][_local6[_local4]] = 1;
draw_check();
return(0);
}
_local3[_local4]++;
_local6[_local4] = _local8;
_local5[_local4] = _local7;
}
_local2++;
}
_local1++;
}
if (_local9) {
draw_check();
return(0);
}
return(1);
}
function draw_check() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
if (drawpat[i][j] == 0) {
} else {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
mc.mcCheck.gotoAndStop(2);
}
j++;
}
i++;
}
}
function end_check_proc() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
if (drawpat[i][j] == 0) {
} else {
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + j) + "_") + i);
mc.mcCheck.gotoAndStop(1);
}
j++;
}
i++;
}
}
drawpat = new Array(ymax);
i = 0;
while (i < ymax) {
drawpat[i] = new Array(xmax);
i++;
}
gotoAndPlay ("iEvent");
Symbol 340 MovieClip Frame 34
function on_menu_clear() {
on_play = 0;
enable_input(false);
mcMenu.gotoAndStop("reset");
}
function on_menu_clear_cancel() {
on_play = 1;
enable_input(true);
if (TryMode > 0) {
mcMenu.gotoAndStop("try");
} else {
mcMenu.gotoAndStop("default");
}
}
function on_menu_clear_do() {
_root.gotoAndStop("select");
return(undefined);
while (_local4 < ymax) {
var _local3 = 0;
while (_local3 < xmax) {
if (cel[_local4][_local3].fix) {
} else {
var _local2 = 0;
while (_local2 < 5) {
cel[_local4][_local3].num[_local2] = 0;
cel[_local4][_local3].trymode[_local2] = 0;
_local2++;
}
}
_local3++;
}
_local4++;
}
draw_all_cel();
mcMenu.gotoAndStop("default");
check_num_complete();
TryMode = 0;
init_his();
lastTry = 0;
mcPuzzle.mcLastTry.gotoAndStop(1);
}
function on_menu_undo() {
disappear_input_bar();
if (TryMode == 0) {
if (HisCnt < 1) {
return(undefined);
}
var _local1 = HisCnt - 1;
var _local5 = His[_local1].x;
var _local4 = His[_local1].y;
var _local2 = Math.floor(His[_local1].old / 10);
var _local3 = His[_local1].old % 10;
cel[_local4][_local5].num[_local2] = _local3;
draw_cel(_local5, _local4, _local2, _local3);
HisCnt--;
lastTry = 0;
mcPuzzle.mcLastTry.gotoAndStop(1);
} else {
if (HisTryCnt < 1) {
return(undefined);
}
var _local1 = HisTryCnt - 1;
var _local5 = HisTry[_local1].x;
var _local4 = HisTry[_local1].y;
var _local2 = Math.floor(HisTry[_local1].old / 10);
var _local3 = HisTry[_local1].old % 10;
cel[_local4][_local5].num[_local2] = _local3;
draw_cel(_local5, _local4, _local2, _local3);
HisTryCnt--;
}
check_num_complete();
}
function on_menu_check() {
on_play = 0;
enable_input(false);
if (check_clear()) {
DisableClick = 1;
if (TryMode > 0) {
copy_his_try();
}
mcLeftBottom._visible = false;
mcMenu.gotoAndStop("clear");
mcTimer.stop_timer();
dataSolveTime = mcTimer.disp_time;
mcClear.gotoAndPlay(2);
} else {
mcMenu.gotoAndStop("check");
draw_check();
if (LoopID == 1) {
draw_all_lines_check(0);
} else {
draw_all_lines_check(1);
}
}
}
function on_menu_check_return() {
on_play = 1;
enable_input(true);
if (TryMode > 0) {
mcMenu.gotoAndStop("try");
} else {
mcMenu.gotoAndStop("default");
}
end_check_proc();
}
function on_menu_try() {
TryMode = 1;
TryStart = 1;
mcMenu.gotoAndStop("try");
init_his_try();
disappear_input_bar();
}
function on_menu_try_fix() {
disappear_input_bar();
var _local3 = 0;
while (_local3 < ymax) {
var _local2 = 0;
while (_local2 < xmax) {
var _local1 = 0;
while (_local1 < 5) {
cel[_local3][_local2].trymode[_local1] = 0;
_local1++;
}
_local2++;
}
_local3++;
}
draw_all_cel();
default_text_color();
TryMode = 0;
mcMenu.gotoAndStop("default");
copy_his_try();
lastTry = 0;
mcPuzzle.mcLastTry.gotoAndStop(1);
}
function on_menu_try_clear() {
disappear_input_bar();
var _local3 = 0;
while (_local3 < ymax) {
var _local2 = 0;
while (_local2 < xmax) {
var _local1 = 0;
while (_local1 < 5) {
if (cel[_local3][_local2].trymode[_local1]) {
cel[_local3][_local2].trymode[_local1] = 0;
cel[_local3][_local2].num[_local1] = 0;
}
_local1++;
}
_local2++;
}
_local3++;
}
draw_all_cel();
default_text_color();
TryMode = 0;
mcMenu.gotoAndStop("default");
check_num_complete();
if (lastTry) {
mcPuzzle.mcLastTry.gotoAndStop(2);
}
}
function on_menu_save() {
on_play = 0;
enable_input(false);
DisableClick = 1;
mcMenu.gotoAndStop("save");
mcLeftBottom._visible = false;
mcTimer.stop_timer();
dataSolveTime = mcTimer.disp_time;
mcSave.gotoAndPlay(2);
}
function on_dialog_save(savemode, comment) {
dataSaveMode = savemode;
dataSolveComment = comment;
gotoAndStop ("save");
}
function on_dialog_save_cancel() {
mcSave.gotoAndStop(1);
DisableClick = 0;
if (TryMode > 0) {
mcMenu.gotoAndStop("try");
} else {
mcMenu.gotoAndStop("default");
}
mcTimer.start_timer();
on_play = 1;
enable_input(true);
mcLeftBottom._visible = true;
}
function start_history() {
gotoAndStop ("history");
}
function set_line_width(lev) {
WidthLevel = lev;
draw_grid();
appear_curs();
so = SharedObject.getLocal(soName);
so.data.sd_WidthLevel = WidthLevel;
so.flush();
}
function change_num_key_appear() {
NumKeyAppear = ((NumKeyAppear == 0) ? 1 : 0);
mcLeftBottom.mcNumKey.mcCheckBox.gotoAndStop(1 + NumKeyAppear);
if (NumKeyAppear == 0) {
disappear_input_bar();
} else if (on_play == 1) {
appear_input_bar();
}
so = SharedObject.getLocal(soName);
so.data.sd_NumKeyAppear = NumKeyAppear;
so.flush();
}
function change_use_memo() {
UseMemo = ((UseMemo == 0) ? 1 : 0);
mcLeftBottom.mcUseMemo.mcCheckBox.gotoAndStop(1 + UseMemo);
if (UseMemo == 0) {
enable_memo(false);
} else if (on_play) {
enable_memo(true);
}
so = SharedObject.getLocal(soName);
so.data.sd_UseMemo = UseMemo;
so.flush();
}
function change_num_completed() {
NumCompleted = ((NumCompleted == 0) ? 1 : 0);
mcLeftBottom.mcNumCompleted.mcCheckBox.gotoAndStop(1 + NumCompleted);
mcLeftBottom.mcNumCompleted.mcNum._visible = (NumCompleted ? true : false);
so = SharedObject.getLocal(soName);
so.data.sd_NumCompleted = NumCompleted;
so.flush();
}
function check_num_complete() {
var i;
var j;
var cnt = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
var n = cel[i][j].num[0];
cnt[n]++;
j++;
}
i++;
}
i = 1;
while (i <= 9) {
var mc = eval ("mcLeftBottom.mcNumCompleted.mcNum.tf" + i);
mc.textColor = ((cnt[i] == 9) ? 13421772 : 0);
i++;
}
}
gotoAndPlay ("iplay");
Symbol 340 MovieClip Frame 40
function click_cel(cel_name, imode) {
if (on_play != 1) {
return(undefined);
}
input_mode = imode;
var _local1 = cel_name.split("_");
curs_x = Number(_local1[1]);
curs_y = Number(_local1[2]);
appear_curs();
if (cel[curs_y][curs_x].fix) {
disappear_input_bar();
return(undefined);
}
appear_input_bar();
}
function input_from_bar(n) {
if (on_play != 1) {
return(undefined);
}
input_num(n);
}
function input_from_key(n, sub_key) {
if (on_play != 1) {
return(undefined);
}
if (cel[curs_y][curs_x].fix) {
return(undefined);
}
if (sub_key) {
if (cel[curs_y][curs_x].num[0] > 0) {
return(undefined);
}
var _local1 = 0;
var _local2 = 0;
i = 4;
while (i >= 1) {
if (cel[curs_y][curs_x].num[i] == 0) {
_local1 = i;
}
if (cel[curs_y][curs_x].num[i] == n) {
_local2 = i;
}
i--;
}
if (_local2) {
_local1 = _local2;
n = 0;
}
if (_local1 == 0) {
return(undefined);
}
input_mode = _local1;
appear_curs();
}
input_num(n);
}
function input_dir(ax, ay) {
if (on_play != 1) {
return(undefined);
}
var _local2 = curs_x + ax;
var _local1 = curs_y + ay;
if (_local2 < 0) {
return(undefined);
}
if (_local2 > (xmax - 1)) {
return(undefined);
}
if (_local1 < 0) {
return(undefined);
}
if (_local1 > (ymax - 1)) {
return(undefined);
}
curs_x = _local2;
curs_y = _local1;
input_mode = 0;
appear_curs();
disappear_input_bar();
}
function change_input_mode() {
if (on_play != 1) {
return(undefined);
}
input_mode++;
if (input_mode > 4) {
input_mode = 0;
}
appear_curs();
}
function input_num(n) {
var _local2 = curs_x;
var _local1 = curs_y;
if (cel[_local1][_local2].fix) {
return(undefined);
}
if ((input_mode > 0) && (cel[_local1][_local2].num[0] > 0)) {
return(undefined);
}
if (TryMode) {
if ((cel[_local1][_local2].trymode[input_mode] == 0) && (cel[_local1][_local2].num[input_mode] > 0)) {
return(undefined);
}
}
var _local3 = cel[_local1][_local2].num[input_mode] + (input_mode * 10);
var _local5 = n + (input_mode * 10);
input_pat(_local2, _local1, _local3, _local5);
cel[_local1][_local2].num[input_mode] = n;
cel[_local1][_local2].trymode[input_mode] = TryMode;
draw_cel(_local2, _local1, input_mode, n);
check_num_complete();
disappear_input_bar();
mcPuzzle.mcLastTry.gotoAndStop(1);
if (TryMode == 1) {
TryMode = 2;
}
}
function appear_input_bar() {
if (NumKeyAppear != 1) {
return(undefined);
}
var mc = eval ((("mcPuzzle.mcNumLayer.num_" + curs_x) + "_") + curs_y);
var x = mc._x;
var y = mc._y;
mcInput._x = x;
if (mcInput._x > 624) {
mcInput._x = 624;
}
if (mcInput._x < 54) {
mcInput._x = 54;
}
mcInput._y = y;
mcInput.gotoAndStop(2);
}
function disappear_input_bar() {
mcInput.gotoAndStop(1);
}
function init_his() {
HisCnt = 0;
}
function init_his_try() {
HisTryCnt = 0;
}
function input_pat(x, y, old, dest) {
if (TryMode == 0) {
His[HisCnt] = new Object();
His[HisCnt].x = x;
His[HisCnt].y = y;
His[HisCnt].old = old;
His[HisCnt].dest = dest;
His[HisCnt].tc = tickCount;
HisCnt++;
} else {
HisTry[HisTryCnt] = new Object();
HisTry[HisTryCnt].x = x;
HisTry[HisTryCnt].y = y;
HisTry[HisTryCnt].old = old;
HisTry[HisTryCnt].dest = dest;
HisTry[HisTryCnt].tc = tickCount;
HisTryCnt++;
if (HisTryCnt == 1) {
lastTry = 1;
lastTryX = x;
lastTryY = y;
}
}
}
function copy_his_try() {
var _local1;
_local1 = 0;
while (_local1 < HisTryCnt) {
His[HisCnt] = new Object();
His[HisCnt].x = HisTry[_local1].x;
His[HisCnt].y = HisTry[_local1].y;
His[HisCnt].old = HisTry[_local1].old;
His[HisCnt].dest = HisTry[_local1].dest;
His[HisCnt].tc = HisTry[_local1].tc;
HisCnt++;
_local1++;
}
}
His = new Array();
HisCnt = 0;
HisTry = new Array();
HisTryCnt = 0;
gotoAndPlay ("start");
Symbol 340 MovieClip Frame 45
TryMode = 0;
TryStart = 0;
on_play = 0;
input_mode = 0;
lastTry = 0;
lastTryX = 5;
lastTryY = 3;
if (bigMap) {
mcFrame.gotoAndStop(3);
mcMask.gotoAndStop(3);
mcTitle._xscale = 50;
mcTitle._yscale = 50;
mcTitle._y = -4;
mcTopRight._xscale = 50;
mcTopRight._yscale = 50;
mcMenu._xscale = 56.25;
mcMenu._yscale = 56.25;
mcMenu._x = 350;
mcMenu._y = 4;
mcLeftBottom._xscale = 70;
mcLeftBottom._yscale = 70;
mcLeftBottom._y = mcLeftBottom._y + 3;
mcTimer._xscale = 75;
mcTimer._yscale = 75;
mcTimer._y = mcTimer._y + 3;
} else {
mcFrame.gotoAndStop(2);
mcMask.gotoAndStop(2);
}
mcPuzzle._x = 0;
mcPuzzle._y = 0;
mcTitle.start_title(lvLoad.dataLevel, lvLoad.dataPlayMode, lvLoad.dataAuthor, lvLoad.dataRomanAuthor, lvLoad.dataAnswer);
mcTopRight.gotoAndStop(2);
mcTimer.start_lev_time(lvLoad.dataTime);
mcLeftBottom.gotoAndStop(2);
tickCount = 0;
if (lvLoad.dataPlayMode < 2) {
so = SharedObject.getLocal(soName);
if (so != null) {
w = so.data.sd_WidthLevel;
if (w != undefined) {
WidthLevel = w;
}
n = so.data.sd_NumKeyAppear;
if (n != undefined) {
NumKeyAppear = n;
}
u = so.data.sd_UseMemo;
if (u != undefined) {
UseMemo = u;
}
p = so.data.sd_NumCompleted;
if (p != undefined) {
NumCompleted = p;
}
}
}
mcMenu.gotoAndStop("default");
mcTimer.set_disp_time(0);
mcPuzzle.mcNumLayer._visible = true;
draw_all_cel();
draw_grid();
curs_x = Math.floor(xmax / 2);
curs_y = Math.floor(ymax / 2);
appear_curs();
check_num_complete();
if (UseMemo) {
enable_memo(true);
} else {
enable_memo(false);
}
gotoAndStop ("play");
Symbol 340 MovieClip Frame 51
stop();
on_play = 1;
mcTimer.gotoAndStop(2);
mcTimer.start_timer();
onEnterFrame = function () {
tickCount++;
};
mcInputCancel.onPress = function () {
disappear_input_bar();
};
mcInputCancel.useHandCursor = false;
Symbol 340 MovieClip Frame 57
function start_his_start() {
delete onEnterFrame;
var _local3 = 0;
while (_local3 < ymax) {
var _local2 = 0;
while (_local2 < xmax) {
if (cel[_local3][_local2].fix) {
} else {
var _local1 = 0;
while (_local1 < 5) {
cel[_local3][_local2].num[_local1] = 0;
_local1++;
}
}
_local2++;
}
_local3++;
}
draw_all_cel();
fpos = 0;
his_c = 0;
mcMenu.mcBar.mcSlider._x = 0;
mcMenu.mcPopupFinish.gotoAndStop(1);
}
function start_his_end() {
start_his_jump(100);
mcMenu.mcPopupFinish.gotoAndStop(1);
}
function set_his_play_speed(lev) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < lev) {
_local2 = _local2 * 2;
_local1++;
}
spd = _local2;
mcMenu.tfSpeed.text = "x" + spd;
}
function start_his_play() {
if (fpos >= tickCount) {
start_his_start();
}
delete onEnterFrame;
mcMenu.mcPopupFinish.gotoAndStop(1);
onEnterFrame = function () {
fpos = fpos + spd;
if (fpos >= tickCount) {
fpos = tickCount;
}
while (his_c < HisCnt) {
if (His[his_c].tc > fpos) {
break;
}
var _local4 = His[his_c].x;
var _local3 = His[his_c].y;
var _local2 = His[his_c].dest % 10;
var _local1 = Math.floor(His[his_c].dest / 10);
cel[_local3][_local4].num[_local1] = _local2;
draw_cel(_local4, _local3, _local1, _local2);
his_c++;
}
mcMenu.mcBar.mcSlider._x = 400 * (fpos / tickCount);
if (fpos >= tickCount) {
delete onEnterFrame;
mcMenu.mcPlayStop.gotoAndStop(1);
mcMenu.mcPopupFinish.appear();
}
};
}
function start_his_stop() {
delete onEnterFrame;
mcMenu.mcPopupFinish.gotoAndStop(1);
}
function start_his_jump(per) {
delete onEnterFrame;
var _local1;
var _local3;
var _local2;
fpos = Math.floor((tickCount * per) / 100);
mcMenu.mcBar.mcSlider._x = 400 * (fpos / tickCount);
_local1 = 0;
while (_local1 < ymax) {
_local3 = 0;
while (_local3 < xmax) {
if (cel[_local1][_local3].fix) {
} else {
_local2 = 0;
while (_local2 < 5) {
cel[_local1][_local3].num[_local2] = 0;
_local2++;
}
}
_local3++;
}
_local1++;
}
his_c = 0;
_local1 = 0;
while (_local1 < HisCnt) {
if (His[_local1].tc > fpos) {
break;
}
var _local7 = His[_local1].x;
var _local6 = His[_local1].y;
var _local5 = His[_local1].dest % 10;
var _local4 = Math.floor(His[_local1].dest / 10);
cel[_local6][_local7].num[_local4] = _local5;
his_c = _local1 + 1;
_local1++;
}
draw_all_cel();
mcMenu.mcPlayStop.gotoAndStop(1);
mcMenu.mcPopupFinish.gotoAndStop(1);
}
function replay_next() {
delete onEnterFrame;
mcMenu.mcPlayStop.gotoAndStop(1);
if (his_c >= HisCnt) {
return(undefined);
}
fpos = His[his_c].tc;
mcMenu.mcBar.mcSlider._x = 400 * (fpos / tickCount);
var _local4 = His[his_c].x;
var _local3 = His[his_c].y;
var _local2 = His[his_c].dest % 10;
var _local1 = Math.floor(His[his_c].dest / 10);
cel[_local3][_local4].num[_local1] = _local2;
draw_cel(_local4, _local3, _local1, _local2);
his_c++;
if (his_c >= HisCnt) {
mcMenu.mcPopupFinish.appear();
} else {
mcMenu.mcPopupFinish.gotoAndStop(1);
}
}
function replay_back() {
delete onEnterFrame;
mcMenu.mcPlayStop.gotoAndStop(1);
if (his_c <= 0) {
return(undefined);
}
var _local1 = his_c - 1;
var _local5 = His[_local1].x;
var _local4 = His[_local1].y;
var _local3 = His[_local1].old % 10;
var _local2 = Math.floor(His[_local1].old / 10);
cel[_local4][_local5].num[_local2] = _local3;
draw_cel(_local5, _local4, _local2, _local3);
his_c--;
if (his_c > 0) {
fpos = His[his_c - 1].tc;
} else {
fpos = 0;
}
mcMenu.mcBar.mcSlider._x = 400 * (fpos / tickCount);
mcMenu.mcPopupFinish.gotoAndStop(1);
}
stop();
on_play = 0;
mcTimer.gotoAndStop(2);
mcTimer.draw_time();
mcMenu.gotoAndStop("history");
start_his_start();
set_his_play_speed(0);
Symbol 340 MovieClip Frame 65
stop();
System.useCodepage = false;
mcSave.gotoAndStop(1);
mcClear.gotoAndStop(1);
mcTusin.gotoAndStop(2);
dataHistory = "";
i = 0;
while (i < HisCnt) {
cx = His[i].x;
cy = His[i].y;
old = His[i].old;
dest = His[i].dest;
if (i > 0) {
sa = His[i].tc - His[i - 1].tc;
} else {
sa = His[i].tc;
}
tm = 15;
k = 1;
j = 0;
while (j < 15) {
if (sa < k) {
tm = j;
break;
}
k = k * 2;
j++;
}
dataHistory = dataHistory + val_chara[cx];
dataHistory = dataHistory + val_chara[cy];
dataHistory = dataHistory + val_chara[old];
dataHistory = dataHistory + val_chara[dest];
dataHistory = dataHistory + val_chara[tm];
i++;
}
dataHistory = dataHistory + val_chara[WidthLevel];
lvSend = new LoadVars();
lvSend.dataSaveMode = dataSaveMode;
lvSend.dataHistory = dataHistory;
lvSend.dataSolveCount = HisCnt;
lvSend.dataSolveTime = dataSolveTime;
lvSend.dataSolveComment = dataSolveComment;
lvSend.dataQuestionNumber = lvLoad.dataQuestionNumber;
lvSend.send(lvLoad.dataSaveUrl, "_self", "POST");
Symbol 340 MovieClip Frame 73
stop();