Frame 2
function debug() {
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
if (eval ((("current_mass_" add i) add "_") add j) > 10) {
attachMovie("box", ("box" add (100 * i)) + j, (2000 + (100 * i)) + j);
eval (("box" add (100 * i)) + j)._x = i * 10;
eval (("box" add (100 * i)) + j)._y = (j * 10) + 50;
eval (("box" add (100 * i)) + j)._xscale = 50;
eval (("box" add (100 * i)) + j)._yscale = 50;
} else {
attachMovie("box1", ("box" add (100 * i)) + j, (2000 + (100 * i)) + j);
eval (("box" add (100 * i)) + j)._x = i * 10;
eval (("box" add (100 * i)) + j)._xscale = 50;
eval (("box" add (100 * i)) + j)._yscale = 50;
eval (("box" add (100 * i)) + j)._y = (j * 10) + 50;
}
j++;
}
i++;
}
}
function remove() {
if (rem == 1) {
remove_movie();
}
}
function remove_movie() {
min_unit = 5;
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
this[(("temp_rem_" + i) + "_") + j] = 0;
j++;
}
i++;
}
rem = false;
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
if (this[(("current_mass_" add i) add "_") add j] > 10) {
if (down(i, j, 1, this[(("current_mass_" add i) add "_") add j])) {
rem = true;
}
if (right(i, j, 1, this[(("current_mass_" add i) add "_") add j])) {
rem = true;
}
if (down_rigth(i, j, 1, this[(("current_mass_" add i) add "_") add j])) {
rem = true;
}
if (down_left(i, j, 1, this[(("current_mass_" add i) add "_") add j])) {
rem = true;
}
}
j++;
}
i++;
}
if (rem) {
make_rem();
}
return(rem);
}
function make_rem() {
count = 0;
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
if (this[(("temp_rem_" add i) add "_") add j] == 1) {
count++;
temp = this[(("current_masst_" add i) add "_") add j];
this["ball" add temp].play();
this[(("current_masst_" add i) add "_") add j] = 0;
this[(("current_mass_" add i) add "_") add j] = 0;
}
j++;
}
i++;
}
if (count > 4) {
add_score = count * (count - 4);
score = score + add_score;
scor = score;
}
re_random();
}
function down(x, y, count, value) {
if ((y <= c_y) && (value == this[(("current_mass_" add x) add "_") add y])) {
if (down(x, y + 1, count + 1, value)) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
if (count >= min_unit) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
return(false);
}
return(false);
}
function right(x, y, count, value) {
if ((x <= c_x) && (value == this[(("current_mass_" add x) add "_") add y])) {
if (right(x + 1, y, count + 1, value)) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
if (count >= min_unit) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
return(false);
}
return(false);
}
function down_rigth(x, y, count, value) {
if (((x <= c_x) && (y <= c_y)) && (value == this[(("current_mass_" add x) add "_") add y])) {
if (down_rigth(x + 1, y + 1, count + 1, value)) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
if (count >= min_unit) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
return(false);
}
return(false);
}
function down_left(x, y, count, value) {
if (((x > 0) && (y <= c_y)) && (value == this[(("current_mass_" add x) add "_") add y])) {
if (down_left(x - 1, y + 1, count + 1, value)) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
if (count >= min_unit) {
this[(("temp_rem_" add x) add "_") add y] = 1;
return(true);
}
return(false);
}
return(false);
}
function go_to(x, y) {
x1 = this[lastselect].x;
y1 = this[lastselect].y;
x2 = x;
y2 = y;
if ((x1 == x2) && (y1 == y2)) {
return(false);
}
over = false;
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
this[(("temp_" add i) add "_") add j] = 0;
j++;
}
i++;
}
_root.lock = true;
mm = rec_go(x1, y1);
if (mm) {
if (this[(("current_mass_" add x2) add "_") add y2] > 0) {
temp_obj = this[(("current_masst_" add x2) add "_") add y2];
over = true;
}
this[(("current_mass_" add x2) add "_") add y2] = this[(("current_mass_" add x1) add "_") add y1];
this[(("current_mass_" add x1) add "_") add y1] = 0;
this[(("current_masst_" add x2) add "_") add y2] = this[(("current_masst_" add x1) add "_") add y1];
this[(("current_masst_" add x1) add "_") add y1] = 0;
this["_root." add _root.lastselect].ball.gotoAndStop(1);
action_go.gotoAndPlay(2);
} else {
_root.lock = false;
}
}
function rec_go(x, y) {
ok = false;
if ((x == x2) && (y == y2)) {
this[(("temp_" add x) add "_") add y] = 5;
return(true);
}
t_m = new Array(4);
dx = x - x2;
dy = y - y2;
c = 1;
while (c <= 4) {
tx = x - 1;
if (((tx > 0) && (this[(("current_mass_" add tx) add "_") add y] < 10)) && (this[(("temp_" add tx) add "_") add y] < 1)) {
this[(("temp_" add x) add "_") add y] = 1;
ok = rec_go(x - 1, y);
if (ok) {
return(ok);
}
}
if ((((x + 1) <= c_x) && (this[(("current_mass_" add Number(x + 1)) add "_") add y] < 10)) && (this[(("temp_" add Number(x + 1)) add "_") add y] < 1)) {
this[(("temp_" add x) add "_") add y] = 2;
ok = rec_go(x + 1, y);
if (ok) {
return(ok);
}
}
if ((((y - 1) > 0) && (this[(("current_mass_" add x) add "_") add Number(y - 1)] < 10)) && (this[(("temp_" add x) add "_") add Number(y - 1)] < 1)) {
this[(("temp_" add x) add "_") add y] = 3;
ok = rec_go(x, y - 1);
if (ok) {
return(ok);
}
}
if ((((y + 1) <= c_y) && (this[(("current_mass_" add x) add "_") add Number(y + 1)] < 10)) && (this[(("temp_" add x) add "_") add Number(y + 1)] < 1)) {
this[(("temp_" add x) add "_") add y] = 4;
ok = rec_go(x, y + 1);
if (ok) {
return(ok);
}
}
c++;
}
return(ok);
}
function creat_pool(x, y) {
scale1 = (right_position - left_position) / x;
scale2 = (bottom_position - top_position) / y;
c_x = x;
c_y = y;
if (x > y) {
qq = x;
c_d = x;
} else {
qq = y;
c_d = y;
}
if (scale1 > scale2) {
scale = scale2;
} else {
scale = scale1;
}
dx = ((right_position - left_position) - (scale * x)) / 2;
i = 1;
while (i <= x) {
j = 1;
while (j <= y) {
this[(("current_mass_" add i) add "_") add j] = 0;
for_random[((i - 1) * qq) + j] = (i add "_") add j;
duplicateMovieClip ("jachejka", ("jachejka" add (i * qq)) + j, ((i * qq) + j) + 100);
this[("jachejka" add (i * qq)) + j].x = i;
this[("jachejka" add (i * qq)) + j].y = j;
this[("jachejka" add (i * qq)) + j]._x = (((i * scale) - scale) + left_position) + dx;
this[("jachejka" add (i * qq)) + j]._y = ((j * scale) - scale) + top_position;
this[(("current_massx_" add i) add "_") add j] = (((i * scale) - (scale / 2)) + left_position) + dx;
this[(("current_massy_" add i) add "_") add j] = ((j * scale) - (scale / 2)) + top_position;
this[("jachejka" add (i * qq)) + j]._xscale = scale;
this[("jachejka" add (i * qq)) + j]._yscale = scale;
j++;
}
i++;
}
}
function init_game(x, y) {
start_time = getTimer();
for_random = new Array(x * y);
max_random = x * y;
scor = 0;
creat_pool(x, y);
add_newball();
init = true;
add_newball();
init = false;
score = 0;
}
function visual_new() {
re_random();
rem = 0;
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
if ((this[(("current_mass_" add i) add "_") add j] < 10) && (this[(("current_mass_" add i) add "_") add j] > 0)) {
temp = this[(("current_masst_" add i) add "_") add j];
if (init) {
this["ball" add temp].gotoAndStop(6);
} else {
this["ball" add temp].gotoAndPlay(2);
rem++;
}
this["ball" add temp].x = i;
this["ball" add temp].y = j;
this[(("current_mass_" add i) add "_") add j] = this[(("current_mass_" add i) add "_") add j] + 10;
}
j++;
}
i++;
}
rem = 3;
}
function re_random() {
s = 0;
i = 1;
while (i <= c_x) {
j = 1;
while (j <= c_y) {
if (this[(("current_mass_" add i) add "_") add j] == 0) {
s++;
for_random[s] = (i add "_") add j;
}
j++;
}
i++;
}
max_random = s;
}
function add_newball() {
visual_new();
i = 1;
while (i <= unit_add) {
if (max_random > 0) {
rnd = random(max_random) + 1;
color = random(difrent_unit) + 1;
name = for_random[rnd];
L1 = "";
L2 = "";
p_c = true;
c = 0;
while (c <= name.length) {
if (name.substr(c, 1) eq "_") {
p_c = false;
} else if (p_c) {
L1 = L1 add name.substr(c, 1);
} else {
L2 = L2 add name.substr(c, 1);
}
c++;
}
attachMovie("u_" add color, "ball" add name, (1000 + (Number(L1) * 50)) + Number(L2));
this["ball" add name]._x = this["current_massx_" add for_random[rnd]];
this["ball" add name]._y = this["current_massy_" add for_random[rnd]];
this["ball" add name]._xscale = scale * 1.6;
this["ball" add name]._yscale = scale * 1.6;
this["current_mass_" add for_random[rnd]] = color + 2;
this["current_masst_" add for_random[rnd]] = name;
for_random[rnd] = for_random[max_random];
} else {
lock = true;
attachMovie("g_ov", "g_ov1", 3000);
g_ov1._y = 170;
g_ov1._x = 310;
gotoAndStop (4);
}
i++;
}
}
left_position = pool._x;
right_position = pool._x + pool._width;
top_position = pool._y;
bottom_position = pool._y + pool._height;
difrent_unit = 6;
unit_add = 3;
if (!tableLoaded) {
attachMovie("tab_rec", "t_r", 98981);
}
stop();
variables = "/cgi-bin/lines.cgi";
Instance of Symbol 244 MovieClip "jachejka" in Frame 2
onClipEvent (mouseUp) {
if (hitTest(_root._xmouse, _root._ymouse, false)) {
if (_root.lastselect != null) {
x1 = eval ("_root" add lastselect).x;
y1 = eval ("_root" add lastselect).y;
x2 = x;
y2 = y;
if ((x1 == x2) && (y1 == y2)) {
_root.lock = false;
trace("ulock");
} else if (!_root.lock) {
_root.go_to(x, y);
}
}
}
}
Instance of Symbol 272 MovieClip "btn_t_r" in Frame 2
onClipEvent (load) {
if (_root.tableLoaded) {
gotoAndStop (3);
}
}
Frame 6
stop();
Symbol 4 Button
on (release) {
if (!_root.lock) {
ball.gotoAndPlay(2);
if (_root.lastselect ne _name) {
eval ("_root." add _root.lastselect).ball.gotoAndStop(1);
}
_root.lastselect = _name;
}
}
Symbol 7 MovieClip Frame 1
stop();
Symbol 7 MovieClip Frame 10
gotoAndPlay (2);
Symbol 12 MovieClip [u_1] Frame 1
stop();
Symbol 12 MovieClip [u_1] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 12 MovieClip [u_1] Frame 10
removeMovieClip(_target);
Symbol 17 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 9
gotoAndPlay (2);
Symbol 22 MovieClip [u_2] Frame 1
stop();
Symbol 22 MovieClip [u_2] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 22 MovieClip [u_2] Frame 10
removeMovieClip(_target);
Symbol 27 MovieClip Frame 1
stop();
Symbol 27 MovieClip Frame 10
gotoAndPlay (2);
Symbol 32 MovieClip [U_3] Frame 1
stop();
Symbol 32 MovieClip [U_3] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 32 MovieClip [U_3] Frame 10
removeMovieClip(_target);
Symbol 37 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 9
gotoAndPlay (2);
Symbol 42 MovieClip [U_4] Frame 1
stop();
Symbol 42 MovieClip [U_4] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 42 MovieClip [U_4] Frame 10
removeMovieClip(_target);
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 7
gotoAndPlay (2);
Symbol 52 MovieClip [u_7] Frame 1
stop();
Symbol 52 MovieClip [u_7] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 52 MovieClip [u_7] Frame 10
removeMovieClip(_target);
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 7
gotoAndPlay (2);
Symbol 62 MovieClip [u_6] Frame 1
stop();
Symbol 62 MovieClip [u_6] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 62 MovieClip [u_6] Frame 10
removeMovieClip(_target);
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 7
gotoAndPlay (2);
Symbol 72 MovieClip [u_5] Frame 1
stop();
Symbol 72 MovieClip [u_5] Frame 6
stop();
if (!nodel) {
_root.remove();
_root.rem = _root.rem + -1;
}
Symbol 72 MovieClip [u_5] Frame 10
removeMovieClip(_target);
Symbol 80 Button
on (release) {
i = 1;
while (i <= _root.c_x) {
j = 1;
while (j <= _root.c_y) {
removeMovieClip((("_root.ball" add i) add "_") add j);
j++;
}
i++;
}
_root.init_game(9, 9);
_root.gotoAndStop(2);
_root.lock = false;
removeMovieClip(_target);
}
Symbol 96 Button
on (press) {
this.gotoAndStop("weekly");
}
Symbol 97 Button
on (press) {
this.gotoAndStop("daily");
}
Symbol 98 Button
on (press) {
this.gotoAndStop("hourly");
}
Symbol 101 Button
on (press) {
this.gotoAndStop("monthly");
}
Symbol 106 Button
on (press) {
this.gotoAndStop("daily");
}
Symbol 109 MovieClip Frame 1
this._parent.tp = 2592000 /* 0x278D00 */;
this._parent.tc = 0;
this._parent.reload();
stop();
Symbol 109 MovieClip Frame 2
this._parent.tp = 604800 /* 0x093A80 */;
this._parent.tc = 0;
this._parent.reload();
Symbol 109 MovieClip Frame 3
this._parent.tp = 86400 /* 0x015180 */;
this._parent.tc = 0;
this._parent.reload();
Symbol 109 MovieClip Frame 4
this._parent.tp = 3600;
this._parent.tc = 0;
this._parent.reload();
Symbol 116 Button
on (press) {
this.tc--;
this.reload();
}
Symbol 121 Button
on (press) {
this.tc = ((this.tc < 0) ? (this.tc + 1) : 0);
this.reload();
}
Symbol 124 Button
on (press) {
if (this.submitted == false) {
this.loadVariables((((this.__url + "hof_put.php?id=") + this.gid) + "&s=") + this.sc);
}
}
Symbol 128 Button
on (press) {
this._parent.l = 10;
this._parent.reload();
this.gotoAndStop(2);
}
Symbol 131 Button
on (press) {
this._parent.l = 100;
this._parent.reload();
this.gotoAndStop(1);
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 18
stop();
Symbol 149 MovieClip Frame 1
function reset() {
this.m._x = this.s._x;
this.m._y = this.s._y;
}
function scroll(p) {
this._parent.rolki.f1.scroll = (this._parent.rolki.f2.scroll = (this._parent.rolki.f3.scroll = (this._parent.rolki.f4.scroll = int((this.mx * p) / 100))));
}
this.onEnterFrame = function () {
this.s._y = ((this.m._y > 5) ? (((this.m._y < 202) ? (this.m._y) : 202)) : 5);
this.mx = this._parent.rolki.f1.maxscroll;
scroll((100 * (this.s._y - 5)) / 197);
};
Instance of Symbol 148 MovieClip "m" in Symbol 149 MovieClip Frame 1
on (press) {
this.startDrag();
}
on (release, releaseOutside) {
this.stopDrag();
this._parent.reset();
}
Symbol 155 MovieClip Frame 1
this._visible = _root.ligin == undefined;
this.onPress = function () {
getURL ("http://www.netstupidity.com");
};
Symbol 156 MovieClip Frame 1
this.submitted = false;
Symbol 156 MovieClip Frame 2
function reload() {
if (this.rolki._currentframe > 1) {
this.rolki.gotoAndPlay(18);
}
var te = ((-this.tc) * this.tp);
var tb = ((-(this.tc - 1)) * this.tp);
this.loadVariables((((((((((this.__url + "hof_get.php?id=") + this.gid) + "&n=") + this.l) + "&tb=") + tb) + "&te=") + te) + "&s=") + this.sc);
}
this.uu = _root._url;
this.gid = _root.gid;
this.__url = _root.__url;
this.l = 10;
this.sc = eval (this.scr);
if (int(this.sc) > int(_root.bsc)) {
_root.bsc = this.sc;
}
this.onData = function () {
if (this.r == 1) {
this.rolki.gotoAndPlay(2);
clearInterval(this._itr);
return(undefined);
}
if (this.r == "3") {
this.submitted = true;
reload();
}
if (this.r == "2") {
getURL ("javascript:if(confirm('To submit Your score You have to be logged into netstupidity.com site. Do You wish to log in now?')) window.open('http://www.netstupidity.com/login.php'); void(0);");
}
};
stop();
Symbol 162 Button
on (release) {
name = gamer_name;
win = 1;
time = _root.timer.time;
score = _root.scor;
_root.tableLoaded = false;
loadVariables (_root.variables, "_root.t_r.t_r", "GET");
gotoAndPlay (25);
}
Symbol 167 MovieClip [g_ov] Frame 1
c = _root.t_r.t_r.count;
minscore = eval ("_root.t_r.t_r.score" add c);
if ((_root.scor <= minscore) || (!_root.tableLoaded)) {
gotoAndPlay (3);
} else {
gotoAndPlay (15);
}
Symbol 167 MovieClip [g_ov] Frame 14
stop();
Instance of Symbol 156 MovieClip in Symbol 167 MovieClip [g_ov] Frame 14
//component parameters
onClipEvent (initialize) {
scr = "_root.scor";
}
Symbol 167 MovieClip [g_ov] Frame 24
stop();
Symbol 167 MovieClip [g_ov] Frame 27
if (_root.TableLoaded) {
i = 1;
while (i <= _root.c_x) {
j = 1;
while (j <= _root.c_y) {
removeMovieClip(("_root.jachejka" add (i * _root.qq)) + j);
removeMovieClip((("_root.ball" add i) add "_") add j);
j++;
}
i++;
}
_root.gotoAndStop(4);
_root.lock = false;
removeMovieClip(_target);
} else {
gotoAndPlay(_currentframe - 1);
}
Instance of Symbol 168 MovieClip "t_r" in Symbol 169 MovieClip [tab_rec] Frame 1
onClipEvent (load) {
loadVariables (_root.variables add "?read=1", this);
}
onClipEvent (data) {
_root.tableLoaded = true;
_root.btn_t_r.gotoAndStop(2);
}
Symbol 186 MovieClip Frame 1
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
Stage.showMenu = false;
this.uu = _root._url;
var a = _root._url.split("/");
var i = 0;
while (i < a.length) {
if (a[i] == "files") {
_root.gid = a[i + 1];
}
i++;
}
if ((a[2] == "www.netstupidity.com") || (a[2] == "netstupidity.com")) {
_root.ligin = 1;
}
_root.__url = "http://www.netstupidity.com/games/hof/";
_root.loadVariables((_root.__url + "hof_bsc.php?id=") + _root.gid);
_root.prc = 0;
this.onEnterFrame = function () {
var ld = _root.getBytesLoaded();
var tt = _root.getBytesTotal();
var pr = ((100 * ld) / tt);
this.pasek._xscale = pr;
var b = Math.round(pr / 20);
if (pr >= 100) {
this.onEnterFrame = null;
this._parent.play();
}
};
Symbol 200 MovieClip Frame 140
stop();
Symbol 239 MovieClip Frame 1
this.t = getTimer();
this.tm = 0;
this.onEnterFrame = function () {
if (_root._framesloaded < 2) {
this.t = getTimer();
return(undefined);
}
this.tm = this.tm + (getTimer() - this.t);
var tt = Math.round(this.tm / 33);
if (tt < 1) {
this.stop();
} else {
this.t = getTimer();
if (tt >= 145) {
this.onEnterFrame = null;
this.gotoAndStop(145);
_root.play();
} else {
this.gotoAndStop(tt);
}
}
};
stop();
Symbol 242 MovieClip Frame 1
_root.stop();
stop();
Symbol 242 MovieClip Frame 2
stop();
Symbol 249 Button
on (release) {
getURL ("mailto:biophys@post.csmu.strace.net");
}
Symbol 260 Button
on (release) {
init_game(9, 9);
gotoAndStop (3);
}
Symbol 265 Button
on (release) {
gotoAndPlay (6);
}
Symbol 270 Button
on (release) {
_root.gotoAndStop(4);
}
Symbol 272 MovieClip Frame 1
stop();
Symbol 276 Button
on (release) {
init_game(9, 9);
gotoAndStop (3);
}
Symbol 281 MovieClip Frame 1
this._visible = _root.ligin == undefined;
this.onPress = function () {
getURL ("http://www.netstupidity.com");
};
Symbol 284 Button
on (release) {
add_newball();
}
Symbol 288 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 2
x1 = _root[_root.lastselect].x;
y1 = _root[_root.lastselect].y;
Symbol 288 MovieClip Frame 3
m = true;
if (_root[(("temp_" add x1) add "_") add y1] == 5) {
m = false;
_root.lock = false;
name = _root.lastselect.substr(4, _root.lastselect.length);
xx = _root[_root.lastselect]._x;
yy = _root[_root.lastselect]._y;
removeMovieClip("_root." add _root.lastselect);
val = Number(_root[(("current_mass_" add x1) add "_") add y1]) - 12;
_root.attachMovie("u_" add val, (("ball" add x1) add "_") add y1, (1000 + (x1 * 50)) + y1);
eval ((("_root.ball" add x1) add "_") add y1)._x = xx;
eval ((("_root.ball" add x1) add "_") add y1)._y = yy;
eval ((("_root.ball" add x1) add "_") add y1).x = x1;
eval ((("_root.ball" add x1) add "_") add y1).y = y1;
eval ((("_root.ball" add x1) add "_") add y1)._xscale = _root.scale * 1.6;
eval ((("_root.ball" add x1) add "_") add y1)._yscale = _root.scale * 1.6;
_root[(("current_masst_" add x1) add "_") add y1] = (x1 add "_") add y1;
eval ((("_root.ball" add x1) add "_") add y1).nodel = true;
eval ((("_root.ball" add x1) add "_") add y1).gotoAndStop(6);
_root.re_random();
_root.lastselect = null;
tellTarget (_root) {
if (over) {
rnd = random(max_random) + 1;
color = random(difrent_unit) + 1;
temp_obj = for_random[rnd];
L1 = "";
L2 = "";
p_c = true;
i = 0;
while (i <= temp_obj.length) {
if (temp_obj.substr(i, 1) eq "_") {
p_c = false;
} else if (p_c) {
L1 = L1 add temp_obj.substr(i, 1);
} else {
L2 = L2 add temp_obj.substr(i, 1);
}
i++;
}
attachMovie("u_" add color, "ball" add temp_obj, (1000 + (Number(L1) * 50)) + Number(L2));
this["ball" add temp_obj]._x = this["current_massx_" add for_random[rnd]];
this["ball" add temp_obj]._y = this["current_massy_" add for_random[rnd]];
this["ball" add temp_obj]._xscale = scale * 1.6;
this["ball" add temp_obj]._yscale = scale * 1.6;
this["current_mass_" add for_random[rnd]] = color + 2;
this["current_masst_" add for_random[rnd]] = temp_obj;
temp_obj = 0;
over = false;
}
};
gotoAndPlay (5);
}
if ((_root[(("temp_" add x1) add "_") add y1] == 1) && (m)) {
m = false;
x1 = x1 + -1;
_root[_root.lastselect].x = _root[_root.lastselect].x + -1;
}
if ((_root[(("temp_" add x1) add "_") add y1] == 2) && (m)) {
m = false;
x1 = x1 + 1;
_root[_root.lastselect].x = _root[_root.lastselect].x + 1;
}
if ((_root[(("temp_" add x1) add "_") add y1] == 3) && (m)) {
m = false;
y1 = y1 + -1;
_root[_root.lastselect].y = _root[_root.lastselect].y + -1;
}
if ((_root[(("temp_" add x1) add "_") add y1] == 4) && (m)) {
m = false;
y1 = y1 + 1;
_root[_root.lastselect].y = _root[_root.lastselect].y + 1;
}
_root[_root.lastselect]._x = _root[(("current_massx_" add x1) add "_") add y1];
_root[_root.lastselect]._y = _root[(("current_massy_" add x1) add "_") add y1];
Symbol 288 MovieClip Frame 4
gotoAndPlay(_currentframe - 1);
Symbol 288 MovieClip Frame 5
if (!_root.remove_movie()) {
_root.add_newball();
}
Symbol 289 Button
on (release) {
debug();
}
Symbol 294 MovieClip Frame 1
new_time = getTimer();
total = int((new_time - _root.start_time) / 1000);
min = int(total / 60);
sec = total - (min * 60);
if (min == 0) {
min = "00";
}
if (sec < 10) {
sec = "0" add sec;
}
time = (min add ":") add sec;
Symbol 303 Button
on (release) {
gotoAndStop (3);
init_game(9, 9);
}
Symbol 306 Button
on (release) {
gotoAndPlay (2);
}
Symbol 310 MovieClip Frame 1
if (_root.tableLoaded) {
i = 1;
while (i <= 10) {
attachMovie("table", "t_" add i, 100 + i);
eval ("t_" add i)._y = i * 20;
eval ("t_" add i).number = i;
if (i <= _root.t_r.t_r.count) {
eval ("t_" add i).name = eval ("_root.t_r.t_r.name" add i);
eval ("t_" add i).score = eval ("_root.t_r.t_r.score" add i);
eval ("t_" add i).time = eval ("_root.t_r.t_r.time" add i);
} else {
eval ("t_" add i).name = "--------";
eval ("t_" add i).score = "--------";
eval ("t_" add i).time = "--:--:--";
}
i++;
}
}