Frame 1
if (DEBUG) {
fnm = "shisen0.txt";
fnm = "shisenTest.txt";
}
var isFirst = true;
System.useCodepage = true;
stop();
_level0.nextFrame();
_level0.play();
Frame 2
function setVal() {
x0 = Number(mvLoadListener.x0);
y0 = Number(mvLoadListener.y0);
w = Number(mvLoadListener.w);
h = Number(mvLoadListener.h);
nx = Number(mvLoadListener.nx);
ny = Number(mvLoadListener.ny);
url = mvLoadListener.url;
var i = 0;
while (true) {
var wfnm = eval ("mvLoadListener.fnm" + i);
if (wfnm) {
Set("fnm" + i, wfnm);
} else {
return;
}
i++;
}
}
stop();
Instance of Symbol 10 MovieClip "mvLoadListener" in Frame 2
onClipEvent (data) {
_root.setVal();
_root.nextFrame();
}
Instance of Symbol 33 MovieClip "mvLoading1" in Frame 2
onClipEvent (enterFrame) {
update();
}
Frame 3
if (DEBUG) {
}
stop();
mvLoadListener.loadVariables(fnm);
Frame 4
stage = 0;
play();
Frame 5
trace((("_width=" + _width) + " _height=") + _height);
W = 200;
H = 200;
stop();
Frame 6
mvGrpLoad.fnm = eval ("fnm" + stage);
mvGrpLoad.mv = _root.mvLoadBase;
stop();
Frame 7
if (isFirst) {
isFirst = false;
var parX = (W / mvLoadBase._width);
var parY = (H / mvLoadBase._height);
if (parY > parX) {
parX = parY;
mvLoadBase._x = mvLoadBase._x - (((mvLoadBase._width - mvLoadBase._height) >> 1) * parX);
} else {
parY = parX;
mvLoadBase._y = mvLoadBase._y - (((mvLoadBase._height - mvLoadBase._width) >> 1) * parY);
}
mvLoadBase._xscale = parX * 100;
mvLoadBase._yscale = parY * 100;
x0 = x0 - (nx >> 1);
y0 = y0 - (ny >> 1);
nx = nx * parX;
ny = ny * parY;
x0 = mvLoadBase._x + (x0 * parX);
y0 = mvLoadBase._y + (y0 * parY);
}
mvLoadBase._visible = true;
gotoAndPlay ("main");
Frame 10
function released(x0, y0) {
if (isNaN(x0)) {
return(undefined);
}
var _local2 = main.clickPie(x0, y0);
if (_local2 == 2) {
clearGame();
} else if (_local2 == 3) {
mvMsg.startMsg("\u624B\u8A70\u307E\u308A\u3067\u3059", 999, _root, "tedumari");
}
}
function copyMovie(nm, dpt) {
duplicateMovieClip (mvStage.mvPie, nm, dpt + 100);
}
function getNmPie(x0, y0) {
return((("p_" + y0) + "_") + x0);
}
function getPie(x0, y0) {
return(eval ("mvStage." + getNmPie(x0, y0)));
}
function endMsg(id) {
if (id == "clearGame") {
mvClear.startMv();
} else if (id == "tedumari") {
mvLoadBase._visible = false;
gotoAndPlay ("title");
}
}
function clearGame() {
mvMsg.startMsg("\u30AF\u30EA\u30A2\uFF01\n\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30AF\u30EA\u30C3\u30AF\u3067\u6D88\u3057\u305F\u5F8C\u3001\u3055\u3089\u306B\u753B\u9762\u30AF\u30EA\u30C3\u30AF\u3067\u30BF\u30A4\u30C8\u30EB\u3078\u623B\u308A\u307E\u3059", 999, _root, "clearGame");
}
function nextStage() {
mvClear.stopMv();
if (eval ("fnm" + (stage + 1))) {
stage++;
gotoAndPlay ("ready");
} else if (url) {
getURL (url);
} else {
gotoAndPlay ("title");
}
}
var main = new Main(w, h, x0, y0, nx, ny);
main.init();
mvLoadBase._visible = true;
mvLoadBase._alpha = 100;
mvStage.mvPie._visible = false;
stop();
Symbol 7 Button
on (release) {
getURL ("http://www.macromedia.com/jp/shockwave/download/frameset.fhtml?Lang=Japanese&P5_Language=Japanese&P1_Prod_Version=ShockwaveFlash&Lang=Japanese", "_self");
}
Symbol 122 MovieClip [__Packages.Main] Frame 0
class Main
{
var map, x0, y0, nx, ny, nowStock, xStock, yStock;
function Main (w, h, x0, y0, nx, ny) {
map = new Map(w, h, x0, y0, nx, ny);
this.x0 = x0;
this.y0 = y0;
this.nx = nx;
this.ny = ny;
}
function init() {
map.init();
nowStock = -1;
}
function doStockOn(kind, x0, y0) {
nowStock = kind;
xStock = x0;
yStock = y0;
var _local3 = _root.getPie(xStock, yStock);
_local3.setSelect(true);
}
function doStockOff() {
nowStock = -1;
var _local3 = _root.getPie(xStock, yStock);
_local3.setSelect(false);
}
function clickPie(x0, y0) {
var kind = map.getPie(x0, y0);
if (kind < 0) {
return(0);
}
if (nowStock < 0) {
doStockOn(kind, x0, y0);
return(0);
}
if ((x0 == xStock) && (y0 == yStock)) {
doStockOff();
return(0);
}
if (map.isOk(xStock, yStock, x0, y0)) {
map.setPie(xStock, yStock, -1);
map.setPie(x0, y0, -1);
var xx = (xStock + 1);
var yy = (yStock + 1);
var i = 0;
while (i < map.suuLine) {
var mv = eval ("_root.mvBar" + i);
if (map.aryLineX[i] == xx) {
mv._width = nx >> 1;
mv._height = Math.abs(map.aryLineY[i] - yy) * ny;
mv._x = this.x0 + (xx * nx);
if (yy < map.aryLineY[i]) {
mv._y = (this.y0 + (yy * ny)) + (mv._height >> 1);
} else {
mv._y = (this.y0 + (yy * ny)) - (mv._height >> 1);
}
} else {
mv._height = ny >> 1;
mv._width = Math.abs(map.aryLineX[i] - xx) * nx;
mv._y = this.y0 + (yy * ny);
if (xx < map.aryLineX[i]) {
mv._x = (this.x0 + (xx * nx)) + (mv._width >> 1);
} else {
mv._x = (this.x0 + (xx * nx)) - (mv._width >> 1);
}
}
mv.startMv();
xx = map.aryLineX[i];
yy = map.aryLineY[i];
i++;
}
var i = map.suuLine;
while (i < 3) {
var mv = eval ("_root.mvBar" + i);
mv.stopMv();
i++;
}
map.suuZanPie = map.suuZanPie - 2;
doStockOff();
if (map.suuZanPie == 0) {
return(2);
}
if (!map.checkOkAuto()) {
return(3);
}
trace((((((("\u30D2\u30F3\u30C8: x0=" + map.okX0) + " y0=") + map.okY0) + " x1=") + map.okX1) + " y1=") + map.okY1);
return(1);
}
doStockOff();
doStockOn(kind, x0, y0);
return(0);
}
function traceDebug() {
var _local2 = "Main#traceDebug\n";
if (nowStock >= 0) {
_local2 = _local2 + (("nowStock=" + nowStock) + newline);
}
_local2 = _local2 + map.debugString();
trace(_local2);
}
}
Symbol 123 MovieClip [__Packages.Map] Frame 0
class Map
{
var widthAry, heightAry, ary, usePieShu, suuUsePie, cntUsePie, suuZanPie, suuLine, okX0, okY0, okX1, okY1;
function Map (w, h, x0, y0, nx, ny) {
widthAry = w + 2;
heightAry = h + 2;
ary = new Array(heightAry);
var _local4 = 0;
while (_local4 < heightAry) {
ary[_local4] = new Array(widthAry);
_local4++;
}
usePieShu = Math.floor((w * h) / 4);
suuUsePie = usePieShu * 4;
cntUsePie = new Array(usePieShu);
var _local6 = 0;
var _local10 = y0 + ny;
var _local5 = 0;
while (_local5 < h) {
var _local8 = x0 + nx;
_local4 = 0;
while (_local4 < w) {
var _local7 = _root.getNmPie(_local4, _local5);
if (_local6 < suuUsePie) {
_root.copyMovie(_local7, _local6 + 100);
_local6++;
var _local3 = _root.getPie(_local4, _local5);
_local3.x0 = _local4;
_local3.y0 = _local5;
_local3._width = nx;
_local3._height = ny;
_local3._x = _local8;
_local3._y = _local10;
}
_local8 = _local8 + nx;
_local4++;
}
_local10 = _local10 + ny;
_local5++;
}
}
function init() {
var _local4 = 0;
while (_local4 < usePieShu) {
cntUsePie[_local4] = 0;
_local4++;
}
do {
var _local6 = usePieShu;
_local4 = 0;
while (_local4 < heightAry) {
var _local3 = 0;
while (_local3 < widthAry) {
if ((((_local4 == 0) || (_local3 == 0)) || (_local4 == (heightAry - 1))) || (_local3 == (widthAry - 1))) {
setPie(_local3 - 1, _local4 - 1, -1);
} else {
var _local5 = Math.floor(Math.random() * _local6);
var _local2 = 0;
while (_local2 < usePieShu) {
if (cntUsePie[_local2] < 4) {
_local5--;
if (_local5 < 0) {
setPie(_local3 - 1, _local4 - 1, _local2);
cntUsePie[_local2]++;
if (cntUsePie[_local2] == 4) {
_local6--;
}
break;
}
}
_local2++;
}
}
_local3++;
}
_local4++;
}
} while (!checkOkAuto());
suuZanPie = suuUsePie;
}
function setPie(px, py, kind) {
ary[py + 1][px + 1] = kind;
var _local3 = _root.getPie(px, py);
if (kind < 0) {
removeMovieClip(_local3);
} else {
_local3.kind = kind;
_local3.init(kind);
}
}
function getPie(px, py) {
return(ary[py + 1][px + 1]);
}
function isOk(x0, y0, x1, y1) {
x0++;
y0++;
x1++;
y1++;
suuLine = 0;
if (ary[y0][x0] != ary[y1][x1]) {
return(false);
}
if (x0 == x1) {
if (isEmptyY(y0, y1, x0)) {
return(true);
}
suuLine = 0;
}
if (y0 == y1) {
if (isEmptyX(x0, x1, y0)) {
return(true);
}
suuLine = 0;
}
if (x0 != x1) {
var _local4 = y0 - 1;
while ((_local4 >= 0) && (ary[_local4][x0] < 0)) {
aryLineX[suuLine] = x0;
aryLineY[suuLine] = _local4;
suuLine++;
if (isEmptyX(x0, x1, _local4) && ((_local4 == y1) || (ary[_local4][x1] < 0))) {
if (isEmptyY(_local4, y1, x1)) {
return(true);
}
}
suuLine = 0;
_local4--;
}
}
if (y0 != y1) {
var _local4 = x0 + 1;
while ((_local4 < widthAry) && (ary[y0][_local4] < 0)) {
aryLineX[suuLine] = _local4;
aryLineY[suuLine] = y0;
suuLine++;
if (isEmptyY(y0, y1, _local4) && ((_local4 == x1) || (ary[y1][_local4] < 0))) {
if (isEmptyX(_local4, x1, y1)) {
return(true);
}
}
suuLine = 0;
_local4++;
}
}
if (x0 != x1) {
var _local4 = y0 + 1;
while ((_local4 < heightAry) && (ary[_local4][x0] < 0)) {
aryLineX[suuLine] = x0;
aryLineY[suuLine] = _local4;
suuLine++;
if (isEmptyX(x0, x1, _local4) && ((_local4 == y1) || (ary[_local4][x1] < 0))) {
if (isEmptyY(_local4, y1, x1)) {
return(true);
}
}
suuLine = 0;
_local4++;
}
}
if (y0 != y1) {
var _local4 = x0 - 1;
while ((_local4 >= 0) && (ary[y0][_local4] < 0)) {
aryLineX[suuLine] = _local4;
aryLineY[suuLine] = y0;
suuLine++;
if (isEmptyY(y0, y1, _local4) && ((_local4 == x1) || (ary[y1][_local4] < 0))) {
if (isEmptyX(_local4, x1, y1)) {
return(true);
}
}
suuLine = 0;
_local4--;
}
}
return(false);
}
function isEmptyX(x0, x1, y0) {
var _local3 = getWhitch(x0, x1);
if (_local3 == 0) {
return(true);
}
var _local2 = x0 + _local3;
while (_local2 != x1) {
if (ary[y0][_local2] >= 0) {
return(false);
}
_local2 = _local2 + _local3;
}
aryLineX[suuLine] = x1;
aryLineY[suuLine] = y0;
suuLine++;
return(true);
}
function isEmptyY(y0, y1, x0) {
var _local3 = getWhitch(y0, y1);
if (_local3 == 0) {
return(true);
}
var _local2 = y0 + _local3;
while (_local2 != y1) {
if (ary[_local2][x0] >= 0) {
return(false);
}
_local2 = _local2 + _local3;
}
aryLineX[suuLine] = x0;
aryLineY[suuLine] = y1;
suuLine++;
return(true);
}
function getWhitch(p0, p1) {
if (p0 < p1) {
return(1);
}
if (p0 > p1) {
return(-1);
}
return(0);
}
function checkOkAuto() {
var _local7 = 0;
while (_local7 < usePieShu) {
cntUsePie[_local7] = 0;
_local7++;
}
_local7 = 1;
while (_local7 < (heightAry - 1)) {
var _local4 = 1;
while (_local4 < (widthAry - 1)) {
var _local5 = ary[_local7][_local4];
if ((_local5 >= 0) && (cntUsePie[_local5] < 3)) {
cntUsePie[_local5]++;
okX0 = _local4 - 1;
okY0 = _local7 - 1;
var _local8 = _local4 + 1;
var _local3 = _local7;
while (_local3 < (heightAry - 1)) {
var _local2 = _local8;
while (_local2 < (widthAry - 1)) {
var _local6 = ary[_local3][_local2];
okX1 = _local2 - 1;
okY1 = _local3 - 1;
if ((_local6 == _local5) && (isOk(okX0, okY0, okX1, okY1))) {
return(true);
}
_local2++;
}
_local8 = 1;
_local3++;
}
}
_local4++;
}
_local7++;
}
return(false);
}
function debugString() {
var _local4 = "";
var _local3 = 1;
while (_local3 < (heightAry - 1)) {
var _local2 = 1;
while (_local2 < (widthAry - 1)) {
if (ary[_local3][_local2] < 0) {
_local4 = _local4 + " ";
} else {
_local4 = _local4 + ary[_local3][_local2];
}
_local2++;
}
_local4 = _local4 + newline;
_local3++;
}
return(_local4);
}
var PIESHU = 37;
var aryLineX = new Array(3);
var aryLineY = new Array(3);
}
Symbol 15 MovieClip Frame 2
stop();
var width2 = (_width >> 1);
var height2 = (_height >> 1);
var miniW2 = (center._width >> 1);
var miniH2 = (center._height >> 1);
var xs = (10000 / _xscale);
var ys = (10000 / _yscale);
var xsw = (xs / 100);
var ysw = (ys / 100);
width2 = width2 * xsw;
height2 = height2 * ysw;
miniW2 = miniW2 * xsw;
miniH2 = miniH2 * ysw;
var xlen = (((width2 * 2) - (miniW2 * 4)) / (miniW2 * 2));
var ylen = (((height2 * 2) - (miniH2 * 4)) / (miniH2 * 2));
center._xscale = xs * xlen;
center._yscale = ys * ylen;
top._xscale = xs * xlen;
top._yscale = ys;
top._y = (-height2) + miniH2;
right._xscale = xs;
right._yscale = ys * ylen;
right._x = width2 - miniW2;
bottom._xscale = xs * xlen;
bottom._yscale = ys;
bottom._y = height2 - miniH2;
left._xscale = xs;
left._yscale = ys * ylen;
left._x = (-width2) + miniW2;
leftTop._xscale = xs;
leftTop._yscale = ys;
leftTop._x = (-width2) + miniW2;
leftTop._y = (-height2) + miniH2;
rightTop._xscale = ys;
rightTop._yscale = xs;
rightTop._x = width2 - miniW2;
rightTop._y = (-height2) + miniH2;
rightBottom._xscale = xs;
rightBottom._yscale = ys;
rightBottom._x = width2 - miniW2;
rightBottom._y = height2 - miniH2;
leftBottom._xscale = ys;
leftBottom._yscale = xs;
leftBottom._x = (-width2) + miniW2;
leftBottom._y = height2 - miniH2;
Symbol 20 Button
on (press, keyPress "<Space>") {
_parent.endWait();
}
Symbol 21 MovieClip Frame 1
gotoAndStop ("stop");
Symbol 21 MovieClip Frame 5
startDrag ("", true);
stop();
Symbol 22 MovieClip Frame 1
function startWait(t, listener, id) {
time = t;
this.listener = listener;
this.id = id;
gotoAndPlay ("wait");
}
function endWait() {
gotoAndStop ("stop");
if (listener) {
listener.endWait(id);
} else {
_parent.nextFrame();
}
}
function stopWait() {
gotoAndStop ("stop");
}
stopWait();
Symbol 22 MovieClip Frame 5
stop();
Symbol 22 MovieClip Frame 11
play();
time--;
if (time < 0) {
endWait();
}
Symbol 22 MovieClip Frame 12
prevFrame();
play();
Symbol 23 MovieClip Frame 1
function startMsg(m, time, lis, id) {
msg = m;
listener = lis;
this.id = id;
if (time) {
mvEngineWait.startWait(time, this);
}
if (msg ne "") {
gotoAndPlay ("start");
}
}
function endMsg() {
if (msg ne "") {
gotoAndPlay ("end");
}
if (listener) {
listener.endMsg(id);
}
}
function stopMsg() {
gotoAndStop ("stop");
}
function endWait() {
endMsg();
}
stopMsg();
Symbol 23 MovieClip Frame 9
stop();
Symbol 23 MovieClip Frame 37
stopMsg();
Symbol 23 MovieClip Frame 46
stop();
Symbol 25 Button
on (release) {
released();
}
Symbol 26 MovieClip Frame 1
function startMv() {
_visible = true;
}
function stopMv() {
_visible = false;
}
function released() {
_root.nextStage();
}
stopMv();
Symbol 30 MovieClip Frame 2
setProperty("_parent.mvBar", _xscale , Math.floor((_root._framesloaded / frames) * 100));
if (_root._framesloaded < frames) {
prevFrame();
play();
}
Symbol 30 MovieClip Frame 5
with (_root) {
nextFrame();
play();
}
stop();
Symbol 33 MovieClip Frame 1
mvEngineLoading.frames = _root._totalframes;
mvEngineLoading.w = -(mvBar._width >> 1);
stop();
Symbol 35 Button
on (release) {
nextFrame();
}
Symbol 37 Button
on (release) {
getURL ("http://shinelip.m78.com/flash/shisen/index.html", _blank);
}
Symbol 39 MovieClip Frame 1
function setNewGrp() {
mv._visible = false;
mcLoader.addListener(mcListener);
mcLoader.loadClip(fnm, mv);
trace((((((("setNewGrp:" + mv._width) + " ") + mv._height) + " ") + mv._x) + " ") + mv._y);
}
var mcLoader = new MovieClipLoader();
var mcListener = new Object();
mcListener.onLoadComplete = function (tgt) {
trace("onLoadComplete:" + tgt);
mv._visible = false;
};
mcListener.onLoadInit = function (tgt) {
trace("onLoadInit:" + tgt);
mcLoader.removeListener(mcListener);
_root.nextFrame();
mv._visible = false;
};
mcListener.onLoadProgress = function (tgt, loaded, total) {
trace((((("onLoadProgress:" + tgt) + " ") + loaded) + " / ") + total);
_root.mvGrpLoad.mvBar._xscale = (loaded * 100) / total;
};
mcListener.onLoadError = function (tgt, errorCode) {
trace("mcListener.onLoadError ERROR CODE = " + errorCode);
};
setNewGrp();
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 117 Button
on (release) {
releasedBtn();
}
Symbol 118 MovieClip Frame 1
function releasedBtn() {
_root.released(x0, y0);
}
function init(kind) {
setSelect(false);
this.kind = kind;
grpPie.gotoAndStop(kind + 1);
}
function setSelect(val) {
grpSelPie._visible = val;
}
var x0;
var y0;
init(kind);
stop();
Symbol 121 MovieClip Frame 1
function startMv() {
_visible = true;
gotoAndPlay ("play");
}
function stopMv() {
_visible = false;
gotoAndStop ("stop");
stop();
}
stopMv();
Symbol 121 MovieClip Frame 25
stopMv();