Frame 1
_root.loadVariables("http://67.18.146.218/games/_multi/_get.php?g=hex");
_root.socket = new XMLSocket();
_root.chat_socket = new XMLSocket();
Frame 2
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
Stage.showMenu = false;
Frame 81
i = 1;
while (i < 5) {
_root["mu" + i] = new Sound(this);
_root["mu" + i].attachSound("mu" + i);
i++;
}
Frame 82
function starting() {
gotoAndStop (82);
}
function single() {
gotoAndStop (87);
}
function multi() {
_root.onData = null;
gotoAndStop (83);
}
function instr() {
gotoAndStop (88);
}
function reg(f) {
gotoAndStop(f +88);
}
_root.__url1 = "http://67.18.146.218/games/_multi/";
clearInterval(_root.confirmation);
clearInterval(_root.confirmation_c);
clearInterval(_root._clock);
_root.tykanie.stop();
stop();
Instance of Symbol 59 MovieClip in Frame 82
//component parameters
onClipEvent (initialize) {
label = "MultiPlayer";
wide = 99;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
if (_root.uid == undefined) {
_root.back = _root.multi;
_root.reg(1);
} else {
_root.multi();
}
}
Instance of Symbol 59 MovieClip in Frame 82
//component parameters
onClipEvent (initialize) {
label = "Instructions";
wide = 101;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.instr();
}
Instance of Symbol 59 MovieClip in Frame 82
//component parameters
onClipEvent (initialize) {
label = "SinglePlayer";
wide = 108;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.single();
}
Frame 83
function _try(a) {
if (_root.chat_socket.connect(_root._ip, _root.chat_port) == true) {
clearInterval(_root.intr);
}
}
_root._ip = "67.18.146.218";
_root.chat_port = 10201;
_root._port = 10200;
_root.chat_socket.close();
clearInterval(_root.q_timer);
clearInterval(_root._clock);
_root.chat_socket.onConnect = function (success) {
if (success) {
_root.chat_socket.send(("hex:<i>" + _root.nick) + " has joined the room</i><br>");
} else {
_root.intr = setInterval(_try, 500, _root);
}
};
_root.chat_socket.onXML = function (m) {
_root.play();
};
if (_root.chat_socket.connect(_root._ip, _root.chat_port) != true) {
_root.intr = setInterval(_try, 500, _root);
}
stop();
Frame 84
function _join(str) {
_root.challenged.gotoAndStop(4);
_root.challenged._visible = true;
var a = str.split(",");
_root.challenged.opo = a[1];
_root.chat_socket.send(((("hex:" + String.fromCharCode(5)) + str) + ",") + _root.nick);
}
function _try(a) {
if (_root.socket.connect(_root._ip, _root._port) == true) {
clearInterval(_root.intr);
}
}
function _go() {
_root.socket.close();
_root._greens = false;
_root.socket.onConnect = function (success) {
if (success) {
_root.socket.send((("J" + Number(_root.challenged.opid)) + "&") + _root.uid);
} else {
_root.intr = setInterval(_try, 500, _root);
}
};
if (_root.socket.connect(_root._ip, _root._port) != true) {
_root.intr = setInterval(_try, 500, _root);
}
}
_root.socket.close();
clearInterval(_root.intr);
clearInterval(_root.q_timer);
clearInterval(_root._clock);
_root.queue.splice(0, _root.queue.length);
_root.challenged._visible = false;
if (_root.banka == undefined) {
_root.banka = new Sound(_root);
_root.banka.attachSound("banka");
}
_root.chat_socket.onClose = function () {
_root.multi();
};
_root.chat_socket.onXML = function (m) {
var dm = m.toString();
var da = dm.split(":");
if (da[0] ne "hex") {
return(undefined);
}
da.shift();
m = da.join(":");
trace("/chat/\t" + m);
switch (m.charCodeAt(0)) {
case 5 :
var t = m.substr(1, m.toString().length - 1);
var a = t.split(",");
if (a[1] == _root.nick) {
_root.challenged.gotoAndStop(1);
_root.challenged.opo = a[2];
_root.challenged._visible = true;
_root.banka.start(0, 1);
_root.challenged.opid = Number(a[0]);
}
return;
case 6 :
var t = m.substr(1, m.toString().length - 1);
var a = t.split(",");
if (a[1] == _root.nick) {
_root.challenged.gotoAndStop(2);
_root.challenged.opo = a[2];
_root.challenged._visible = true;
_root.banka.start(0, 1);
_root.challenged.opid = Number(a[0]);
}
return;
case 7 :
var t = m.substr(1, m.toString().length - 1);
var a = t.split(",");
if (a[1] == _root.nick) {
_root.challenged.gotoAndStop(3);
_root.challenged.opo = a[2];
_root.challenged._visible = true;
_root.banka.start(0, 1);
_root.challenged.opid = Number(a[0]);
}
return;
default :
_root.czat.htmlText = _root.czat.htmlText + m;
_root.czat.scroll = _root.czat.maxscroll;
_root.scr.s._y = (_root.scr.m._y = 110);
}
};
_root.inp.onKeyDown = function () {
if (Key.isDown(13)) {
_root.chat_socket.send(((("hex:<b>" + _root.nick) + ": </b>") + _root.inp.text) + "<br>");
_root.inp.text = "";
}
};
Key.addListener(_root.inp);
Selection.setFocus(_root.inp);
_root.loadVariables((_root.__url1 + "_list.php?g=hex&x=") + new Date().getTime());
setInterval(function (a) {
_root.loadVariables((_root.__url1 + "_list.php?g=hex&x=") + new Date().getTime());
}, 2000, this);
_root._greens = true;
_root.socket.onXML = function (doc) {
if (doc eq "T") {
_root.socket.send("T");
return(undefined);
}
trace("/server/\t\t" + doc);
var d = doc.toString();
if (d.substr(0, 1) eq "J") {
_root.opnick = _root.challenged.opo;
_root.play();
}
};
_root.socket.onConnect = function (success) {
if (success) {
_root.socket.send(("L" + _root.uid) + "&hex");
} else {
_root.intr = setInterval(_try, 500, _root);
}
};
_root.intr = setInterval(_try, 5, _root);
stop();
Instance of Symbol 75 MovieClip in Frame 84
onClipEvent (load) {
this.tgt = this._parent.games;
}
Instance of Symbol 75 MovieClip in Frame 84
onClipEvent (load) {
this.tgt = this._parent.users;
}
Instance of Symbol 75 MovieClip "scr" in Frame 84
onClipEvent (load) {
this.tgt = this._parent.czat;
}
Frame 85
function __onSend(doc) {
_root._doc = doc;
_root.latency.push(setInterval(function (a) {
clearInterval(_root.latency.shift());
_root.__onSend(_root._doc);
}, 1300, this));
}
function _onSend(doc) {
var d = doc.toString();
if (doc eq "T") {
return(undefined);
}
trace("/game/\t" + d);
if (doc eq "Q") {
_root.clock_stop();
_root.socket.onClose = null;
_root.socket.onXML = null;
_root.socket.close();
_root.play();
} else {
_root.onRecieve(d);
}
}
function onRecieve(m) {
trace("/onrecieve/ " + m);
if (m == "GO") {
_root.clock_stop();
_root.socket.onClose = null;
_root.socket.onXML = null;
_root.socket.close();
_root.again._visible = true;
_root.again.gotoAndStop(2);
return(undefined);
}
var a = [];
a = m.split(",");
if (a[0] == "CT") {
_root.ch.htmlText = _root.ch.htmlText + (((("<b>" + _root.opnick) + ": </b>") + a[1]) + "<br>");
_root.ch.scroll = _root.ch.maxscroll;
_root.scr.s._y = (_root.scr.m._y = 110);
} else if (a[0] == "CL") {
if (_root.cow._currentframe == 5) {
return(undefined);
}
_root.again._visible = true;
_root.again.gotoAndStop(4);
} else if (a[0] == "MS") {
if (_root.cow._currentframe == 5) {
return(undefined);
}
_root.again._visible = true;
_root.again.gotoAndStop(6);
} else {
_root.again._visible = false;
_root[a[1]].MoveTo(int(a[2]), int(a[3]));
_root.mask1._visible = false;
_root.cow.gotoAndPlay("red");
_root.clock_start();
}
}
function MakeMove() {
_root.clock_stop();
_root.mask1._visible = true;
_root.cow.gotoAndPlay("fiol");
}
function _count_() {
var r = 0;
var g = 0;
var rr = 0;
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
if (it.typ eq "red") {
r++;
}
if (it.typ eq "green") {
g++;
}
if (it.isRed(it) && (it.CountPossibilities() > 0)) {
rr++;
}
x++;
}
y++;
}
_root.r = r;
_root.g = g;
if ((rr == 0) && ((r + g) >= 4)) {
_root.clock_stop();
_root.confirm("GO");
}
}
function clock(a) {
if (_root.cow._currentframe == 10) {
_root.clock_stop();
return(undefined);
}
if (_root._time_._currentframe == 1) {
_root.clock_stop();
return(undefined);
}
_root.clock_val++;
_root._time_.gotoAndStop(Math.round((10 * _root.clock_val) / 6));
if (_root.clock_val > 60) {
_root.time_out();
}
_root._time_.tm = 60 - _root.clock_val;
}
function time_out() {
_root.again._visible = true;
_root.again.gotoAndStop(5);
_root.again._visible = true;
_root._time_.gotoAndStop(1);
_root.confirm("CL");
_root.MakeMove();
}
function clock_start() {
if (_root._time_._currentframe > 1) {
return(undefined);
}
if (_root.tykanie == undefined) {
_root.tykanie = new Sound(_root);
_root.tykanie.attachSound("tykanie");
}
_root.tykanie.start(0, 1111);
_root.clock_val = 0;
_root._time_.gotoAndStop(2);
_root._time_.tm = 60;
_root._clock = setInterval(clock, 500, _root);
}
function clock_stop() {
_root._time_.gotoAndStop(1);
clearInterval(_root._clock);
_root.tykanie.stop();
_root.clock_val = 0;
}
function confirm(s) {
trace("->" + s);
_root.socket.send(s);
if (s eq "GO") {
_root.confirm = null;
_root.send_flag = false;
_root.socket.onClose = null;
_root.socket.send("GO");
_root.socket.onXML = function (doc) {
if (doc eq "Q") {
_root.socket.close();
_root.again._visible = true;
_root.again.gotoAndStop("wygr");
}
};
_root.clock_stop();
return(undefined);
}
return(undefined);
}
clearInterval(_root.text_enable);
_root.inp.type = "input";
Selection.setSelection(_root.inp);
_root.pocket = "";
this.inf._visible = false;
this.game._visible = true;
this.onMouseDown = null;
_root.selected = null;
_root.multip = true;
_root.socket.onClose = function () {
_root.play();
};
Selection.setFocus(_root.inp);
_root.socket.onXML = _onSend;
_root.inp.onKeyDown = function () {
if (Key.isDown(13)) {
if (_root.inp.text.length < 1) {
return(undefined);
}
_root.ch.htmlText = _root.ch.htmlText + (((("<b>" + _root.nick) + ": </b>") + _root.inp.text) + "<br>");
_root.ch.scroll = _root.ch.maxscroll;
_root.scr.s._y = (_root.scr.m._y = 110);
_root.confirm("CT," + _root.inp.text);
_root.inp.text = "";
_root.inp.type = "dynamic";
_root.text_enable = setInterval(function (a) {
clearInterval(_root.text_enable);
_root.inp.type = "input";
Selection.setSelection(_root.inp);
}, 500, _root);
}
};
Key.addListener(_root.inp);
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
it.nm = (("i_" + x) + "_") + y;
it.xx = x;
it.yy = y;
it._visible = true;
it.gotoAndPlay(1);
x++;
}
y++;
}
if (_root._greens == true) {
i_1_1.ball.gotoAndPlay("r");
i_9_9.ball.gotoAndPlay("r");
i_1_9.ball.gotoAndPlay("g");
i_9_1.ball.gotoAndPlay("g");
_root.mask1._visible = false;
_root.cow.gotoAndPlay("red");
_root.clock_start();
} else {
i_1_1.ball.gotoAndPlay("g");
i_9_9.ball.gotoAndPlay("g");
i_1_9.ball.gotoAndPlay("r");
i_9_1.ball.gotoAndPlay("r");
_root.mask1._visible = true;
_root.cow.gotoAndPlay("fiol");
}
stop();
Instance of Symbol 59 MovieClip in Frame 85
//component parameters
onClipEvent (initialize) {
label = "Send";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
if (_root.inp.text.length < 1) {
return(undefined);
}
_root.ch.htmlText = _root.ch.htmlText + (((("<b>" + _root.nick) + ": </b>") + _root.inp.text) + "<br>");
_root.ch.scroll = _root.ch.maxscroll;
_root.socket.send("CT," + _root.inp.text);
_root.inp.text = "";
Selection.setFocus(_root.inp);
}
Instance of Symbol 59 MovieClip in Frame 85
//component parameters
onClipEvent (initialize) {
label = "Buzz";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.socket.send("BZ");
Selection.setFocus(_root.inp);
}
Instance of Symbol 59 MovieClip in Frame 85
//component parameters
onClipEvent (initialize) {
label = "GiveUp";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.socket.send("GU");
Selection.setFocus(_root.inp);
}
Instance of Symbol 75 MovieClip "scr" in Frame 85
onClipEvent (load) {
this.tgt = this._parent.ch;
}
Frame 86
clearInterval(_root.q_timer);
stop();
Instance of Symbol 59 MovieClip in Frame 86
//component parameters
onClipEvent (initialize) {
label = "Reconnect";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.multi();
}
Frame 87
function CountRisks(col) {
if (col) {
var c = "green";
} else {
var c = "red";
}
var risks = new Array();
var risk = new Array();
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
if (it.typ eq "empty") {
var a = it.Sib(it);
var r = 0;
for (var i in a) {
if (a[i].typ eq c) {
r++;
}
}
it.txt = r;
if (r > 0) {
risks.push(it);
}
} else {
it.txt = 0;
}
x++;
}
y++;
}
for (var i in risks) {
var a = risks[i].Sib(risks[i]);
risks[i].RemoveMarks();
risks[i].txt = risks[i].txt * ((2 * risks[i].CountSib(col)) + risks[i].CountS_Sib(col));
if (risks[i].txt > 0) {
risk.push(risks[i]);
}
}
delete risks;
return(risk);
}
function Timer() {
clearInterval(_root.intr);
_root.mask.onEnterFrame = function () {
delete _root.risk_red;
_root.risk_red = _root.CountRisks(false);
this.onEnterFrame = function () {
var r = 0;
_root.targ = null;
_root.tot_risk_red = 0;
for (var i in _root.risk_red) {
if (_root.risk_red[i].txt > r) {
_root.targ = _root.risk_red[i];
r = _root.risk_red[i].txt;
}
_root.tot_risk_red = _root.tot_risk_red + _root.risk_red[i].txt;
}
if (_root.targ == null) {
this.onEnterFrame = function () {
RandomMove();
delete this.onEnterFrame;
_root.mask._visible = false;
_root.cow.gotoAndPlay("red");
};
} else {
var b = _root.targ.Moves();
var a = new Array();
for (var i in b) {
if (b[i].typ == "red") {
a.push(b[i]);
}
}
var max = 0;
var cure = null;
for (var i in a) {
if (a[i].txt >= max) {
max = a[i].txt;
cure = a[i];
}
}
if (cure == null) {
_root.targ.txt = 0;
return(undefined);
}
cure.MoveTo(_root.targ.x, _root.targ.y);
this.onEnterFrame = function () {
delete _root.greens;
_root.greens = new Array();
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
if (it.isGreen(it)) {
_root.greens.push(it);
}
x++;
}
y++;
}
var res = 0;
for (i in _root.greens) {
res = res + _root.greens[i].CountPossibilities();
}
if (res == 0) {
_root.again.gotoAndStop("przegr");
_root.again._visible = true;
}
delete this.onEnterFrame;
_root.mask._visible = false;
_root.cow.gotoAndPlay("red");
};
}
};
};
}
function RandomMove() {
delete _root.reds;
_root.reds = new Array();
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
if (it.isRed(it) && (it.CountPossibilities() > 0)) {
_root.reds.push(it);
}
x++;
}
y++;
}
var j = Math.floor(Math.random() * (_root.reds.length - 0.1));
if (_root.reds.length == 0) {
_root.again.gotoAndStop("wygr");
_root.again._visible = true;
return(undefined);
}
var jj = 0;
do {
var itm = _root.reds[j + jj];
jj++;
if ((j + jj) > (_root.reds.length - 1)) {
jj = -j;
}
var a = itm.Moves();
var i = Math.floor(Math.random() * (a.length - 0.1));
var ii = 0;
do {
x = a[i + ii].x;
y = a[i + ii].y;
ii++;
if (ii != 0) {
if ((i + ii) > (a.length - 1)) {
ii = -i;
}
var rt = itm.MoveTo(x, y);
} else {
rt = false;
}
} while ((rt == false) && (ii != 0));
if ((jj == 0) && (rt == false)) {
_root.again.gotoAndStop("wygr");
_root.again._visible = true;
return(undefined);
}
} while (rt == false);
}
function MakeMove() {
_root.cow.gotoAndPlay("fiol");
_root.intr = setInterval(Timer, 500, this);
_root.mask._visible = true;
}
function _count_() {
var r = 0;
var g = 0;
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
if (it.typ eq "red") {
r++;
}
if (it.typ eq "green") {
g++;
}
x++;
}
y++;
}
_root.r = r;
_root.g = g;
}
this.again._visible = false;
this.inf._visible = false;
this.game._visible = true;
_root.again.gotoAndStop(1);
this.onMouseDown = null;
_root.selected = null;
_root.multip = false;
_root._greens = true;
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
var it = eval ((("_root.i_" + x) + "_") + y);
it._visible = true;
it.gotoAndPlay(1);
x++;
}
y++;
}
i_1_1.ball.gotoAndPlay("r");
i_9_9.ball.gotoAndPlay("r");
i_1_9.ball.gotoAndPlay("g");
i_9_1.ball.gotoAndPlay("g");
mask._visible = false;
stop();
Instance of Symbol 59 MovieClip in Frame 87
//component parameters
onClipEvent (initialize) {
label = "Restart";
wide = 74;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.starting();
}
Frame 88
stop();
Instance of Symbol 59 MovieClip in Frame 88
//component parameters
onClipEvent (initialize) {
label = "MultiPlayer";
wide = 99;
c1 = 180;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = true;
widthMode = false;
rgb = 11796480 /* 0xB40000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
if (_root.uid == undefined) {
_root.back = _root.multi;
_root.reg(1);
} else {
_root.multi();
}
}
Instance of Symbol 59 MovieClip in Frame 88
//component parameters
onClipEvent (initialize) {
label = "SinglePlayer";
wide = 108;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.single();
}
Frame 89
String.prototype.isMail = function () {
if (!this) {
return(false);
}
var iChars = "*|,\\<>[]{}`';()&\\#%\"";
var i = 0;
while (i < this.length) {
if (iChars.indexOf(this.charAt(i)) != -1) {
return(false);
}
i++;
}
if (this.indexOf("@") == -1) {
return(false);
}
if (this.indexOf(".") == -1) {
return(false);
}
return(true);
};
String.prototype.isNick = function () {
if (!this) {
return(false);
}
var iChars = "*|,\\<>[]{}`';()&\\#%@.\"";
var i = 0;
while (i < this.length) {
if (iChars.indexOf(this.charAt(i)) != -1) {
return(false);
}
i++;
}
if (this.length < 3) {
return(false);
}
return(true);
};
String.prototype.isPass = function () {
if (!this) {
return(false);
}
var iChars = ",<>`\"";
var i = 0;
while (i < this.length) {
if (iChars.indexOf(this.charAt(i)) != -1) {
return(false);
}
i++;
}
if (this.length < 3) {
return(false);
}
return(true);
};
_root.alt._visible = false;
_root.rem._visible = false;
_root.proc._visible = false;
stop();
Instance of Symbol 59 MovieClip in Frame 89
//component parameters
onClipEvent (initialize) {
label = "Login";
wide = 171;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.onData = function () {
if (_root.r == 1) {
_root.proc._visible = false;
if (_root.s == 1) {
_root.back();
} else if (_root.s == 5) {
_root.reg(3);
} else {
_root.alt._visible = true;
if (_root.s == 2) {
_root.rem._visible = true;
}
}
}
};
_root.loadVariables(((((_root.__url1 + "_login.php?n=") + _root.nick) + "&p=") + _root.pass) + "&g=hex");
_root.proc._visible = true;
}
Instance of Symbol 59 MovieClip in Frame 89
//component parameters
onClipEvent (initialize) {
label = "Register";
wide = 171;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.reg(2);
}
Instance of Symbol 59 MovieClip "rem" in Frame 89
//component parameters
onClipEvent (initialize) {
label = "email me my password";
wide = 172;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.onData = function () {
if (_root.r == 1) {
_root.proc._visible = false;
}
};
_root.loadVariables((_root.__url1 + "_remind.php?n=") + _root.nick);
_root.proc._visible = true;
_root.alt._visible = false;
}
Frame 90
_root._pe._visible = false;
_root._ne._visible = false;
_root.spell._visible = false;
_root.proc._visible = false;
Instance of Symbol 59 MovieClip in Frame 90
//component parameters
onClipEvent (initialize) {
label = "Register";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root._ne._visible = false;
if (_root.pass1.isPass() == false) {
_root.spell._visible = true;
return(undefined);
}
if (_root.nick.isNick() == false) {
_root.spell._visible = true;
return(undefined);
}
if (_root.pass1 != _root.pass2) {
_root._pe._visible = true;
} else {
_root.onData = function () {
if (_root.r == 1) {
_root.proc._visible = false;
if (_root.s == 1) {
_root.reg(3);
} else {
_root._ne._visible = true;
}
}
};
_root.loadVariables(((((_root.__url1 + "_register.php?n=") + _root.nick) + "&p=") + _root.pass1) + "&g=hex");
_root._pe._visible = false;
_root._ne._visible = false;
_root.proc._visible = true;
}
}
Frame 91
_root.inval._visible = false;
Instance of Symbol 59 MovieClip in Frame 91
//component parameters
onClipEvent (initialize) {
label = "Reserve";
wide = 70;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
if (_root.mail.isMail() == false) {
_root.inval._visible = true;
return(undefined);
}
_root.onData = function () {
if (_root.r == 1) {
_root.proc._visible = false;
_root.reg(4);
}
};
_root.loadVariables((((_root.__url1 + "_reserve.php?uid=") + _root.uid) + "&m=") + _root.mail);
_root.proc._visible = true;
}
Instance of Symbol 59 MovieClip in Frame 91
//component parameters
onClipEvent (initialize) {
label = "Skip";
wide = 70;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.onData = null;
_root.back();
}
Instance of Symbol 59 MovieClip in Frame 92
//component parameters
onClipEvent (initialize) {
label = "Go back to the game";
wide = 159;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.onData = null;
_root.back();
}
Symbol 13 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 1
_parent.typ = "empty";
this._xscale = (this._yscale = 80);
stop();
Symbol 21 MovieClip Frame 2
this.led1.gotoAndPlay(2);
_parent.typ = "green";
Symbol 21 MovieClip Frame 7
_parent.typ = "green";
_root._count_();
stop();
Symbol 21 MovieClip Frame 8
_parent.typ = "empty";
Symbol 21 MovieClip Frame 16
if (this._parent.st) {
_parent.typ = "empty";
this._parent.st = false;
stop();
}
Symbol 21 MovieClip Frame 17
this.led1.gotoAndPlay(2);
_parent.typ = "red";
Symbol 21 MovieClip Frame 21
_parent.typ = "red";
_root._count_();
stop();
Symbol 21 MovieClip Frame 22
_parent.typ = "empty";
Symbol 21 MovieClip Frame 30
if (this._parent.st) {
_parent.typ = "empty";
this._parent.st = false;
stop();
} else {
gotoAndPlay (2);
}
Symbol 31 MovieClip Frame 1
_root.stop();
Stage.scaleMode = "noScale";
fscommand ("trapallkeys", true);
Stage.showMenu = false;
this.sg = [];
for (var i in this) {
if (this[i]._totalframes == 1) {
this.sg.push(this[i]);
this[i]._alpha = 20;
}
}
this._tm = getTimer();
this.onEnterFrame = function () {
var ld = _root.getBytesLoaded();
var tt = _root.getBytesTotal();
this.bytes = ld;
this.procent = ((tt > 0) ? ((100 * ld) / tt) : 0);
this.time = (getTimer() - this._tm) / 1000;
this.transfer = this.bytes / this.time;
var pr = Math.floor(this.procent);
var i = 100;
while (i > (100 - pr)) {
this.sg[i]._alpha = 40;
i--;
}
if (pr >= 100) {
this.onEnterFrame = null;
_root.play();
}
};
Symbol 59 MovieClip Frame 1
this.onPress = function () {
pressing = true;
i = 1;
while (i <= 3) {
buttonColor = new Color(eval ("piece" + i).colorchip);
buttonColor.setRGB(3355443);
lowColor = new Color(eval ("piece" + i).bottomhilite);
lowColorTransform = new Object();
lowColorTransform = {ra:"0", rb:"200", ga:"0", gb:"200", ba:"0", bb:"200", aa:"100", ab:"0"};
lowColor.setTransform(lowColorTransform);
i++;
}
};
this.onRelease = function () {
pressing = false;
};
this.onReleaseOutside = function () {
pressing = false;
};
this.onEnterFrame = function () {
if (pressing != true) {
i = 1;
while (i <= 3) {
buttonColor = new Color(eval ("piece" + i).colorchip);
buttonColor.setRGB(rgb);
lowColor = new Color(eval ("piece" + i).bottomhilite);
lowColorTransform = new Object();
lowColorTransform = {ra:"0", rb:hc1, ga:"0", gb:hc2, ba:"0", bb:hc3, aa:"100", ab:"0"};
lowColor.setTransform(lowColorTransform);
i++;
}
}
};
with (piece2) {
_width = _parent.wide;
piece1._x = _x - (_width / 2);
piece3._x = _x + (_width / 2);
_parent.midshadow._width = _width;
_parent.leftshadow._x = _x - (_width / 2);
_parent.rightshadow._x = _x + (_width / 2);
}
label1.autoSize = "center";
label2.autoSize = "center";
Symbol 75 MovieClip Frame 1
function _scroll(p) {
this.tgt.scroll = Math.round(p * this.tgt.maxscroll);
}
Instance of Symbol 74 MovieClip "m" in Symbol 75 MovieClip Frame 1
on (press) {
this.startDrag();
this.onEnterFrame = function () {
this._parent.s.y = ((this._y < -110) ? -110 : (((this._y > 110) ? 110 : (this._y))));
};
this._parent.s.onEnterFrame = function () {
this._y = this._y - ((this._y - this.y) / 3);
this._parent._scroll((this._y + 110) / 220);
};
}
on (release, releaseOutside) {
this.stopDrag();
this.onEnterFrame = null;
this._x = this._parent.s._x;
this._parent.s.onEnterFrame = function () {
this._y = this._y - ((this._y - this.y) / 3);
if (((this._y - this.y) / 3) < 1) {
this._y = this.y;
this.onEnterFrame = null;
}
this._parent._scroll((this._y + 110) / 220);
};
}
Symbol 105 MovieClip Frame 1
stop();
Instance of Symbol 59 MovieClip in Symbol 105 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
label = "Take Up";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.chat_socket.send(((((("hex:" + String.fromCharCode(6)) + this._parent.opid) + ",") + this._parent.opo) + ",") + _root.nick);
this._parent.gotoAndStop(5);
}
Instance of Symbol 59 MovieClip in Symbol 105 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
label = "Chicken out";
wide = 75;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
_root.chat_socket.send(((((("hex:" + String.fromCharCode(7)) + this._parent.opid) + ",") + this._parent.opo) + ",") + _root.nick);
this._parent.gotoAndStop(6);
}
Symbol 105 MovieClip Frame 2
_root.chat_socket.onClose = null;
_root.chat_socket.close();
_root._go();
Instance of Symbol 59 MovieClip in Symbol 105 MovieClip Frame 3
//component parameters
onClipEvent (initialize) {
label = "Hide Message";
wide = 119;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
this._parent._visible = false;
}
Symbol 105 MovieClip Frame 5
_root.chat_socket.onClose = null;
_root.chat_socket.close();
Instance of Symbol 59 MovieClip in Symbol 105 MovieClip Frame 6
//component parameters
onClipEvent (initialize) {
label = "Hide Message";
wide = 119;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
this._parent._visible = false;
}
Symbol 114 MovieClip Frame 5
stop();
Symbol 114 MovieClip Frame 6
_root.clock_stop();
Symbol 114 MovieClip Frame 10
stop();
Symbol 129 MovieClip Frame 1
function Sib(item) {
var arr = new Array();
if (item.x > 1) {
var it = eval ((("this._parent.i_" + (item.x - 1)) + "_") + item.y);
arr.push(it);
}
if (item.x < 9) {
var it = eval ((("this._parent.i_" + (item.x + 1)) + "_") + item.y);
arr.push(it);
}
if (item.y > 1) {
var it = eval ((("this._parent.i_" + item.x) + "_") + (item.y - 1));
arr.push(it);
}
if (item.y < 9) {
var it = eval ((("this._parent.i_" + item.x) + "_") + (item.y + 1));
arr.push(it);
}
if ((item.x > 1) && (item.y < 9)) {
var it = eval ((("this._parent.i_" + (item.x - 1)) + "_") + (item.y + 1));
arr.push(it);
}
if ((item.x < 9) && (item.y > 1)) {
var it = eval ((("this._parent.i_" + (item.x + 1)) + "_") + (item.y - 1));
arr.push(it);
}
return(arr);
}
function CountPossibilities() {
var a = this.Moves();
var ret = 0;
for (var i in a) {
if (a[i].typ eq "empty") {
ret++;
}
}
return(ret);
}
function Moves() {
var a = new Array();
a[0] = this.Sib(this);
var j = 1;
for (i in a[0]) {
a[j] = this.Sib(a[0][i]);
j++;
}
var s = new Array();
for (i in a) {
for (j in a[i]) {
s.push(a[i][j]);
}
}
return(s);
}
function MoveTo(x, y) {
var item = eval ((("this._parent.i_" + x) + "_") + y);
ClearAll(this);
var ar = Sib(this);
for (var it in ar) {
if (isEmpty(ar[it])) {
ar[it].gotoAndStop(4);
}
}
for (var it in ar) {
var ar2 = Sib(ar[it]);
for (var it2 in ar2) {
if (ar2[it2]._currentframe <= 2) {
ar2[it2].gotoAndStop(3);
}
}
}
var ret = isPossible(item);
if (ret) {
Attack(this, item);
}
ClearAll(this);
ClearAll(item);
return(ret);
}
function CountSib(col) {
var s = 0;
var ar = Sib(this);
if (col) {
for (var it in ar) {
ar[it];
if ((typ eq "red") && (ar[it].mark)) {
s++;
}
ar[it].mark = false;
}
} else {
for (var it in ar) {
if ((ar[it].typ eq "green") && (ar[it].mark)) {
s++;
}
ar[it].mark = false;
}
}
return(s);
}
function RemoveMarks() {
var ar = Sib(this);
for (var it in ar) {
var a = Sib(ar[it]);
for (var i in a) {
a[i].mark = true;
}
ar[it].mark = true;
}
}
function CountS_Sib(col) {
var s = 0;
var ar = Sib(this);
if (col) {
for (var it in ar) {
s = s + ar[it].CountSib(col);
}
} else {
for (var it in ar) {
s = s + ar[it].CountSib(col);
}
}
return(s);
}
function ClearAll(item) {
var y = 1;
while (y <= 9) {
var x = 1;
while (x <= 9) {
if (!((x == item.x) && (y == item.y))) {
var it = eval ((("_root.i_" + x) + "_") + y);
it.gotoAndStop(2);
}
x++;
}
y++;
}
}
function Attack(atc, def) {
if (atc.typ eq "red") {
def.ball.gotoAndPlay("red");
}
if (atc.typ eq "green") {
def.ball.gotoAndPlay("green");
}
if (def._currentframe == 3) {
atc.st = true;
atc.ball.play();
}
var ar = Sib(def);
for (var it in ar) {
if ((atc.typ eq "red") && (ar[it].typ eq "green")) {
ar[it].ball.gotoAndPlay("red");
}
if ((atc.typ eq "green") && (ar[it].typ eq "red")) {
ar[it].ball.gotoAndPlay("green");
}
}
if ((_root.multip == true) && (_root.mask1._visible == false)) {
_root.confirm((((("CM," + atc.nm) + ",") + def.xx) + ",") + def.yy);
Selection.setFocus(_root.inp);
}
}
function isPossible(item) {
return(isEmpty(item) && (item._currentframe > 2));
}
function isEmpty(item) {
return(item.typ eq "empty");
}
function isRed(item) {
return(item.typ eq "red");
}
function isGreen(item) {
return(item.typ eq "green");
}
var n = new String(this._name);
this.x = Number(n.substring(2, 3));
this.y = Number(n.substring(4, 5));
this.cur._visible = true;
this.ball.led._alpha = (this.cur._alpha = 0);
this.onPress = function () {
_root["mu" + (random(3) + 1)].start(0, 1);
if (_root.mask1._visible == true) {
return(undefined);
}
if (_root.mask._visible == true) {
return(undefined);
}
if (this.typ eq "red") {
return(undefined);
}
if (_root.selected == null) {
if ((this.ball._currentframe != 7) && (this.ball._currentframe != 21)) {
return(undefined);
}
var ar = Sib(this);
ClearAll(this);
for (var it in ar) {
if (isEmpty(ar[it])) {
ar[it].gotoAndStop(4);
}
}
for (var it in ar) {
var ar2 = Sib(ar[it]);
for (var it2 in ar2) {
if (ar2[it2]._currentframe <= 2) {
ar2[it2].gotoAndStop(3);
}
}
}
_root.selected = this;
} else if (isPossible(this)) {
Attack(_root.selected, this);
ClearAll(this);
_root.selected = null;
_root.MakeMove();
} else if (this.typ eq "green") {
if ((this.ball._currentframe != 7) && (this.ball._currentframe != 21)) {
return(undefined);
}
var ar = Sib(this);
ClearAll(this);
for (var it in ar) {
if (isEmpty(ar[it])) {
ar[it].gotoAndStop(4);
}
}
for (var it in ar) {
var ar2 = Sib(ar[it]);
for (var it2 in ar2) {
if (ar2[it2]._currentframe <= 2) {
ar2[it2].gotoAndStop(3);
}
}
}
_root.selected = this;
}
};
this.onRollOver = function () {
delete this.cur.onEnterFrame;
this.ball.led._alpha = (this.cur._alpha = 100);
};
this.onDragOut = (this.onRollOut = function () {
this.cur.onEnterFrame = function () {
var a = this._alpha;
if (this._parent._currentframe >= 3) {
a = a - 30;
} else {
a = a - 2;
}
if (a <= 0) {
a = 0;
delete this.onEnterFrame;
}
this._parent.ball.led._alpha = (this._alpha = a);
};
});
Symbol 129 MovieClip Frame 2
stop();
Symbol 129 MovieClip Frame 3
stop();
Symbol 129 MovieClip Frame 4
stop();
Symbol 142 MovieClip Frame 1
this._visible = true;
stop();
Symbol 142 MovieClip Frame 2
this._visible = true;
stop();
Instance of Symbol 59 MovieClip in Symbol 142 MovieClip Frame 2
//component parameters
onClipEvent (initialize) {
label = "Once Again";
wide = 102;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.starting();
}
Symbol 142 MovieClip Frame 3
stop();
Symbol 142 MovieClip Frame 4
this._visible = true;
stop();
Instance of Symbol 59 MovieClip in Symbol 142 MovieClip Frame 4
//component parameters
onClipEvent (initialize) {
label = "take the victory";
wide = 123;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.confirm("GO");
}
Instance of Symbol 59 MovieClip in Symbol 142 MovieClip Frame 4
//component parameters
onClipEvent (initialize) {
label = "continue game";
wide = 123;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
_root.confirm("MS");
this._parent._visible = false;
_root.mask1._visible = false;
_root.cow.gotoAndPlay("red");
_root.clock_start();
}
Symbol 142 MovieClip Frame 5
this._visible = true;
_root.clock_stop();
stop();
Symbol 142 MovieClip Frame 6
this._visible = true;
stop();
Instance of Symbol 59 MovieClip in Symbol 142 MovieClip Frame 6
//component parameters
onClipEvent (initialize) {
label = "Hide message";
wide = 119;
c1 = 160;
c2 = 0;
c3 = 0;
hc1 = 180;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = false;
rgb = 10485760 /* 0xA00000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 11796480 /* 0xB40000 */;
}
on (press) {
this._parent._visible = false;
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 10
stop();
Symbol 257 MovieClip Frame 1
stop();
Instance of Symbol 59 MovieClip in Symbol 293 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
label = "Cancel";
wide = 171;
c1 = 182;
c2 = 0;
c3 = 0;
hc1 = 160;
hc2 = 0;
hc3 = 0;
baseMode = false;
widthMode = true;
rgb = 11927552 /* 0xB60000 */;
rb = 255;
gb = 255;
bb = 255;
hilitergb = 10485760 /* 0xA00000 */;
}
on (press) {
this._parent._visible = false;
_root.onData = null;
}