Frame 1
var maxLev = 13;
var levelNo = 1;
var picTime = 3500;
var isOver = 0;
introMV.gotoAndStop(2);
stop();
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("14dc5f4d", this, 10301, true);
Frame 2
stop();
Frame 6
stop();
sndHit = new Sound();
sndHit.attachSound("TEEDA2.WAV");
Symbol 5 MovieClip [mcTimerDot] Frame 1
stop();
Symbol 9 MovieClip Frame 7
stop();
Symbol 10 MovieClip Frame 1
stop();
Symbol 13 MovieClip [mcBallOrg] Frame 1
function start_fall(px, py, dx, dy, w, h) {
_x = px;
_y = py;
cnt = 0;
ax = (dx * w) - (dy * w);
ay = (dy * h) + (dx * h);
_x = (_x + ax);
_y = (_y + ay);
g = 0;
ax = ax * 0.5;
ay = ay * 0.5;
_visible = true;
_alpha = 100;
shadow._visible = false;
onEnterFrame = function () {
_x = (_x + ax);
_y = (_y + ay);
ax = ax * 0.9;
ay = ay * 0.9;
_y = (_y + g);
g = g + 10;
cnt++;
_alpha = (_alpha - 8);
if (cnt > 30) {
delete onEnterFrame;
}
};
}
function init() {
delete onEnterFrame;
_visible = true;
_alpha = 100;
shadow._visible = true;
}
stop();
Symbol 14 MovieClip [mcBallEditOrg] Frame 1
function start_fall(px, py, dx, dy, w, h) {
_x = px;
_y = py;
cnt = 0;
ax = (dx * w) - (dy * w);
ay = (dy * h) + (dx * h);
_x = (_x + ax);
_y = (_y + ay);
g = 0;
ax = ax * 0.5;
ay = ay * 0.5;
_visible = true;
_alpha = 100;
shadow._visible = false;
onEnterFrame = function () {
_x = (_x + ax);
_y = (_y + ay);
ax = ax * 0.9;
ay = ay * 0.9;
_y = (_y + g);
g = g + 10;
cnt++;
_alpha = (_alpha - 8);
if (cnt > 30) {
delete onEnterFrame;
}
};
}
function init() {
delete onEnterFrame;
_visible = true;
_alpha = 100;
shadow._visible = true;
}
stop();
Symbol 17 MovieClip [mcCelOrg] Frame 1
stop();
Symbol 22 MovieClip Frame 20
function playMovie() {
clearInterval(myInt);
nextFrame();
gotoAndPlay;
}
var myInt;
myInt = setInterval(playMovie, _root.picTime);
stop();
Symbol 22 MovieClip Frame 21
play();
Symbol 22 MovieClip Frame 30
_parent.gotoAndStop(3);
stop();
Symbol 25 MovieClip Frame 24
stop();
Symbol 29 MovieClip Frame 30
function playMovie() {
clearInterval(myInt);
nextFrame();
gotoAndPlay;
}
var myInt;
myInt = setInterval(playMovie, _root.picTime);
stop();
Symbol 29 MovieClip Frame 31
play();
Symbol 29 MovieClip Frame 40
stop();
_root.gotoAndStop("cover");
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 2
stop();
Symbol 30 MovieClip Frame 3
stop();
Symbol 36 MovieClip Frame 190
stop();
_root.gotoAndStop("start");
Symbol 59 MovieClip Frame 1
stop();
if (_root.lang) {
nextFrame();
}
Symbol 60 MovieClip Frame 1
stop();
_visible = true;
btStart.onPress = function () {
_parent.gotoAndStop("game");
};
Symbol 65 MovieClip Frame 20
stop();
Symbol 69 MovieClip Frame 20
stop();
Symbol 73 MovieClip Frame 20
stop();
Symbol 77 MovieClip Frame 20
stop();
Symbol 81 MovieClip Frame 20
stop();
Symbol 85 MovieClip Frame 20
stop();
Symbol 89 MovieClip Frame 20
stop();
Symbol 93 MovieClip Frame 20
stop();
Symbol 97 MovieClip Frame 20
stop();
Symbol 101 MovieClip Frame 20
stop();
Symbol 105 MovieClip Frame 20
stop();
Symbol 109 MovieClip Frame 20
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 3
stop();
Symbol 110 MovieClip Frame 4
stop();
Symbol 110 MovieClip Frame 5
stop();
Symbol 110 MovieClip Frame 6
stop();
Symbol 110 MovieClip Frame 7
stop();
Symbol 110 MovieClip Frame 8
stop();
Symbol 110 MovieClip Frame 9
stop();
Symbol 110 MovieClip Frame 10
stop();
Symbol 110 MovieClip Frame 11
stop();
Symbol 110 MovieClip Frame 12
stop();
Symbol 110 MovieClip Frame 13
stop();
Symbol 118 MovieClip Frame 1
_visible = false;
Symbol 118 MovieClip Frame 3
function stop_timer() {
delete onEnterFrame;
}
stop();
_visible = true;
rest = _parent.rest_time;
i = 0;
while (i < rest) {
mcname = "mc" + i;
attachMovie("mcTimerDot", mcname, i);
mc = eval (mcname);
mc._x = i * 10;
mc._y = 0;
i++;
}
st = getTimer();
sec = 0;
onEnterFrame = function () {
var s = Math.floor((getTimer() - st) / 1000);
if (sec != s) {
sec = s;
_parent.rest_time = rest - s;
var i = 0;
while (i < rest) {
var mc = eval ("mc" + i);
if (i < _parent.rest_time) {
mc.gotoAndStop(1);
} else {
mc.gotoAndStop(2);
}
i++;
}
if (sec >= rest) {
_parent.gotoAndStop("gameover");
}
}
};
Symbol 136 MovieClip Frame 1
_visible = false;
Symbol 136 MovieClip Frame 2
_visible = true;
Symbol 136 MovieClip Frame 16
stop();
if (_parent.foul == 2) {
nextFrame();
}
onPress = function () {
_parent.after_faul();
};
Symbol 140 MovieClip Frame 20
stop();
Symbol 144 MovieClip Frame 20
stop();
Symbol 148 MovieClip Frame 20
stop();
Symbol 152 MovieClip Frame 20
stop();
Symbol 156 MovieClip Frame 20
stop();
Symbol 160 MovieClip Frame 20
stop();
Symbol 164 MovieClip Frame 20
stop();
Symbol 168 MovieClip Frame 20
stop();
Symbol 172 MovieClip Frame 20
stop();
Symbol 176 MovieClip Frame 20
stop();
Symbol 180 MovieClip Frame 20
stop();
Symbol 184 MovieClip Frame 20
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 2
stop();
Symbol 185 MovieClip Frame 3
stop();
Symbol 185 MovieClip Frame 4
stop();
Symbol 185 MovieClip Frame 5
stop();
Symbol 185 MovieClip Frame 6
stop();
Symbol 185 MovieClip Frame 7
stop();
Symbol 185 MovieClip Frame 8
stop();
Symbol 185 MovieClip Frame 9
stop();
Symbol 185 MovieClip Frame 10
stop();
Symbol 185 MovieClip Frame 11
stop();
Symbol 185 MovieClip Frame 12
stop();
Symbol 185 MovieClip Frame 13
stop();
Symbol 189 MovieClip Frame 1
_visible = false;
Symbol 189 MovieClip Frame 2
_visible = true;
Symbol 189 MovieClip Frame 19
stop();
onPress = function () {
_parent.after_clear();
};
Symbol 197 Button
on (release) {
_parent._parent.gotoAndStop("title");
}
Symbol 198 MovieClip Frame 1
_visible = false;
Symbol 198 MovieClip Frame 2
_visible = true;
Symbol 198 MovieClip Frame 33
stop();
Symbol 199 MovieClip Frame 1
_visible = false;
stage_no = 1;
ball_min = 3;
ball_max = 7;
ball_num = ball_min;
rest_time = 20;
timeup = 0;
pass = 0;
addx = [0, 1, 0, -1];
addy = [-1, 0, 1, 0];
xmax = 7;
ymax = 7;
cel_w = 40;
cel_h = 32;
prio_back = 0;
prio_cel = 100;
prio_ball = 200;
prio_front = 300;
c = 0;
cel = new Array();
i = 0;
while (i < ymax) {
cel[i] = new Array();
j = 0;
while (j < xmax) {
cel[i][j] = new Object();
cel[i][j].prio = c;
cel[i][j].px = cel_w * (j - i);
cel[i][j].py = cel_h * (j + i);
cel[i][j].ball = 0;
c++;
j++;
}
i++;
}
Symbol 199 MovieClip Frame 2
_visible = true;
Symbol 199 MovieClip Frame 4
function make_bmap() {
var _local5;
var _local3;
var _local1;
_local5 = 0;
while (_local5 < ymax) {
_local3 = 0;
while (_local3 < xmax) {
bmap[_local5][_local3] = 0;
_local3++;
}
_local5++;
}
var _local8 = 1 + Math.floor(Math.random() * (xmax - 2));
var _local9 = 1 + Math.floor(Math.random() * (ymax - 2));
bmap[_local9][_local8] = 1;
var _local7 = 1;
while (_local7 < ball_num) {
var _local4 = new Array();
var _local2 = 0;
_local5 = 0;
while (_local5 < ymax) {
_local3 = 0;
while (_local3 < xmax) {
if (bmap[_local5][_local3] == 0) {
} else {
_local1 = 0;
while (_local1 < 4) {
if (able_to_be_target(_local3, _local5, addx[_local1], addy[_local1])) {
_local4[_local2] = new Object();
_local4[_local2].cx = _local3;
_local4[_local2].cy = _local5;
_local4[_local2].dir = _local1;
_local2++;
}
_local1++;
}
}
_local3++;
}
_local5++;
}
if (_local2 == 0) {
break;
}
var _local6 = Math.floor(Math.random() * _local2);
appear_ball(_local4[_local6].cx, _local4[_local6].cy, _local4[_local6].dir);
_local7++;
}
draw_stage();
}
function able_to_be_target(ox, oy, ax, ay) {
var _local3 = ox;
var _local4 = oy;
var _local7 = 0;
while (true) {
var _local1 = _local3 + ax;
var _local2 = _local4 + ay;
if ((((_local1 < 0) || (_local1 >= xmax)) || (_local2 < 0)) || (_local2 >= ymax)) {
break;
}
if (bmap[_local2][_local1]) {
return(0);
}
_local7++;
_local3 = _local1;
_local4 = _local2;
}
if (_local7 == 0) {
return(0);
}
_local3 = ox;
_local4 = oy;
while (true) {
var _local1 = _local3 - ax;
var _local2 = _local4 - ay;
if ((((_local1 < 0) || (_local1 >= xmax)) || (_local2 < 0)) || (_local2 >= ymax)) {
return(0);
}
if (bmap[_local2][_local1] == 0) {
return(1);
}
_local3 = _local1;
_local4 = _local2;
}
}
function appear_ball(ox, oy, d) {
var _local2 = ox + addx[d];
var _local4 = oy + addy[d];
bmap[_local4][_local2] = 1;
var _local3 = new Array();
var _local5 = 0;
_local2 = ox;
_local4 = oy;
while (true) {
var _local1 = _local2 - addx[d];
var _loc1 = (_local4 - addy[d]);
if ((((_local1 < 0) || (_local1 >= xmax)) || (_loc1 < 0)) || (_loc1 >= ymax)) {
break;
}
if (bmap[_loc1][_local1] == 0) {
_local3[_local5] = new Object();
_local3[_local5].cx = _local1;
_local3[_local5].cy = _loc1;
_local5++;
}
_local2 = _local1;
_local4 = _loc1;
}
if (_local5 == 0) {
return(undefined);
}
var _local7 = Math.floor(Math.random() * _local5);
_local2 = ox;
_local4 = oy;
while (true) {
var _local1 = _local2 - addx[d];
_loc1 = _local4 - addy[d];
if ((((_local1 < 0) || (_local1 >= xmax)) || (_loc1 < 0)) || (_loc1 >= ymax)) {
trace("error");
break;
}
if (bmap[_loc1][_local1]) {
} else {
bmap[_local4][_local2] = 0;
bmap[_loc1][_local1] = 1;
}
if ((_local1 == _local3[_local7].cx) && (_loc1 == _local3[_local7].cy)) {
break;
}
_local2 = _local1;
_local4 = _loc1;
}
}
stage_txt = "Stage " + stage_no;
bmap = new Array();
i = 0;
while (i < ymax) {
bmap[i] = new Array();
j = 0;
while (j < xmax) {
bmap[i][j] = 0;
j++;
}
i++;
}
picMV.gotoAndStop(_root.levelNo + 1);
_root.levelNo++;
make_bmap();
Symbol 199 MovieClip Frame 10
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
cel[i][j].ball = bmap[i][j];
j++;
}
i++;
}
his = new Array();
his_c = 0;
Symbol 199 MovieClip Frame 11
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
mcname = (("mc_" + j) + "_") + i;
mcLayer.attachMovie("mcCelOrg", mcname, prio_cel + cel[i][j].prio);
mc = eval ("mcLayer." + mcname);
mc._x = cel[i][j].px;
mc._y = cel[i][j].py;
mc.gotoAndStop((1 + i) + j);
mcname = (("ball_" + j) + "_") + i;
mcLayer.attachMovie("mcBallOrg", mcname, prio_ball + cel[i][j].prio);
mc = eval ("mcLayer." + mcname);
mc._x = cel[i][j].px;
mc._y = cel[i][j].py;
if (cel[i][j].ball) {
mc._visible = true;
} else {
mc._visible = false;
}
j++;
}
i++;
}
mcLayer.attachMovie("mcBallOrg", "mcFall", prio_back);
mcLayer.mcFall._visible = false;
Symbol 199 MovieClip Frame 15
function start_wait() {
var i;
var j;
i = 0;
while (i < ymax) {
j = 0;
while (j < xmax) {
var mc = eval ((("mcLayer.ball_" + j) + "_") + i);
mc._x = cel[i][j].px;
mc._y = cel[i][j].py;
mc._alpha = 100;
if (cel[i][j].ball) {
mc.gotoAndStop(1);
mc._visible = true;
mc.onPress = function () {
var _local2 = this._name.split("_");
ball_x = Number(_local2[1]);
ball_y = Number(_local2[2]);
after_wait();
drag_ox = _xmouse;
drag_oy = _ymouse;
gotoAndStop ("drag");
};
} else {
mc._visible = false;
}
j++;
}
i++;
}
}
function after_wait() {
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
if (cel[i][j].ball == 0) {
} else {
var mc = eval ((("mcLayer.ball_" + j) + "_") + i);
delete mc.onPress;
}
j++;
}
i++;
}
btQuit.enabled = false;
btUndo.enabled = false;
}
function undo() {
if (his_c == 0) {
return(undefined);
}
var _local6;
var _local3;
_local6 = 0;
while (_local6 < ymax) {
_local3 = 0;
while (_local3 < xmax) {
cel[_local6][_local3].ball = bmap[_local6][_local3];
_local3++;
}
_local6++;
}
his_c--;
_local6 = 0;
while (_local6 < his_c) {
var _local4 = his[_local6].bx;
var _local5 = his[_local6].by;
var _local7 = his[_local6].dir;
while (true) {
var _local1 = _local4 + addx[_local7];
var _local2 = _local5 + addy[_local7];
if ((((_local1 < 0) || (_local1 >= xmax)) || (_local2 < 0)) || (_local2 >= ymax)) {
cel[_local5][_local4].ball = 0;
break;
}
if (cel[_local2][_local1].ball) {
} else {
cel[_local5][_local4].ball = 0;
cel[_local2][_local1].ball = 1;
}
_local4 = _local1;
_local5 = _local2;
}
_local6++;
}
}
stop();
btUndo.onRelease = function () {
undo();
start_wait();
};
btUndo.enabled = true;
btQuit.onRelease = function () {
_parent.gotoAndPlay("title");
};
btQuit.enabled = true;
start_wait();
Symbol 199 MovieClip Frame 20
stop();
mc = eval ((("mcLayer.ball_" + ball_x) + "_") + ball_y);
mc.gotoAndStop(2);
onMouseMove = function () {
var msx = (_xmouse - drag_ox);
var msy = (_ymouse - drag_oy);
if ((Math.abs(msx) + Math.abs(msy)) < 40) {
return(undefined);
}
dir = 0;
if (msx < 0) {
if (msy < 0) {
dir = 3;
} else {
dir = 2;
}
} else if (msy < 0) {
dir = 0;
} else {
dir = 1;
}
his[his_c] = new Object();
his[his_c].bx = ball_x;
his[his_c].by = ball_y;
his[his_c].dir = dir;
his_c++;
delete onMouseMove;
delete onMouseUp;
mc = eval ((("mcLayer.ball_" + ball_x) + "_") + ball_y);
mc.gotoAndStop(1);
gotoAndStop ("move");
};
onMouseUp = function () {
delete onMouseMove;
delete onMouseUp;
mc = eval ((("mcLayer.ball_" + ball_x) + "_") + ball_y);
mc.gotoAndStop(1);
gotoAndStop ("wait");
};
Symbol 199 MovieClip Frame 25
function check_clear() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < ymax) {
var _local1 = 0;
while (_local1 < xmax) {
if (cel[_local2][_local1].ball) {
_local3++;
}
_local1++;
}
_local2++;
}
if (_local3 == 1) {
return(1);
}
return(0);
}
stop();
crack = 0;
cnt = 0;
kiss = 0;
onEnterFrame = function () {
var nx = (ball_x + addx[dir]);
var ny = (ball_y + addy[dir]);
var mc = eval ((("mcLayer.ball_" + ball_x) + "_") + ball_y);
var mc2 = eval ((("mcLayer.ball_" + nx) + "_") + ny);
var mcs = eval ((((("mcLayer.ball_" + ball_x) + "_") + ball_y) + ".mcSpark") + dir);
if ((((nx < 0) || (nx >= xmax)) || (ny < 0)) || (ny >= ymax)) {
delete onEnterFrame;
cel[ball_y][ball_x].ball = 0;
mc._visible = false;
mcLayer.mcFall.swapDepths((((nx < 0) || (ny < 0)) ? (prio_back) : (prio_front)));
mcLayer.mcFall.start_fall(mc._x, mc._y, addx[dir], addy[dir], cel_w, cel_h);
foul = 0;
if (crack == 0) {
foul = 1;
}
if (kiss) {
foul = 2;
}
if (foul) {
gotoAndStop ("foul");
} else if (check_clear()) {
if (timeup) {
gotoAndStop ("gameover");
} else {
gotoAndStop ("clear");
}
} else {
gotoAndStop ("wait");
}
return(undefined);
}
if (cel[ny][nx].ball) {
_root.sndHit.start();
mc.gotoAndStop(1);
mcs.gotoAndPlay(2);
mc2.gotoAndPlay(3);
ball_x = nx;
ball_y = ny;
crack++;
if (cnt == 0) {
kiss = 1;
}
} else {
cel[ball_y][ball_x].ball = 0;
cel[ny][nx].ball = 1;
ball_x = nx;
ball_y = ny;
mc._visible = false;
mc2._visible = true;
}
cnt++;
};
Symbol 199 MovieClip Frame 31
function after_faul() {
undo();
gotoAndStop ("wait");
}
stop();
Symbol 199 MovieClip Frame 37
function after_clear() {
stage_no++;
if (stage_no == _root.maxLev) {
gotoAndStop ("gameover");
} else {
ball_num++;
if (ball_num > ball_max) {
ball_num = ball_min;
ball_max++;
if (ball_max >= 12) {
ball_max = 12;
}
}
rest_time = rest_time + 20;
if (rest_time > 78) {
rest_time = 78;
}
gotoAndPlay ("stage");
}
}
picMV2.gotoAndStop(_root.levelNo);
stop();
mcTimer.stop_timer();
Symbol 199 MovieClip Frame 43
stop();
var i = 0;
while (i < ymax) {
var j = 0;
while (j < xmax) {
if (cel[i][j].ball == 0) {
} else {
var mc = eval ((("mcLayer.ball_" + j) + "_") + i);
delete mc.onPress;
}
j++;
}
i++;
}
Symbol 200 MovieClip Frame 1
_visible = false;
Symbol 200 MovieClip Frame 2
_visible = true;
Symbol 200 MovieClip Frame 4
stop();
Symbol 200 MovieClip Frame 9
stop();