Frame 1
function getDist(unitA, unitB) {
lx = unitA._x - unitB._x;
ly = unitA._y - unitB._y;
dist = Math.sqrt((lx * lx) + (ly * ly));
return(dist);
}
function getAngTo(unitB, unitA) {
lx = unitA._x - unitB._x;
ly = unitA._y - unitB._y;
ang = (Math.atan2(lx, ly) * 180) / Math.PI;
ang = ang * -1;
return(ang);
}
function rotateTo(useMe, toAngle, _speed) {
keepRot = true;
useMe._rotation = useMe._rotation - toAngle;
if (useMe._rotation < 0) {
useMe._rotation = Math.min(0, useMe._rotation + _speed);
} else {
useMe._rotation = Math.max(0, useMe._rotation - _speed);
}
if (useMe._rotation == 0) {
keepRot = false;
}
useMe._rotation = useMe._rotation + toAngle;
return(keepRot);
}
if (_root.getBytesLoaded < _root.getBytesTotal) {
stop();
this.onEnterFrame = function () {
perc = _root.getBytesLoaded / _root.getBytesTotal;
loadc1.maskMC._y = -322.4 - (prec * 215);
loadc2.maskMC._y = -322.4 - (prec * 215);
if (perc >= 1) {
gotoAndPlay (2);
this.onEnterFrame = null;
}
};
}
Frame 3
verNum = 15;
_fps = 21;
ranNum = 4;
conDone = false;
stopCon = false;
sending = false;
playok = false;
idSel = "";
idStatus = 0;
timeGot = new Array();
fullDiff = 0;
if (servStr == undefined) {
servStr = "http://www.nearfatal.net/eggdrop/";
}
debugtxt.multiline = true;
debugtxt.autoSize = "left";
debugtxt.text = debugtxt.text + ("---v." + verNum);
if (debugMe != "true") {
debugtxt._visible = false;
}
if (conID == undefined) {
conID = "";
conPASS = "";
}
if (exppnts == undefined) {
_global.muPlay = true;
mtrack = new Array();
mtrack[0] = new Sound();
mtrack[0].attachSound("track_0");
mtrack[1] = new Sound();
mtrack[1].attachSound("track_1");
mtrack[2] = new Sound();
mtrack[2].attachSound("track_2");
lmsg = "not loaded";
avatNum = "";
allyAvat = "";
exppnts = new Array();
egglock = new Array();
i = 0;
while (i < 9) {
egglock[i] = "A";
i++;
}
i = 0;
while (i < 9) {
exppnts[i] = 0;
i++;
}
}
if (sendCool == undefined) {
sendCool = _fps * 2;
conspeed = 1;
cong = 0.3;
lateBon = 200;
}
p2start = false;
selftest = true;
if (selftest) {
}
Frame 6
gotoAndStop ("menu");
Instance of Symbol 172 MovieClip "setPanel" in Frame 6
onClipEvent (load) {
urltxt.text = _parent.servStr;
delayT.text = _parent.lateBon;
delayS.text = _parent.cong;
usertxt.text = _parent.conID;
passtxt.text = _parent.conPASS;
}
Instance of Symbol 203 MovieClip "conBtn" in Frame 6
onClipEvent (load) {
if (_parent.avatNum != "") {
_parent.setPanel.avatar.text = _parent.avatNum;
}
this.gotoAndStop(1);
this.state = "";
_parent.leftmsg.multiline = true;
_parent.leftmsg.autoSize = "left";
}
on (press) {
if (_parent.selftest) {
if (_parent.setPanel.avatar.text == "SANDY") {
_parent.avatNum = "SANDY";
} else if (_parent.setPanel.avatar.text == "LISA") {
_parent.avatNum = "LISA";
} else {
_parent.avatNum = "NONE";
}
_parent.allyAvat = "SANDY";
_parent.gotoAndPlay(14);
} else if (!_parent.stopCon) {
if (!_parent.sending) {
_parent.lmsg = _parent.leftmsg.text;
this.gotoAndStop(2);
if (!_parent.conDone) {
if (_parent.setPanel.avatar.text == "SANDY") {
_parent.avatNum = "SANDY";
} else if (_parent.setPanel.avatar.text == "LISA") {
_parent.avatNum = "LISA";
} else {
_parent.avatNum = "NONE";
}
_parent.servStr = _parent.setPanel.urltxt.text;
_parent.lateBon = Math.max(0, Math.min(10000, Number(_parent.setPanel.delayT.text)));
if (isNaN(_parent.lateBon)) {
_parent.lateBon = 1000;
}
_parent.cong = Math.max(0.3, Math.min(5, Number(_parent.setPanel.delayS.text)));
if (isNaN(_parent.cong)) {
_parent.cong = 5;
}
_parent.conID = _parent.setPanel.usertxt.text;
_parent.conPASS = _parent.setPanel.passtxt.text;
if (_parent.conID == "") {
this.state = "failed";
} else {
_parent.setPanel._visible = false;
this.state = "frstsend";
}
_parent.info1.text = "My ID: " + _parent.conID;
} else {
this.state = "getUsers";
_parent.idSel = "";
}
this.onEnterFrame = function () {
if (!_parent.stopCon) {
if (!_parent.sending) {
if (_parent.sendCool <= 0) {
if (this.state == "failed") {
this.state = "";
this.gotoAndStop(1);
_parent.sending = false;
this.onEnterFrame = null;
if (!_parent.conDone) {
_parent.setPanel._visible = true;
_parent.cancelBtn._visible = false;
_parent.cancelBtn.targt = null;
}
} else if (this.state == "frstsend") {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\nConnecting";
}
this.state = "";
this.v = new LoadVars();
_parent.sending = true;
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
this.v.myid = String(_parent.conID);
this.v.mypass = _parent.conPASS;
this.v.vernum = _parent.verNum;
this.v.doit = 1;
this.v.leftmsg = escape(_parent.lmsg);
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + ((("\nConnect attempt:" + geladen) + " EXT") + this.ext);
}
if (geladen) {
if ((this.ext == "exists") || (this.ext == "new")) {
tempArr = this.expoint.split("-");
tempLen = tempArr.length;
tempStr = "";
tempNum = 0;
i = 0;
while (i < tempLen) {
_parent.exppnts[i] = Number(tempArr[i]);
tempNum = tempNum + Math.floor(_parent.exppnts[i] / tempLen);
if (i == 0) {
tempStr = tempStr + (" Y:" + tempArr[i]);
} else if (i == 1) {
tempStr = tempStr + (" G:" + tempArr[i]);
} else if (i == 2) {
tempStr = tempStr + (" R: " + tempArr[i]);
} else if (i == 3) {
tempStr = tempStr + (" B: " + tempArr[i]);
} else if (i == 4) {
tempStr = tempStr + (" P: " + tempArr[i]);
} else if (i == 5) {
tempStr = tempStr + (" C: " + tempArr[i]);
} else if (i == 6) {
tempStr = tempStr + (" M: " + tempArr[i]);
} else if (i == 7) {
tempStr = tempStr + (" G: " + tempArr[i]);
} else if (i == 8) {
tempStr = tempStr + (" W: " + tempArr[i]);
}
i++;
}
tempLen = String(this.scores).length;
i = 0;
while (i < tempLen) {
_parent.egglock[i] = String(this.scores).substr(i, 1);
i++;
}
if (this.ext == "new") {
_parent.conico.coninfo.text = "account created";
if (this.newpw != undefined) {
_parent.info1.text = ("NEW PW: " + this.newpw) + " ";
_parent.conPASS = this.newpw;
_parent.setPanel.passtxt.text = _parent.conPASS;
if (this.newid != undefined) {
_parent.conID = this.newid;
_parent.setPanel.usertxt.text = _parent.conID;
}
}
} else {
_parent.conico.coninfo.text = "account logged on";
_parent.info1.text = "";
}
_parent.info1.text = _parent.info1.text + ((((((("My ID: " + _parent.conID) + " EXP: ") + tempNum) + " Unlocks: ") + String(this.scores)) + newline) + tempStr);
_parent.leftmsg.text = unescape(this.leftmsg);
_parent.lmsg = this.leftmsg;
_parent.conDone = true;
state = "getUsers";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
} else if (this.ext == "pwno") {
state = "failed";
if (this.verold != undefined) {
_parent.conico.coninfo.text = String(this.verold);
} else {
_parent.conico.coninfo.text = "log on failed";
}
_parent.setPanel.usertxt.text = "notGood";
} else if (this.ext == "upno") {
state = "failed";
_parent.conico.coninfo.text = "log on failed";
_parent.info1.text = "You logged on before but pw or name are wrong - for new account try again in 30min";
}
} else {
_parent.conico.coninfo.text = "log on failed. maybe wrong server adress";
state = "failed";
}
_parent.sending = false;
};
_parent.conico.coninfo.text = "connecting to server";
this.v.sendAndLoad(String(_parent.servStr + "setid.php"), v, "POST");
} else if (this.state == "getUsers") {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\nLoad Userlist";
}
this.state = "";
this.v = new LoadVars();
_parent.sending = true;
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
this.v.myid = String(_parent.conID);
this.v.mypass = _parent.conPASS;
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\nUserlist received";
}
if (geladen) {
tempArr = this.ext.split(",");
tempArr.splice(0, 1);
tempLen = tempArr.length;
j = tempLen - 1;
while (j >= 0) {
if (String(_parent.conID) == String(tempArr[j]).substr(0, 10)) {
tempArr.splice(j, 1);
i = -1;
}
j--;
}
i = _parent.userList.conItems.length - 1;
while (i > -1) {
removeMovieClip(_parent.userList.conItems[i]);
_parent.userList.conItems.splice(i, 1);
i--;
}
_parent.userList.userL = 0;
_parent.userList.conItems = new Array();
tempLen = tempArr.length;
_temp1a = Number(this.stime);
i = 0;
while (i < tempLen) {
duplicateMovieClip (_parent.userList.slot0, "slot" + (_parent.userList.userL + 1), _parent.userList.userL + 32);
_parent.userList.conItems[i] = _parent.userList[String("slot" + (_parent.userList.userL + 1))];
tempArr2 = String(tempArr[i]).split("|");
_parent.userList.conItems[i].idname = String(tempArr2[0]);
_parent.userList.conItems[i].busy = Number(tempArr2[1]);
_parent.userList.conItems[i].conwith = String(tempArr2[2]);
tempArr3 = String(tempArr2[3]).split("-");
tempNum = 0;
tempLen2 = tempArr3.length;
j = 0;
while (j < tempLen2) {
tempNum = tempNum + Math.floor(Number(tempArr3[j]) / tempLen2);
j++;
}
_parent.userList.conItems[i].exppoint = tempNum;
_parent.userList.conItems[i].scenes = String(tempArr2[4]).substr(0, 5);
_parent.userList.conItems[i].txt.text = _parent.userList.conItems[i].idname + " ";
if (_parent.userList.conItems[i].busy == 0) {
_parent.userList.conItems[i].txt.text = _parent.userList.conItems[i].txt.text + "- offline - ";
} else if (_parent.userList.conItems[i].busy == 1) {
_parent.userList.conItems[i].txt.text = _parent.userList.conItems[i].txt.text + "- available - ";
} else {
_parent.userList.conItems[i].txt.text = _parent.userList.conItems[i].txt.text + ("- busy - connected with: " + _parent.userList.conItems[i].conwith);
}
_parent.userList.conItems[i].txt.text = _parent.userList.conItems[i].txt.text + (((" - Exp-Points:" + _parent.userList.conItems[i].exppoint) + " - Scenes:") + _parent.userList.conItems[i].scenes);
_parent.userList.conItems[i]._y = _parent.userList.slot0._height * (_parent.userList.userL + 1);
_parent.userList.conItems[i].clickBtn.onRelease = function () {
if (this._parent.busy == 1) {
i = 0;
while (i < (this._parent._parent.userL + 1)) {
if (this._parent._parent["slot" + i].clickBtn != this) {
this._parent._parent["slot" + i].clickBtn._alpha = 0;
} else {
this._alpha = 100;
_parent.idSel = String(this._parent.txt.text).substr(0, 10);
}
i++;
}
}
};
_parent.userList.conItems[i].clickBtn.onRollOver = function () {
this._parent.msg.onEnterFrame = function () {
this._alpha = Math.min(100, this._alpha + 13);
if (this._alpha == 100) {
this.onEnterFrame = null;
}
};
};
_parent.userList.conItems[i].clickBtn.onRollOut = function () {
this._parent.msg.onEnterFrame = function () {
this._alpha = Math.max(0, this._alpha - 13);
if (this._alpha == 0) {
this.onEnterFrame = null;
}
};
};
_temp1b = _temp1a - Number(tempArr2[5]);
_temp2b = Math.floor(_temp1b / 31536000);
_temp3b = Math.floor((_temp1b % 31536000) / 2628000.0288);
_temp4b = Math.floor(((_temp1b % 31536000) % 2628000.0288) / 86400);
_temp5b = Math.floor((((_temp1b % 31536000) % 2628000.0288) % 86400) / 3600);
_temp6b = Math.floor(((((_temp1b % 31536000) % 2628000.0288) % 86400) % 3600) / 60);
_temp7b = Math.floor(((((_temp1b % 31536000) % 2628000.0288) % 86400) % 3600) % 60);
if (_temp1b < 0) {
_parent.userList.conItems[i].lastOn.text = "new";
} else if (_temp2b == 0) {
if (_temp3b == 0) {
if (_temp4b == 0) {
if (_temp5b == 0) {
if (_temp6b == 0) {
_parent.userList.conItems[i].lastOn.text = _temp7b + "sec";
} else {
_parent.userList.conItems[i].lastOn.text = ((_temp6b + "min ") + _temp7b) + "sec";
}
} else {
_parent.userList.conItems[i].lastOn.text = ((_temp5b + "hours ") + _temp6b) + "min";
}
} else {
_parent.userList.conItems[i].lastOn.text = ((_temp4b + "days ") + _temp5b) + "hours";
}
} else {
_parent.userList.conItems[i].lastOn.text = ((_temp3b + "month ") + _temp4b) + "days";
}
} else {
_parent.userList.conItems[i].lastOn.text = ((_temp2b + "years ") + _temp3b) + "month";
}
_parent.userList.conItems[i].msg.leftmsg.multiline = true;
_parent.userList.conItems[i].msg.leftmsg.autoSize = "left";
_parent.userList.conItems[i].msg.leftmsg.text = tempArr2[6];
_parent.userList.conItems[i].msg.bg._height = _parent.userList.conItems[i].msg.leftmsg._height + 8;
_parent.userList.conItems[i].msg._y = 25 - _parent.userList.conItems[i].msg.bg._height;
_parent.userList.conItems[i].msg._alpha = 0;
_parent.userList.userL = _parent.userList.userL + 1;
i++;
}
_temp1a = null;
_temp1b = null;
_temp2b = null;
_temp3b = null;
_temp4b = null;
_temp5b = null;
_temp6b = null;
_temp7b = null;
_parent.playBtn._visible = true;
gotoAndStop (3);
_parent.sendCool = 0;
onEnterFrame = null;
_parent.cancelBtn.targt = null;
_parent.conico.coninfo.text = "users loaded";
} else {
_parent.conico.coninfo.text = "loading users failed";
state = "failed";
}
_parent.sending = false;
};
_parent.conico.coninfo.text = "loading up to ten users";
this.v.sendAndLoad(String(_parent.servStr + "getids.php"), v, "POST");
}
} else {
_parent.sendCool = _parent.sendCool - 1;
}
}
}
};
_parent.cancelBtn._visible = true;
_parent.cancelBtn.targt = this;
}
}
}
Instance of Symbol 206 MovieClip "playBtn" in Frame 6
onClipEvent (load) {
this.state = "";
this.sendOK = false;
this.sendSynch = false;
this._visible = false;
stop();
}
on (release) {
if (!_parent.stopCon) {
if (!_parent.sending) {
_parent.lmsg = _parent.leftmsg.text;
_parent.userList._visible = false;
_parent.conBtn._visible = false;
if (_parent.timeGot.length < 7) {
if (_parent.idStatus == 0) {
state = "reqOK";
}
}
this.onEnterFrame = function () {
if (!_parent.stopCon) {
if (!_parent.sending) {
if (_parent.sendCool <= 0) {
if (state == "reqOK") {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\nrequesting ok";
}
state = "";
_parent.sending = true;
this.v = new LoadVars();
this.v.myid = String(_parent.conID);
this.v.mypass = String(_parent.conPASS);
if (_parent.idSel != "") {
this.v.yourid = String(_parent.idSel);
this.v.doit = 1;
} else {
this.v.yourid = "-";
this.v.doit = 2;
}
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
_parent.sending = false;
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
if (geladen) {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + ("\n req ok: " + this.ext);
}
if (this.ext == "connected") {
if (String(_parent.idSel) == "") {
_parent.idSel = String(this.conto);
}
_parent.conico.coninfo.text = "server url not ok";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
_parent.sndMenu.gotoAndPlay("menuPing" + Math.floor(Math.random() * 2));
state = "setStateBusy";
} else if (this.ext == "clear") {
_parent.conico.coninfo.text = "no opponent";
state = "reqOK";
} else {
_parent.conico.coninfo.text = "lobby not reached";
state = "reqRem";
}
}
};
_parent.cancelBtn._visible = true;
_parent.cancelBtn.targt = this;
gotoAndStop (2);
_parent.conico.coninfo.text = "lobby request";
this.v.sendAndLoad(String(_parent.servStr + "reqok.php"), v, "POST");
} else if (state == "reqRem") {
_parent.sending = true;
this.v = new LoadVars();
this.v.myid = String(_parent.conID);
this.v.yourid = String(_parent.idSel);
this.v.doit = 0;
this.v.mypass = String(_parent.conPASS);
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
_parent.sending = false;
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
if (geladen) {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + ("\n req remove: " + this.ext);
}
if (this.ext == "ok") {
_parent.conico.coninfo.text = "req remove ok";
state = "failed";
} else {
_parent.conico.coninfo.text = "req remove failed";
}
}
};
_parent.conico.coninfo.text = "removing request";
this.v.sendAndLoad(String(_parent.servStr + "reqok.php"), v, "POST");
} else if (state == "setStateBusy") {
idStatus = 1;
this.state = "";
_parent.sending = true;
_parent.sendCool = _parent._fps * _parent.conspeed;
this.v = new LoadVars();
this.v.myid = String(_parent.conID);
this.v.mypass = String(_parent.conPASS);
this.v.conwith = String(_parent.idSel);
this.v.doit = 2;
this.v.leftmsg = escape(_parent.lmsg);
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
if (geladen) {
_parent.conico.coninfo.text = "set busy ok";
state = "loadTime";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
} else {
_parent.conico.coninfo.text = "set busy failed";
state = "failed";
}
_parent.sending = false;
};
_parent.conico.coninfo.text = "set busy";
this.v.sendAndLoad(String(_parent.servStr + "setid.php"), v, "POST");
} else if (state == "loadTime") {
gotOk = false;
_parent.p2start = false;
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\n load time";
}
this.sendSynch = false;
this.sendOK = false;
_parent.sending = true;
this.v = new LoadVars();
this.v.myid = String(_parent.conID);
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\n time loaded";
}
if (geladen) {
_parent.timeGot = new Array();
_parent.ranTemp = Number(this.ranNum);
_parent.timeGot[0] = Number(this.ext);
_parent.timeGot[1] = getTimer();
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
state = "syncTime";
_parent.conico.coninfo.text = "time received";
} else {
_parent.conico.coninfo.text = "time not received";
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
}
_parent.sending = false;
};
_parent.conico.coninfo.text = "synch time";
this.v.sendAndLoad(String(_parent.servStr + "timing.php"), v, "POST");
} else if (state == "syncTime") {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\n synch time";
}
state = "";
_parent.sending = true;
this.v = new LoadVars();
this.v.myid = String(_parent.conID);
this.v.mypass = String(_parent.conPASS);
this.v.yourid = String(_parent.idSel);
if (!sendSynch) {
this.v.motin = (((((_parent.timeGot[1] + "_Timesynchring_") + _parent.timeGot[0]) + "_") + _parent.ranTemp) + "_") + _parent.avatNum;
}
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + ((("\n time sent/received:" + String(this.ext)) + " motion received:") + this.motout);
}
if (geladen) {
sendSynch = true;
if (String(this.ext) == "true") {
tempArr3 = new Array();
disc = false;
tempArr = this.motout.split("|");
templen = tempArr.length;
i = 0;
while (i < templen) {
tempArr2 = tempArr[i].split("_");
if (tempArr2[1] == "oki") {
gotOk = true;
} else if (tempArr2[1] == "Timesynchring") {
templen2 = tempArr2.length;
j = 0;
while (j < templen2) {
tempArr3[j] = tempArr2[j];
j++;
}
} else if (tempArr2[1] == "disconnected") {
disc = true;
} else if (tempArr2[1] == "startg") {
if (gotOK) {
_parent.p2start = true;
}
}
i++;
}
if (tempArr3.length > 0) {
_parent.allyAvat = String(tempArr3[4]);
_parent.ranNum = (_parent.ranTemp + Number(tempArr3[3])) * 0.5;
_parent.fullDiff = 0;
_parent.timeGot[0] = _parent.timeGot[0] - Number(tempArr3[2]);
_parent.timeGot[1] = _parent.timeGot[1] - Number(tempArr3[0]);
_parent.fullDiff = (_parent.timeGot[0] * 0.001) + _parent.timeGot[1];
_parent.conico.coninfo.text = "synching ok";
state = "waitForAlly";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
} else if (disc) {
_parent.conico.coninfo.text = "opponent disconnected";
state = "syncTime";
_parent.conico.gotoAndPlay("redblink");
_parent.sendCool = Math.ceil(Math.max(200, _parent._fps * _parent.conspeed));
} else {
state = "syncTime";
_parent.conico.coninfo.text = "no right answer yet";
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
}
} else {
state = "syncTime";
_parent.conico.coninfo.text = "no answer yet";
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
}
} else {
state = "syncTime";
_parent.conico.coninfo.text = "sending failed";
_parent.sendCool = Math.ceil(_parent._fps * _parent.conspeed);
}
_parent.sending = false;
};
_parent.cancelBtn._visible = true;
_parent.cancelBtn.targt = this;
gotoAndStop (2);
_parent.conico.coninfo.text = "sending synch time";
this.v.sendAndLoad(String(_parent.servStr + "motion.php"), v, "POST");
} else if (state == "waitForAlly") {
state = "";
_parent.sending = true;
this.v = new LoadVars();
this.v.myid = String(_parent.conID);
this.v.mypass = String(_parent.conPASS);
this.v.yourid = String(_parent.idSel);
if (!this.sendOK) {
this.sendOK = true;
this.v.motin = (getTimer() + "_oki_") + 0;
}
this.v.onLoad = function (geladen) {
_parent.conico.gotoAndPlay(1);
_parent.sending = false;
if (geladen) {
if ((String(this.ext) == "true") || gotOk) {
tempArr3 = new Array();
disc = false;
tempArr = this.motout.split("|");
templen = tempArr.length;
i = 0;
while (i < templen) {
tempArr2 = tempArr[i].split("_");
if (tempArr2[1] == "oki") {
gotOk = true;
} else if (tempArr2[1] == "disconnected") {
disc = true;
} else if (tempArr2[1] == "startg") {
if (gotOK) {
_parent.p2start = true;
}
}
i++;
}
if (gotOk) {
state = "";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
_parent.debugtxt.text = "";
_parent.playok = true;
_parent.gotoAndStop("inter");
} else if (disc) {
_parent.conico.coninfo.text = "opponent disconnected";
state = "waitForAlly";
_parent.conico.gotoAndPlay("redblink");
_parent.sendCool = Math.ceil(Math.max(200, _parent._fps * _parent.conspeed));
} else {
state = "waitForAlly";
_parent.conico.coninfo.text = "waiting for opponent ok";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
}
} else {
state = "waitForAlly";
_parent.conico.coninfo.text = "waiting for opponent ok";
_parent.sendCool = Math.ceil(_parent._fps * _parent.cong);
}
} else {
state = "failed";
}
};
_parent.cancelBtn._visible = true;
_parent.cancelBtn.targt = this;
gotoAndStop (2);
_parent.conico.coninfo.text = "requesting opponents synch ok";
this.v.sendAndLoad(String(_parent.servStr + "motion.php"), v, "POST");
} else if (state == "failed") {
if (_parent.idStatus == 0) {
if (_parent.debugMe == "true") {
_parent.debugtxt.text = _parent.debugtxt.text + "\nplay btn failed";
}
_parent.userList._visible = true;
_parent.cancelBtn.targt = null;
} else {
_parent.stopCon = true;
}
_parent.cancelBtn._visible = false;
gotoAndStop (1);
this.onEnterFrame = null;
}
} else {
_parent.sendCool = _parent.sendCool - 1;
}
}
}
};
}
}
}
Instance of Symbol 210 MovieClip "cancelBtn" in Frame 6
onClipEvent (load) {
_visible = false;
targt = undefined;
}
on (release) {
if (!_parent.stopCont) {
_parent.lmsg = _parent.leftmsg.text;
if (this.targt != undefined) {
this.targt.v.onLoad = null;
this.targt.v = null;
this.targt.gotoAndStop(1);
this.visible = false;
_parent.sending = false;
this.targt.onEnterFrame = null;
this.targt.state = "";
_parent.wfok._visible = false;
}
_parent.stopCon = true;
}
}
onClipEvent (enterFrame) {
if (_parent.stopCon) {
if (!_parent.sending) {
if (_parent.sendCool <= 0) {
this.v = new LoadVars();
_parent.sending = true;
_parent.sendCool = _parent._fps * _parent.conspeed;
this.v.myid = String(_parent.conID);
this.v.mypass = String(_parent.conPASS);
this.v.conwith = String(_parent.idSel);
this.v.doit = 3;
this.v.leftmsg = escape(_parent.lmsg);
this.v.onLoad = function (geladen) {
_parent.onEnterFrame = null;
_parent.gotoAndPlay(1);
};
this.v.sendAndLoad(String(_parent.servStr + "setid.php"), v, "POST");
} else {
_parent.sendCool = _parent.sendCool - 1;
}
}
}
}
Instance of Symbol 215 MovieClip in Frame 6
onClipEvent (load) {
_parent.mtrack[0].stop();
_parent.mtrack[1].stop();
_parent.mtrack[2].stop();
if (_global.muPlay) {
_parent.mtrack[0].start(0, 30);
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
if (_global.muPlay) {
_parent.mtrack[0].stop();
_parent.mtrack[1].stop();
_parent.mtrack[2].stop();
_global.muPlay = false;
gotoAndStop (2);
} else {
_parent.mtrack[0].start(0, 30);
_global.muPlay = true;
gotoAndStop (1);
}
}
Frame 7
stop();
Frame 12
gotoAndStop ("menu");
Frame 13
gotoAndStop (16);
Instance of Symbol 245 MovieClip "qbttn" in Frame 13
on (release) {
if (_parent.selftest) {
_parent.destroyGame();
} else {
_parent.stopCon = true;
this.onEnterFrame = function () {
if (_parent.stopCon) {
if (!_parent.sending) {
if (_parent.sendCool <= 0) {
this.v = new LoadVars();
_parent.sending = true;
_parent.sendCool = _parent._fps * _parent.conspeed;
this.v.myid = String(_parent.conID);
this.v.mypass = _parent.conPASS;
this.v.conwith = String(_parent.idSel);
this.v.doit = 3;
this.v.leftmsg = escape(_parent.lmsg);
this.v.onLoad = function (geladen) {
if (geladen) {
_parent.onEnterFrame = null;
_parent.gotoAndPlay(1);
} else {
_parent.sending = false;
}
};
this.v.sendAndLoad(String(_parent.servStr + "setid.php"), v, "POST");
} else {
_parent.sendCool = _parent.sendCool - 1;
}
}
}
};
}
}
Instance of Symbol 273 MovieClip "gg" in Frame 13
onClipEvent (load) {
txt._visible = false;
gotoAndStop (1);
}
Instance of Symbol 275 MovieClip in Frame 13
onClipEvent (load) {
state = 0;
}
on (release) {
if (state == 0) {
_parent.ppic0._x = 204;
_parent.ppic0._y = 105;
_parent.ppic0._xscale = (_parent.ppic0._yscale = 152.1);
_parent.ppmask0._x = 204;
_parent.ppmask0._y = 105;
_parent.ppmask0._width = 146;
_parent.ppmask0._height = 121.7;
_parent.ppic1._x = 240;
_parent.ppic1._y = 31;
_parent.ppic1._xscale = (_parent.ppic1._yscale = 78.6);
_parent.ppmask1._x = 240;
_parent.ppmask1._y = 31;
_parent.ppmask1._width = 75;
_parent.ppmask1._height = 63;
state = state + 1;
} else if (state == 1) {
_parent.ppic0._x = 240;
_parent.ppic0._y = 31;
_parent.ppic0._xscale = (_parent.ppic0._yscale = 78.6);
_parent.ppmask0._x = 240;
_parent.ppmask0._y = 31;
_parent.ppmask0._width = 75;
_parent.ppmask0._height = 63;
_parent.ppic1._x = 204;
_parent.ppic1._y = 105;
_parent.ppic1._xscale = (_parent.ppic1._yscale = 152.1);
_parent.ppmask1._x = 204;
_parent.ppmask1._y = 105;
_parent.ppmask1._width = 146;
_parent.ppmask1._height = 121.7;
state = state + 1;
} else if (state == 2) {
_parent.ppic0._x = 46;
_parent.ppic0._y = 95;
_parent.ppic0._xscale = (_parent.ppic0._yscale = 152.1);
_parent.ppmask0._x = 46;
_parent.ppmask0._y = 95;
_parent.ppmask0._width = 146;
_parent.ppmask0._height = 121.7;
_parent.ppic1._x = 371;
_parent.ppic1._y = 95;
_parent.ppic1._xscale = (_parent.ppic1._yscale = 152.1);
_parent.ppmask1._x = 371;
_parent.ppmask1._y = 95;
_parent.ppmask1._width = 146;
_parent.ppmask1._height = 121.7;
state = state + 1;
} else if (state == 3) {
_parent.ppic0.stop();
_parent.ppic1.stop();
_parent.ppic0._visible = false;
_parent.ppmask0._visible = false;
_parent.ppic1._visible = false;
_parent.ppmask1._visible = false;
state = state + 1;
} else {
_parent.ppic0.play();
_parent.ppic1.play();
_parent.ppic0._visible = true;
_parent.ppmask0._visible = true;
_parent.ppic1._visible = true;
_parent.ppmask1._visible = true;
_parent.ppic0._x = 224.1;
_parent.ppic0._y = 36;
_parent.ppic0._xscale = (_parent.ppic0._yscale = 69.8);
_parent.ppmask0._x = 237;
_parent.ppmask0._y = 36;
_parent.ppmask0._width = 41;
_parent.ppmask0._height = 56.3;
_parent.ppic1._x = 267.1;
_parent.ppic1._y = 36;
_parent.ppic1._xscale = (_parent.ppic1._yscale = 69.8);
_parent.ppmask1._x = 280;
_parent.ppmask1._y = 36;
_parent.ppmask1._width = 41;
_parent.ppmask1._height = 56.3;
state = 0;
}
}
Instance of Symbol 215 MovieClip in Frame 13
onClipEvent (load) {
_parent.mtrack[0].stop();
_parent.mtrack[1].stop();
_parent.mtrack[2].stop();
if (_global.muPlay) {
if (Math.random() > 0.5) {
_parent.mtrack[1].start(0, 5);
} else {
_parent.mtrack[2].start(0, 5);
}
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
if (_global.muPlay) {
_parent.mtrack[0].stop();
_parent.mtrack[1].stop();
_parent.mtrack[2].stop();
_global.muPlay = false;
gotoAndStop (2);
} else {
if (Math.random() > 0.5) {
_parent.mtrack[1].start(0, 5);
} else {
_parent.mtrack[2].start(0, 5);
}
_global.muPlay = true;
gotoAndStop (1);
}
}
Frame 14
function txtInOff() {
txtEnter = false;
Key.removeListener(keyObj);
}
function addTxt(txxt, suser, txtcolor) {
tempLen = txtBoxes.length;
txtBoxes[tempLen] = txtLayer.attachMovie("incomTxt", "txt" + txtLayer.boxNum, txtLayer.boxNum);
txtBoxes[tempLen].inbox.multiline = true;
txtBoxes[tempLen].inbox.autoSize = "left";
txtBoxes[tempLen].inbox.textColor = txtcolor;
txtBoxes[tempLen].inbox.text = (suser + ": ") + txxt;
txtBoxes[tempLen].age = 0;
txtBoxes[tempLen]._alpha = 0;
txtBoxes[tempLen].maxY = 999;
txtBoxes[tempLen]._y = (-Math.ceil(txtBoxes[tempLen]._height / 3)) * 3;
txtLayer.boxNum = txtLayer.boxNum + 1;
if (txtLayer.boxNum > 253) {
txtLayer.boxNum = 1;
}
if (txtLayer.onEnterFrame == null) {
txtLayer.onEnterFrame = function () {
tempLen = txtBoxes.length;
i = 0;
while (i < tempLen) {
if (i == (maxmsg - 1)) {
doquit = true;
} else {
doquit = false;
}
if (tempLen > maxmsg) {
if (i < (tempLen - maxmsg)) {
txtBoxes[i].age = Math.max(299, txtBoxes[i].age);
}
}
if (i == 0) {
if (tempLen == 1) {
txtBoxes[i].maxY = 0;
} else if (tempLen == 2) {
txtBoxes[i].maxY = txtBoxes[1]._height;
} else if (tempLen >= 3) {
txtBoxes[i].maxY = txtBoxes[1]._height + txtBoxes[2]._height;
}
if (txtBoxes[i]._y < txtBoxes[i].maxY) {
txtBoxes[i].moved = true;
txtBoxes[i]._y = txtBoxes[i]._y + 3;
}
} else {
do {
if ((txtBoxes[i]._y + txtBoxes[i]._height) < txtBoxes[i - 1]._y) {
txtBoxes[i].moved = true;
txtBoxes[i]._y = txtBoxes[i]._y + 3;
}
}
}
if (txtBoxes[i].moved == true) {
if (txtBoxes[i].age < 300) {
txtBoxes[i]._alpha = Math.min(100, txtBoxes[i]._alpha + 4);
if (txtBoxes[i]._y >= 0) {
txtBoxes[i].age = txtBoxes[i].age + 1;
}
} else {
if (txtBoxes[i]._y >= txtBoxes[i].maxY) {
txtBoxes[i].fade = true;
}
if (txtBoxes[i].fade == true) {
txtBoxes[i]._alpha = Math.max(0, txtBoxes[i]._alpha - 4);
if (txtBoxes[i]._alpha == 0) {
removeMovieClip(txtBoxes[i]);
txtBoxes.splice(i, 1);
i = i - 1;
tempLen = tempLen - 1;
}
}
}
}
if (doquit == true) {
i = tempLen;
}
i++;
}
if (tempLen == 0) {
this.onEnterFrame = null;
}
};
}
}
function sendStr(txtstr) {
if (user2) {
if (actnOut.length > 0) {
actnOut = actnOut + "|";
}
actnOut = actnOut + ((Math.round(getTimer() * 0.1) + "_") + txtstr);
}
}
function sendGet() {
state = "";
v = new LoadVars();
v.myid = String(conID);
v.mypass = String(conPASS);
v.yourid = String(idSel);
if (actnOut.length > 0) {
v.motin = ((actnOut + "#") + packNum) + "#";
if (selftest) {
v.motout = ((("x|n|" + actnOut) + "#") + packNum) + "#";
v.ext = true;
}
packNum = packNum + 1;
actnOut = "";
}
if (!selftest) {
v.onLoad = parseD;
sending = true;
v.sendAndLoad(String(servStr + "motion.php"), v, "POST");
} else {
sending = true;
parseD(true);
}
}
function parseD(geladen) {
if (geladen) {
if (selftest) {
_me = v;
// unexpected jump
}
_me = this;
if (String(_me.ext) == "true") {
if ((String(_me.motout).length > 4) && (String(_me.motout) != "undefined")) {
orddepot = orddepot + String(_me.motout).substr(3);
tempStr = "";
tempArr1 = orddepot.split("#");
tempLen = tempArr1.length - 1;
do {
rowNum = false;
i = 1;
while (i < tempLen) {
if (String(tempArr1[i]) == "X") {
tempStr = tempStr + tempArr1[i - 1];
tempArr1.splice(i, 1);
tempArr1.splice(i - 1, 1);
i = i - 2;
tempLen = tempLen - 2;
} else if (Number(tempArr1[i]) == orderNum) {
orderNum = orderNum + 1;
tempStr = tempStr + tempArr1[i - 1];
tempArr1.splice(i, 1);
tempArr1.splice(i - 1, 1);
i = i - 2;
tempLen = tempLen - 2;
ordrTime = 0;
orderRun = false;
rowNum = true;
} else if (Number(tempArr1[i]) < orderNum) {
tempArr1.splice(i, 1);
tempArr1.splice(i - 1, 1);
i = i - 2;
tempLen = tempLen - 2;
rowNum = true;
}
i = i + 2;
}
} while (rowNum);
orddepot = "";
if (tempLen > 0) {
i = 0;
if (i < tempLen) {
orddepot = orddepot + (tempArr1[i] + "#");
i++;
// unexpected jump
}
orderRun = true;
}
tempArr = tempStr.split("|");
tempLen = tempArr.length;
i = 1;
if (i < tempLen) {
tempArr2 = tempArr[i].split("_");
if (tempArr2[1] == "message") {
addTxt(tempArr2[2], tempArr2[3], 16742365);
// unexpected jump
}
if (tempArr2[1] == "disconnected") {
if (sendRun) {
addTxt(" has disconnected", tempArr2[2], 16729255);
sendRun = false;
if (gOreason == "") {
gOreason = "disconnected";
i = 0;
if (i < userLen) {
if (userSel[i].gStatus != 10) {
userSel[i].gStatus = 10;
}
i++;
// unexpected jump
}
}
}
// unexpected jump
}
if (tempArr2[1] == "startg") {
p2start = true;
if (p1start) {
startPan._visible = false;
gstart = true;
}
// unexpected jump
}
if (tempArr2[1] == "gover") {
if (tempArr2[2] == "melost") {
if (gOreason == "You lost!") {
gOreason = "Draw!";
ppic0.mood = 0;
ppic0.laugh = false;
ppic0.shake = false;
ppic1.mood = 0;
ppic1.laugh = false;
ppic1.shake = false;
// unexpected jump
}
if (gOreason.length == 0) {
gOreason = "You won!";
ppic0.mood = 1;
ppic0.laugh = true;
ppic0.shake = false;
ppic1.mood = 3;
ppic1.laugh = false;
ppic1.shake = false;
}
userSel[0].gStatus = 10;
gg.txt._visible = true;
gg.txt._visible = true;
qbttn._visible = false;
gg.txt.text = gOreason;
if (gg._currentframe == 1) {
gg.gotoAndPlay(2);
}
gOver = true;
}
// unexpected jump
}
if (tempArr2[1] == "mass") {
userSel[0].eggLoad = userSel[0].eggLoad + Number(tempArr2[2]);
updWIco();
// unexpected jump
}
var _local2 = new Object();
_local2.timeAt = (Number(tempArr2[0]) * 10) + fullDiff;
_local2.actType = tempArr2[1];
_local2.active = false;
if (tempArr2[2] != undefined) {
_local2.action1 = tempArr2[2];
}
alyIn.push(_local2);
i++;
// unexpected jump
}
}
}
}
sending = false;
sendCool = Math.ceil(_fps * cong);
}
function chckType(_eggNum, _chain, _targetE, _grid, _webStr, _useri, _collct, _final) {
if (_targetE != null) {
_tx = _targetE.x;
_ty = _targetE.y;
_top = false;
_right = false;
_bottom = false;
_left = false;
if (_grid[_tx - 1][_ty].mc.num == _eggNum) {
_left = true;
}
if (_grid[_tx][_ty - 1].mc.num == _eggNum) {
_top = true;
}
if (_grid[_tx + 1][_ty].mc.num == _eggNum) {
_right = true;
}
if (_grid[_tx][_ty + 1].mc.num == _eggNum) {
_bottom = true;
}
}
if (_eggNum == 6) {
if (((!_top) && (!_bottom)) && (!_right)) {
_tx = _tx + 1;
if (_tx < 9) {
if (_grid[_tx][_ty].mc != null) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_ty < 18) {
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
// unexpected jump
}
_tx = 9;
_tx++;
// unexpected jump
}
}
if (((!_left) && (!_bottom)) && (!_right)) {
_ty = _ty + 1;
if (_ty < 19) {
if (_grid[_tx][_ty].mc != null) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_tx < 8) {
if (_grid[_tx + 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + 1][_ty].mc.chainC = true;
if (_grid[_tx + 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx + 1][_ty].mc);
_grid[_tx + 1][_ty].mc.activeD = true;
_grid[_tx + 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + 1, _ty);
}
}
}
if (_tx > 0) {
if (_grid[_tx - 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx - 1][_ty].mc.chainC = true;
if (_grid[_tx - 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx - 1][_ty].mc);
_grid[_tx - 1][_ty].mc.activeD = true;
_grid[_tx - 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx - 1, _ty);
}
}
}
}
}
// unexpected jump
}
_ty = 19;
_ty++;
// unexpected jump
}
}
if (((!_top) && (!_bottom)) && (!_left)) {
_tx = _tx - 1;
if (_tx >= 0) {
if (_grid[_tx][_ty].mc != null) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_ty < 18) {
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
// unexpected jump
}
_tx = -1;
_tx--;
// unexpected jump
}
}
if (((!_top) && (!_left)) && (!_right)) {
_ty = _ty - 1;
if (_ty >= 0) {
if (_grid[_tx][_ty].mc != null) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_tx < 8) {
if (_grid[_tx + 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + 1][_ty].mc.chainC = true;
if (_grid[_tx + 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx + 1][_ty].mc);
_grid[_tx + 1][_ty].mc.activeD = true;
_grid[_tx + 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + 1, _ty);
}
}
}
if (_tx > 0) {
if (_grid[_tx - 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx - 1][_ty].mc.chainC = true;
if (_grid[_tx - 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx - 1][_ty].mc);
_grid[_tx - 1][_ty].mc.activeD = true;
_grid[_tx - 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx - 1, _ty);
}
}
}
}
}
// unexpected jump
}
_ty = -1;
_ty--;
// unexpected jump
}
}
// unexpected jump
}
if (_eggNum == 8) {
if (_top && (_bottom)) {
_tx = _tx - 1;
if (_tx >= 0) {
if (_grid[_tx][_ty].mc != null) {
if (!_left) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_ty < 18) {
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
}
}
}
_tx = _tx + 2;
if (_tx < 9) {
if (_grid[_tx][_ty].mc != null) {
if (!_right) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_ty < 18) {
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
}
}
}
}
if (_left && (_right)) {
_ty = _ty + 1;
if (_ty < 19) {
if (_grid[_tx][_ty].mc != null) {
if (!_bottom) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_ty < 18) {
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
}
}
}
_ty = _ty - 2;
if (_ty > 0) {
if (_grid[_tx][_ty].mc != null) {
if (!_top) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
}
}
}
}
}
// unexpected jump
}
if (_eggNum == 7) {
_colorA = null;
if (((!_top) && (!_bottom)) && (!_right)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 90);
if (_tx < 8) {
if (_grid[_tx + 1][_ty].mc != null) {
_colorA = _grid[_tx + 1][_ty].mc.num;
}
}
}
if (((!_left) && (!_bottom)) && (!_right)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 180);
if (_ty < 18) {
if (_grid[_tx][_ty + 1].mc != null) {
_colorA = _grid[_tx][_ty + 1].mc.num;
}
}
}
if (((!_top) && (!_bottom)) && (!_left)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 270);
if (_tx > 0) {
if (_grid[_tx - 1][_ty].mc != null) {
_colorA = _grid[_tx - 1][_ty].mc.num;
}
}
}
if (((!_top) && (!_left)) && (!_right)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 0);
if (_ty > 0) {
if (_grid[_tx][_ty - 1].mc != null) {
_colorA = _grid[_tx][_ty - 1].mc.num;
}
}
}
if (_colorA != null) {
_txTo = _tx + 2;
_tyTo = _ty + 2;
_tx = _txTo - 4;
if (_tx < _txTo) {
_ty = _tyTo - 4;
if (_ty < _tyTo) {
if (((((_tx < 9) && (_tx >= 0)) && (_ty < 19)) && (_ty >= 0)) && (!((Math.abs(_tx) == 2) && (Math.abs(_ty) == 2)))) {
if (_grid[_tx][_ty].mc != null) {
if (_grid[_tx][_ty].mc.num == _colorA) {
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
addfx("spark", _targetE.mc, _grid[_tx][_ty].mc);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_ty < 18) {
if (_ty == _tyTo) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
if ((_tx == (_txTo - 3)) && (_tx > 0)) {
if (_grid[_tx - 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx - 1][_ty].mc.chainC = true;
if (_grid[_tx - 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx - 1][_ty].mc);
_grid[_tx - 1][_ty].mc.activeD = true;
_grid[_tx - 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx - 1, _ty);
}
}
}
if ((_tx == (_txTo - 1)) && (_tx < 8)) {
if (_grid[_tx + 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + 1][_ty].mc.chainC = true;
if (_grid[_tx + 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx + 1][_ty].mc);
_grid[_tx + 1][_ty].mc.activeD = true;
_grid[_tx + 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + 1, _ty);
}
}
}
}
// unexpected jump
}
if (_ty == (_tyTo - 4)) {
if ((_tx == (_txTo - 3)) && (_tx > 0)) {
if (_grid[_tx - 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx - 1][_ty].mc.chainC = true;
if (_grid[_tx - 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx - 1][_ty].mc);
_grid[_tx - 1][_ty].mc.activeD = true;
_grid[_tx - 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx - 1, _ty);
}
}
}
if ((_tx == (_txTo - 1)) && (_tx < 8)) {
if (_grid[_tx + 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + 1][_ty].mc.chainC = true;
if (_grid[_tx + 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx + 1][_ty].mc);
_grid[_tx + 1][_ty].mc.activeD = true;
_grid[_tx + 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + 1, _ty);
}
}
}
// unexpected jump
}
xShift = 0;
if (_tx == _txTo) {
if (_tx < 8) {
xShift = 1;
}
// unexpected jump
}
if (_tx == (_txTo - 4)) {
if (_tx > 0) {
xShift = -1;
}
}
if (xShift != 0) {
if (_grid[_tx + xShift][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + xShift][_ty].mc.chainC = true;
if (_grid[_tx + xShift][_ty].mc.activeD != true) {
hideLink(_grid[_tx + xShift][_ty].mc);
_grid[_tx + xShift][_ty].mc.activeD = true;
_grid[_tx + xShift][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + xShift, _ty);
}
}
if ((_ty == (_tyTo - 1)) && (_ty < 18)) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
}
}
}
}
_ty++;
// unexpected jump
}
_tx++;
// unexpected jump
}
}
// unexpected jump
}
if (_eggNum == 9) {
if (!_final) {
_colorA = null;
add_ = false;
if (((!_top) && (!_bottom)) && (!_right)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 90);
if (_tx < 8) {
if (_grid[_tx + 1][_ty].mc != null) {
_colorA = _grid[_tx + 1][_ty].mc.num;
add_ = true;
}
}
}
if (((!_left) && (!_bottom)) && (!_right)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 180);
if (_ty < 18) {
if (_grid[_tx][_ty + 1].mc != null) {
_colorA = _grid[_tx][_ty + 1].mc.num;
add_ = true;
}
}
}
if (((!_top) && (!_bottom)) && (!_left)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 270);
if (_tx > 0) {
if (_grid[_tx - 1][_ty].mc != null) {
_colorA = _grid[_tx - 1][_ty].mc.num;
add_ = true;
}
}
}
if (((!_top) && (!_left)) && (!_right)) {
addfx("splash1", _grid[_tx][_ty].mc, null, 0);
if (_ty > 0) {
if (_grid[_tx][_ty - 1].mc != null) {
_colorA = _grid[_tx][_ty - 1].mc.num;
add_ = true;
}
}
}
if (add_) {
_tempObj = new Object();
_tempObj.x = _tx;
_tempObj.y = _ty;
_tempObj.col = _colorA;
_collct.push(_tempObj);
}
// unexpected jump
}
_tLen = _collct.length;
_end = 0;
if (_end < _tLen) {
_tx = _collct[_end].x;
_ty = _collct[_end].y;
_txTo = _tx + 2;
_tyTo = _ty + 2;
_tx = _txTo - 4;
if (_tx < _txTo) {
_ty = _tyTo - 4;
if (_ty < _tyTo) {
if (((((_tx < 9) && (_tx >= 0)) && (_ty < 19)) && (_ty >= 0)) && (!((Math.abs(_tx) == 2) && (Math.abs(_ty) == 2)))) {
if (_grid[_tx][_ty].mc != null) {
_cols = 0;
if (_cols < _tLen) {
if (_grid[_tx][_ty].mc.num == _collct[_cols].col) {
_cols = _tLen;
if (_grid[_tx][_ty].mc._currentframe < 10) {
_webStr = _webStr + (((_tx + "-") + _ty) + "-");
addfx("beans", _grid[_tx][_ty].mc, null, 3);
addfx("splash2", _grid[_tx][_ty].mc);
if (_grid[_tx][_ty].mc.links != undefined) {
l = _grid[_tx][_ty].mc.links.length - 1;
if (l >= 0) {
if (_grid[_tx][_ty].mc.links[l] != null) {
removeMovieClip(_grid[_tx][_ty].mc.links[l]);
}
l--;
// unexpected jump
}
_grid[_tx][_ty].mc.links = null;
}
_grid[_tx][_ty].mc.gotoAndStop(_grid[_tx][_ty].mc.num + 10);
_tObj = new Object();
_tObj.mc = _grid[_tx][_ty].mc;
_tObj.x = _tx;
_tObj.y = _ty;
_chain.push(_tObj);
if (_grid[_tx][_ty].mc.chainNum != undefined) {
if (_ty < 18) {
if (_ty == _tyTo) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
if ((_tx == (_txTo - 3)) && (_tx > 0)) {
if (_grid[_tx - 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx - 1][_ty].mc.chainC = true;
if (_grid[_tx - 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx - 1][_ty].mc);
_grid[_tx - 1][_ty].mc.activeD = true;
_grid[_tx - 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx - 1, _ty);
}
}
}
if ((_tx == (_txTo - 1)) && (_tx < 8)) {
if (_grid[_tx + 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + 1][_ty].mc.chainC = true;
if (_grid[_tx + 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx + 1][_ty].mc);
_grid[_tx + 1][_ty].mc.activeD = true;
_grid[_tx + 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + 1, _ty);
}
}
}
}
// unexpected jump
}
if (_ty == (_tyTo - 4)) {
if ((_tx == (_txTo - 3)) && (_tx > 0)) {
if (_grid[_tx - 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx - 1][_ty].mc.chainC = true;
if (_grid[_tx - 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx - 1][_ty].mc);
_grid[_tx - 1][_ty].mc.activeD = true;
_grid[_tx - 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx - 1, _ty);
}
}
}
if ((_tx == (_txTo - 1)) && (_tx < 8)) {
if (_grid[_tx + 1][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + 1][_ty].mc.chainC = true;
if (_grid[_tx + 1][_ty].mc.activeD != true) {
hideLink(_grid[_tx + 1][_ty].mc);
_grid[_tx + 1][_ty].mc.activeD = true;
_grid[_tx + 1][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + 1, _ty);
}
}
}
// unexpected jump
}
xShift = 0;
if (_tx == _txTo) {
if (_tx < 8) {
xShift = 1;
}
// unexpected jump
}
if (_tx == (_txTo - 4)) {
if (_tx > 0) {
xShift = -1;
}
}
if (xShift != 0) {
if (_grid[_tx + xShift][_ty].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx + xShift][_ty].mc.chainC = true;
if (_grid[_tx + xShift][_ty].mc.activeD != true) {
hideLink(_grid[_tx + xShift][_ty].mc);
_grid[_tx + xShift][_ty].mc.activeD = true;
_grid[_tx + xShift][_ty].mc.sy = _ty;
_useri.newEggs.push(_tx + xShift, _ty);
}
}
if ((_ty == (_tyTo - 1)) && (_ty < 18)) {
if (_grid[_tx][_ty + 1].mc.chainNum == _grid[_tx][_ty].mc.chainNum) {
_grid[_tx][_ty + 1].mc.chainC = true;
if (_grid[_tx][_ty + 1].mc.activeD != true) {
hideLink(_grid[_tx][_ty + 1].mc);
_grid[_tx][_ty + 1].mc.activeD = true;
_grid[_tx][_ty + 1].mc.sy = _ty + 1;
_useri.newEggs.push(_tx, _ty + 1);
}
}
}
}
}
}
}
_cols++;
// unexpected jump
}
}
}
_ty++;
// unexpected jump
}
_tx++;
// unexpected jump
}
_end++;
// unexpected jump
}
}
return(_webStr);
}
function impactEg(iNum) {
userSel[iNum].eggFalln._visible = false;
userSel[iNum]._toY = userSel[iNum]._toY - 1;
tX = userSel[iNum]._toX;
tY = userSel[iNum]._toY;
userSel[iNum].eggAmnt = userSel[iNum].eggAmnt + 1;
gridArr[iNum][tX][tY].mc = userSel[iNum].eggLayer.attachMovie("gloop", "gp" + userSel[iNum].nameCnt, 1 + userSel[iNum].nameCnt);
gridArr[iNum][tX][tY].mc._x = (tX * gridSize) + (gridSize * 0.5);
gridArr[iNum][tX][tY].mc._y = (tY * gridSize) + (gridSize * 0.5);
gridArr[iNum][tX][tY].mc.num = userSel[iNum].eggFalln.egg1.num;
gridArr[iNum][tX][tY].mc.gotoAndStop(userSel[iNum].eggFalln.egg1.num);
gridArr[iNum][tX][tY].mc.activeD = true;
gridArr[iNum][tX][tY].mc.sy = tY;
userSel[iNum].newEggs[0] = tX;
userSel[iNum].newEggs[1] = tY;
userSel[iNum].nameCnt = userSel[iNum].nameCnt + 1;
if ((tY < 0) && (iNum == 0)) {
userSel[iNum].gStatus = 10;
}
if (userSel[iNum]._angle == 0) {
tX = userSel[iNum]._toX;
tY = userSel[iNum]._toY + 1;
// unexpected jump
}
if (userSel[iNum]._angle == 180) {
tX = userSel[iNum]._toX;
tY = userSel[iNum]._toY - 1;
// unexpected jump
}
if (userSel[iNum]._angle == 90) {
tX = userSel[iNum]._toX - 1;
tY = userSel[iNum]._toY;
// unexpected jump
}
tX = userSel[iNum]._toX + 1;
tY = userSel[iNum]._toY;
userSel[iNum].eggAmnt = userSel[iNum].eggAmnt + 1;
gridArr[iNum][tX][tY].mc = userSel[iNum].eggLayer.attachMovie("gloop", "gp" + userSel[iNum].nameCnt, 1 + userSel[iNum].nameCnt);
gridArr[iNum][tX][tY].mc._x = (tX * gridSize) + (gridSize * 0.5);
gridArr[iNum][tX][tY].mc._y = (tY * gridSize) + (gridSize * 0.5);
gridArr[iNum][tX][tY].mc.num = userSel[iNum].eggFalln.egg2.num;
gridArr[iNum][tX][tY].mc.gotoAndStop(userSel[iNum].eggFalln.egg2.num);
gridArr[iNum][tX][tY].mc.activeD = true;
gridArr[iNum][tX][tY].mc.sy = tY;
userSel[iNum].newEggs[2] = tX;
userSel[iNum].newEggs[3] = tY;
userSel[iNum].nameCnt = userSel[iNum].nameCnt + 1;
if (userSel[iNum].nameCnt > 999995) {
userSel[iNum].nameCnt = 0;
}
playsnd("prod");
if ((tY < 0) && (iNum == 0)) {
userSel[iNum].gStatus = 10;
}
findMood();
}
function connctEg(xE, yE, iNum) {
userSel[iNum].newEggs = new Array();
}
function popEg(xE, yE, iNum) {
userSel[iNum].eggAmnt = userSel[iNum].eggAmnt - 1;
removeMovieClip(gridArr[iNum][xE][yE].mc);
gridArr[iNum][xE][yE].mc = null;
findMood();
}
function playsnd(sndname) {
sndMenu.gotoAndPlay(String(sndname + Math.floor(Math.random() * 4)));
}
function getWidth(scoreA, lockStr, maxWidth) {
if (lockStr == "A") {
tempWdth = (scoreA / 1300) * maxWidth;
// unexpected jump
}
if (lockStr == "B") {
tempWdth = ((scoreA - 1300) / 2700) * maxWidth;
// unexpected jump
}
if (lockStr == "C") {
tempWdth = ((scoreA - 4000) / 4700) * maxWidth;
// unexpected jump
}
if (lockStr == "D") {
tempWdth = ((scoreA - 8700) / 8000) * maxWidth;
// unexpected jump
}
if (lockStr == "E") {
tempWdth = ((scoreA - 16700) / 12000) * maxWidth;
}
tempWdth = Math.min(maxWidth, tempWdth);
return(tempWdth);
}
function getRNum(plyerObj) {
plyerObj.itemNow = plyerObj.itemNow + plyerObj.ranNum;
if (plyerObj.itemNow > 180) {
plyerObj.itemNow = plyerObj.itemNow - Math.max(plyerObj.ranNum * 1.7, 56 + plyerObj.ranNum);
}
retrnNum = (Math.floor(plyerObj.itemNow) % plyerObj.itemType) + 1;
if (plyerObj.lastNum == retrnNum) {
plyerObj.numRow = plyerObj.numRow + 1;
if (plyerObj.numRow > 2) {
if (plyerObj.ranNum > 78) {
plyerObj.ranNum = plyerObj.ranNum * 0.07;
// unexpected jump
}
plyerObj.ranNum = plyerObj.ranNum + 2.13;
plyerObj.numRow = 0;
}
// unexpected jump
}
plyerObj.lastNum = retrnNum;
plyerObj.numRow = 0;
return(retrnNum);
}
function updWIco() {
_j = userSel[0].warnArr.length - 1;
while (_j > -1) {
removeMovieClip(userSel[0].warnArr[_j]);
userSel[0].warnArr.splice(_j, 1);
_j--;
}
_tNum = Math.floor(userSel[0].eggLoad / 81);
_j = 0;
while (_j < _tNum) {
userSel[0].warnArr[_j] = userSel[0].warnLayr.attachMovie("dropIc", "wico" + _j, _j + 1);
userSel[0].warnArr[_j].gotoAndStop(1);
if (_j == 0) {
userSel[0].warnArr[_j]._y = 349;
} else {
userSel[0].warnArr[_j]._x = (userSel[0].warnArr[_j - 1]._x + userSel[0].warnArr[_j - 1]._width) + 3;
userSel[0].warnArr[_j]._y = 349;
}
_j++;
}
_tLen = _tNum;
_tNum = Math.floor((userSel[0].eggLoad % 81) / 27) + _tLen;
_j = _tLen;
while (_j < _tNum) {
userSel[0].warnArr[_j] = userSel[0].warnLayr.attachMovie("dropIc", "wico" + _j, _j + 1);
userSel[0].warnArr[_j].gotoAndStop(2);
if (_j == 0) {
userSel[0].warnArr[_j]._y = 349;
} else {
userSel[0].warnArr[_j]._x = (userSel[0].warnArr[_j - 1]._x + userSel[0].warnArr[_j - 1]._width) + 3;
userSel[0].warnArr[_j]._y = 349;
}
_j++;
}
_tLen = _tNum;
_tNum = Math.floor(((userSel[0].eggLoad % 81) % 27) / 10) + _tLen;
_j = _tLen;
while (_j < _tNum) {
userSel[0].warnArr[_j] = userSel[0].warnLayr.attachMovie("dropIc", "wico" + _j, _j + 1);
userSel[0].warnArr[_j].gotoAndStop(3);
if (_j == 0) {
userSel[0].warnArr[_j]._y = 349;
} else {
userSel[0].warnArr[_j]._x = (userSel[0].warnArr[_j - 1]._x + userSel[0].warnArr[_j - 1]._width) + 3;
userSel[0].warnArr[_j]._y = 349;
}
_j++;
}
_tLen = _tNum;
_tNum = (((userSel[0].eggLoad % 81) % 27) % 10) + _tLen;
_j = _tLen;
while (_j < _tNum) {
userSel[0].warnArr[_j] = userSel[0].warnLayr.attachMovie("dropIc", "wico" + _j, _j + 1);
userSel[0].warnArr[_j].gotoAndStop(4);
if (_j == 0) {
userSel[0].warnArr[_j]._y = 349;
} else {
userSel[0].warnArr[_j]._x = (userSel[0].warnArr[_j - 1]._x + userSel[0].warnArr[_j - 1]._width) + 3;
userSel[0].warnArr[_j]._y = 349;
}
_j++;
}
}
function findMood() {
if ((ppic0.mood != 3) && (ppic1.mood != 3)) {
if ((userSel[0].eggAmnt < 70) && (userSel[1].eggAmnt < 70)) {
ppic0.mood = 0;
ppic1.mood = 0;
} else {
__temp = userSel[0].eggAmnt - userSel[1].eggAmnt;
if (Math.abs(__temp) > 30) {
if (__temp < 0) {
ppic0.mood = 1;
ppic1.mood = 2;
} else {
ppic0.mood = 2;
ppic1.mood = 1;
}
} else {
if (userSel[0].eggAmnt > 130) {
ppic0.mood = 2;
} else {
ppic0.mood = 1;
}
if (userSel[1].eggAmnt > 130) {
ppic1.mood = 2;
} else {
ppic1.mood = 1;
}
}
}
}
}
function hideLink(_meMc) {
_meMc.glooper.eggbump.linkR._visible = false;
_meMc.glooper.eggbump.linkL._visible = false;
_meMc.glooper.eggbump.linkT._visible = false;
_meMc.glooper.eggbump.linkB._visible = false;
}
function addfx(fx_type, use_me, use_me2, amount) {
if (amount == undefined) {
amount = 8;
}
if (fx_type == "beans") {
__i = 0;
if (__i < amount) {
_n = Math.ceil(Math.random() * 1.5);
_mc = fxl.attachMovie("splickx" + _n, "fx" + fx_num, fx_num);
fx_num = fx_num + 1;
_mc._yscale = (_mc._xscale = (49 * Math.random()) + 90);
_tforce = ((Math.random() * 8) + 10) * ((150 - _mc._xscale) / 100);
_tang = ((Math.random() * 360) * Math.PI) / 180;
_mc.forcex = Math.cos(_tang) * _tforce;
_mc.forcey = (Math.sin(_tang) * _tforce) - 20;
_mc.rotforce = (Math.random() * 180) - 90;
_mc.gotoAndStop(use_me.num);
_mc._rotation = _tang;
_mc.gravity = 0.04 * _mc._xscale;
_mc._width = _mc._width + 20;
_mc._x = (use_me._x + use_me._parent._parent._x) + _mc.forcex;
_mc._y = (use_me._y + use_me._parent._parent._y) + _mc.forcey;
_mc.slow = 0.8;
_mc.ground = 370 + (Math.random() * 8);
_mc.blendMode = "screen";
fx_arr.push(_mc);
__i++;
// unexpected jump
}
// unexpected jump
}
if (fx_type == "splats") {
_mc = fxl.attachMovie("splatsx1", "fx" + fx_num, fx_num);
fx_num = fx_num + 1;
_mc._x = use_me._x;
_mc._y = use_me._y;
_mc._yscale = (_mc._xscale = use_me._xscale);
_mc.blendMode = "screen";
_mc.gotoAndStop(use_me._currentframe);
// unexpected jump
}
if (fx_type == "splash1") {
_mc = fxl.attachMovie("splashx1", "fx" + fx_num, fx_num);
fx_num = fx_num + 1;
_mc._x = use_me._x + use_me._parent._parent._x;
_mc._y = use_me._y + use_me._parent._parent._x;
_mc._rotation = amount;
_mc.blendMode = "substract";
// unexpected jump
}
if (fx_type == "splash2") {
_mc = fxl.attachMovie("splashx2", "fx" + fx_num, fx_num);
fx_num = fx_num + 1;
_mc._x = use_me._x + use_me._parent._parent._x;
_mc._y = use_me._y + use_me._parent._parent._x;
_mc.blendMode = "screen";
// unexpected jump
}
if (fx_type == "spark") {
_n = Math.ceil(Math.random() * 4);
_mc = fxl.attachMovie("spark" + _n, "fx" + fx_num, fx_num);
fx_num = fx_num + 1;
_mc._x = use_me._x + use_me._parent._parent._x;
_mc._y = use_me._y + use_me._parent._parent._x;
_mc._width = getDist(use_me, use_me2);
_mc._rotation = getAngTo(use_me, use_me2);
_mc.blendMode = "screen";
}
}
function destroyGame() {
onEnterFrame = null;
var _local4 = txtBoxes.length;
var _local1 = 0;
if (_local1 < _local4) {
removeMovieClip(txtBoxes[_local1]);
_local1++;
// unexpected jump
}
txtBoxes = null;
_local4 = fx_arr.length;
_local1 = 0;
if (_local1 < _local4) {
removeMovieClip(fx_arr[_local1]);
_local1++;
// unexpected jump
}
fx_arr = null;
_local4 = dropArr.length;
_local1 = 0;
if (_local1 < _local4) {
removeMovieClip(dropArr[_local1]);
_local1++;
// unexpected jump
}
dropArr = null;
_local1 = 0;
if (_local1 < 10) {
removeMovieClip(scorePan["beam" + j]);
_local1++;
// unexpected jump
}
scorePan = null;
_j = userSel[0].warnArr.length - 1;
if (_j > -1) {
removeMovieClip(userSel[0].warnArr[_j]);
userSel[0].warnArr.splice(_j, 1);
_j--;
// unexpected jump
}
userSel[0].warnArr = null;
removeMovieClip(userSel[0].warnLayr);
_local1 = 0;
if (_local1 < userLen) {
var j = 0;
if (j < 9) {
var _local2 = 0;
if (_local2 < 19) {
if (gridArr[_local1][j][_local2].mc != null) {
if (_local1 == 0) {
_local4 = gridArr[_local1][j][_local2].mc.links.length;
var _local3 = 0;
if (_local3 < _local4) {
removeMovieClip(gridArr[_local1][j][_local2].mc.links[_local3]);
_local3++;
// unexpected jump
}
}
removeMovieClip(gridArr[_local1][j][_local2].mc);
}
gridArr[_local1][j][_local2] = null;
_local2++;
// unexpected jump
}
gridArr[_local1][j] = null;
j++;
// unexpected jump
}
gridArr[_local1] = null;
removeMovieClip(fxl);
removeMovieClip(userSel[_local1].prevEgg.egg2);
removeMovieClip(userSel[_local1].prevEgg.egg1);
removeMovieClip(userSel[_local1].eggFalln.egg2);
removeMovieClip(userSel[_local1].eggFalln.egg1);
if (_local1 == 0) {
removeMovieClip(userSel[_local1].llayer);
}
removeMovieClip(userSel[_local1].prevEgg);
removeMovieClip(userSel[_local1].eggFalln);
removeMovieClip(userSel[_local1].eggLayer);
removeMovieClip(userSel[_local1].glayer);
_local1++;
// unexpected jump
}
gotoAndPlay (1);
}
gstate = 0;
mcool = 0;
mListn = new Object();
mInfo = new Object();
p1start = false;
sendRun = true;
txtEnter = false;
if (avatNum != "NONE") {
loadMovie (String(((servStr + "playpic/playpic") + avatNum) + ".swf"), ppic0);
if ((allyAvat == avatNum) && (allyAvat != "NONE")) {
loadMovie (String(((servStr + "playpic/playpic") + allyAvat) + "_COLORB.swf"), ppic1);
}
}
ppic0.mood = 0;
ppic0.shake = false;
ppic0.laugh = false;
ppic1.mood = 0;
ppic1.shake = false;
ppic1.laugh = false;
mListn.onMouseDown = function (eventObj) {
mInfo._x = _root._xmouse;
mInfo._y = _root._ymouse;
if ((((mInfo._x > txtsend._x) && (mInfo._x < (txtsend._x + txtsend._width))) && (mInfo._y > txtsend._y)) && (mInfo._y < (txtsend._y + txtsend._height))) {
txtEnter = true;
Key.addListener(keyObj);
// unexpected jump
}
txtInOff();
if (gstate == 0) {
mcool = mcool + 1;
}
};
mListn.onMouseUp = function (eventObj) {
if (!txtEnter) {
}
mcool = 0;
};
Mouse.addListener(mListn);
keyObj = new Object();
keyObj.onKeyDown = function () {
if (Key.getCode() == 13) {
tempStr = txtsend.text;
if (tempStr.charCodeAt(0) == 13) {
tempStr = tempStr.substr(1);
}
txtsend.text = "";
if (tempStr.length > 0) {
addTxt(tempStr, String(conID), 12364509);
sendStr(String((("message_" + tempStr) + "_") + String(conID)));
}
} else if (String(txtsend.text).charCodeAt(0) == 13) {
txtsend.text = String(txtsend.text).substr(1);
}
};
txtBoxes = new Array();
txtLayer.boxNum = 1;
txtLayer._x = txtsend._x;
txtLayer._y = (txtsend._y + txtsend._height) + 4;
maxmsg = 3;
addTxt(" is your opponent!", idSel, 16729255);
actnOut = "";
alyIn = new Array();
packNum = 0;
orderNum = 0;
orddepot = "";
ordrTime = 0;
orderRun = false;
debugtxt.text = "debugging";
if (selftest) {
playok = true;
}
} while (!playok);
this.onEnterFrame = function () {
if (user2) {
if (!stopCon) {
if (sendRun) {
if (!sending) {
if (sendCool > 0) {
sendCool = sendCool - 1;
} else {
sending = true;
sendGet();
}
}
}
}
}
if (orderRun) {
ordrTime = ordrTime + 1;
if (ordrTime > 147) {
orderNum = orderNum + 1;
ordrTime = 0;
orderRun = false;
}
}
if (gstart) {
i = 0;
while (i < userLen) {
if (i == 1) {
if (user2) {
lookFor.action = "";
userSel[i].speedUp = Math.max(1, userSel[i].speedUp * 0.8);
userSel[i].gStatus = -1;
tempLen = alyIn.length;
if (tempLen == 0) {
if (userSel[i].dropArr.length > 0) {
tempLen = 1;
}
}
j = 0;
while (j < tempLen) {
if ((lookFor.action == "") || (((lookFor.action != "") && (alyIn[j].actType == lookFor.action)) && (alyIn[j].timeAt == lookFor.timeAt))) {
if ((alyIn[j].actType != "glue") && (userSel[i].dropArr.length > 0)) {
playProd = false;
tempLen2 = userSel[i].dropArr.length;
k = 0;
while (k < tempLen2) {
tY = (userSel[i].dropArr[k]._y / gridSize) - 0.5;
if (tY >= userSel[i].dropArr[k].sy) {
tX = (userSel[i].dropArr[k]._x / gridSize) - 0.5;
gridArr[i][tX][tY].mc = userSel[i].dropArr[k];
userSel[i].dropArr[k] = null;
userSel[i].dropArr.splice(k, 1);
k = k - 1;
tempLen2 = tempLen2 - 1;
playProd = true;
} else {
userSel[i].dropArr[k]._y = userSel[i].dropArr[k]._y + gridSize;
}
k++;
}
if (playProd) {
connctEg(0, 0, i);
playsnd("prod");
}
j = tempLen;
} else if (alyIn[j].actType == "itype") {
userSel[i].itemType = Number(alyIn[j].action1);
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
} else if (alyIn[j].actType == "gspeed") {
userSel[i].gspeed = Number(alyIn[j].action1);
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
} else if (alyIn[j].actType == "y") {
if (userSel[i].y_active == -27) {
userSel[i]._toY = (userSel[i].y_active = Number(alyIn[j].action1));
userSel[i].y_actNum = j;
userSel[i].speedUp = 1;
} else if (userSel[i].y_active == Number(alyIn[j].action1)) {
tY = (userSel[i]._toY + 0.5) * gridSize;
userSel[i].eggFalln._y = Math.min(tY, userSel[i].eggFalln._y + ((18 - (userSel[i].gspeed * 0.6)) * userSel[i].speedUp));
if (userSel[i].eggFalln._y >= tY) {
alyIn[j] = null;
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
userSel[i].y_active = -27;
}
} else {
tempNum = (alyIn[j].timeAt - getTimer()) + lateBon;
if (tempNum == 0) {
tempNum = 0.001;
}
userSel[i].speedUp = (alyIn[j].timeAt - alyIn[userSel[i].y_actNum].timeAt) / tempNum;
if ((userSel[i].speedUp < 0) || (userSel[i].speedUp > 4)) {
userSel[i].speedUp = 4;
} else {
userSel[i].speedUp = Math.max(1, userSel[i].speedUp);
}
j = tempLen;
}
} else if (alyIn[j].actType == "x") {
if (userSel[i].x_active == -27) {
userSel[i]._toX = (userSel[i].x_active = Number(alyIn[j].action1));
} else if (userSel[i].x_active == Number(alyIn[j].action1)) {
tX = (userSel[i]._toX + 0.5) * gridSize;
if (userSel[i].eggFalln._x < tX) {
userSel[i].eggFalln._x = Math.min(tX, userSel[i].eggFalln._x + (12 * userSel[i].speedUp));
} else {
userSel[i].eggFalln._x = Math.max(tX, userSel[i].eggFalln._x - (12 * userSel[i].speedUp));
}
if (userSel[i].eggFalln._x == tX) {
alyIn[j] = null;
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
userSel[i].x_active = -27;
}
} else {
j = tempLen;
}
} else if (alyIn[j].actType == "ang") {
if (userSel[i].ang_actv == 1023) {
alyIn[j].action1 = (userSel[i]._angle = (userSel[i].ang_actv = ((Number(alyIn[j].action1) == 3) ? -90 : (Number(alyIn[j].action1) * 90))));
} else if (userSel[i].ang_actv == Number(alyIn[j].action1)) {
userSel[i].eggFalln._rotation = userSel[i].eggFalln._rotation - userSel[i]._angle;
if (userSel[i].eggFalln._rotation < 0) {
userSel[i].eggFalln._rotation = Math.min(0, userSel[i].eggFalln._rotation + (25 + (((10 - userSel[i].gspeed) * 2) * userSel[i].speedUp)));
} else {
userSel[i].eggFalln._rotation = Math.max(0, userSel[i].eggFalln._rotation - (25 + (((10 - userSel[i].gspeed) * 2) * userSel[i].speedUp)));
}
userSel[i].eggFalln._rotation = userSel[i].eggFalln._rotation + userSel[i]._angle;
userSel[i].eggFalln.egg1._rotation = (userSel[i].eggFalln.egg2._rotation = -userSel[i].eggFalln._rotation);
if (userSel[i].eggFalln._rotation == userSel[i]._angle) {
alyIn[j] = null;
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
userSel[i].ang_actv = 1023;
}
} else {
j = tempLen;
}
} else if (((userSel[i].x_active == -27) && (userSel[i].y_active == -27)) && (userSel[i].ang_actv == 1023)) {
if (alyIn[j].actType == "glue") {
tempArr = alyIn[j].action1.split("-");
tX = Number(tempArr[0]);
tY = Number(tempArr[1]);
if (gridArr[i][tX][tY].mc != null) {
gridArr[i][tX][tY].mc.sy = Number(tempArr[2]);
gridArr[i][tX][tY].mc._y = gridArr[i][tX][tY].mc._y + gridSize;
userSel[i].dropArr.push(gridArr[i][tX][tY].mc);
gridArr[i][tX][tY].mc = null;
}
lookFor.action = alyIn[j].actType;
lookFor.timeAt = alyIn[j].timeAt;
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
} else if (alyIn[j].actType == "creg") {
userSel[i].dropT = 12;
userSel[i].gStatus = 0;
alyIn.splice(j, 1);
j = tempLen;
} else if (alyIn[j].actType == "gegg") {
impactEg(i);
userSel[i].gStatus = -1;
alyIn.splice(j, 1);
j = tempLen;
} else if (alyIn[j].actType == "pop") {
tempArr = alyIn[j].action1.split("-");
tempLen2 = tempArr.length;
tempStr = gridArr[i][Number(tempArr[0])][Number(tempArr[1])].mc.chainNum;
k = 0;
while (k < tempLen2) {
popEg(Number(tempArr[k]), Number(tempArr[k + 1]), i);
k = k + 2;
}
tempLen2 = userSel[i].chainNme.length;
k = 0;
while (k < tempLen2) {
if (userSel[i].chainNme[k] == tempStr) {
userSel[i].chainNme[k] = null;
userSel[i].chainNme.splice(k, 1);
k = tempLen2;
}
k++;
}
userSel[i].chains[tempStr] = null;
lookFor.action = alyIn[j].actType;
lookFor.timeAt = alyIn[j].timeAt;
alyIn.splice(j, 1);
j = j - 1;
tempLen = tempLen - 1;
playsnd("pop");
} else if (alyIn[j].actType == "cegg") {
tempArr = alyIn[j].action1.split("-");
tempLen2 = tempArr.length;
k = 0;
while (k < tempLen2) {
tX = Number(tempArr[k]);
tY = Number(tempArr[k + 1]);
tCol = Number(tempArr[k + 2]);
if (gridArr[i][tX][tY].mc == null) {
userSel[i].eggAmnt = userSel[i].eggAmnt + 1;
gridArr[i][tX][tY].mc = userSel[i].eggLayer.attachMovie("gloop", "gp" + userSel[i].nameCnt, 1 + userSel[i].nameCnt);
gridArr[i][tX][tY].mc._x = (tX * gridSize) + (gridSize * 0.5);
gridArr[i][tX][tY].mc._y = (tY * gridSize) + (gridSize * 0.5);
gridArr[i][tX][tY].mc.num = tCol;
gridArr[i][tX][tY].mc.gotoAndStop(tCol);
gridArr[i][tX][tY].mc.activeD = true;
gridArr[i][tX][tY].mc.sy = tY;
userSel[i].nameCnt = userSel[i].nameCnt + 1;
}
k = k + 3;
}
findMood();
alyIn.splice(j, 1);
j = tempLen;
}
} else {
j = tempLen;
}
} else {
j = tempLen;
}
j++;
}
}
} else {
userSel[i].time = userSel[i].time + 1;
tempNum = Math.floor((userSel[i].time / _fps) / 60);
tempNum2 = Math.floor((userSel[i].time / _fps) / 40);
if (tempNum < 10) {
tempStr = ("0" + tempNum) + ":";
} else {
tempStr = tempNum + ":";
}
tempNum = Math.floor(userSel[i].time / _fps) % 60;
if (tempNum < 10) {
tempStr = tempStr + ("0" + tempNum);
} else {
tempStr = tempStr + String(tempNum);
}
scorePan.timetxt.text = tempStr;
if (Number(scorePan.leveltxt.text) < tempNum2) {
scorePan.leveltxt.text = tempNum2;
if (((tempNum2 % 2) == 1) && (userSel[i].itemType < 9)) {
userSel[i].itemType = Math.min(9, userSel[i].itemType + 1);
sendStr(String("itype_" + userSel[i].itemType));
} else {
userSel[i].gspeed = Math.max(0, Math.round((userSel[i].gspeed - 0.4) * 10) * 0.1);
sendStr(String("gspeed_" + userSel[i].gspeed));
}
}
if (Number(scorePan.points.text) < userSel[i].points) {
scorePan.points.text = Math.min(userSel[i].points, Number(scorePan.points.text) + 2);
}
}
if (userSel[i].gStatus == 0) {
if (userSel[i].dropT < 12) {
if (i == 0) {
if (userSel[i].quake) {
tempLen = userSel[i].combCunt.length;
dropMass = 0;
j = 0;
while (j < tempLen) {
dropMass = dropMass + Math.max(0, userSel[i].combCunt[j] - 4);
j++;
}
dropMass = dropMass + ((tempLen - 1) * 3);
if (dropMass > 0) {
dropMass = Math.round(dropMass * Math.max(1, tempLen * 0.75));
userSel[i].points = userSel[i].points + dropMass;
if (dropMass >= 18) {
ppic0.laugh = true;
}
sendStr(String("mass_" + dropMass));
}
userSel[i].combCunt = new Array();
userSel[i].quake = false;
}
}
userSel[i].dropT = userSel[i].dropT + 1;
} else {
userSel[i].eggFalln._visible = true;
userSel[i].eggFalln.egg1.num = getRNum(userSel[i]);
userSel[i].eggFalln.egg2.num = getRNum(userSel[i]);
userSel[i].eggFalln.egg1.gotoAndStop(userSel[i].eggFalln.egg1.num);
userSel[i].eggFalln.egg2.gotoAndStop(userSel[i].eggFalln.egg2.num);
temp1 = userSel[i].itemNow;
temp2 = userSel[i].ranNum;
temp3 = userSel[i].numRow;
temp4 = userSel[i].lastNum;
userSel[i].prevEgg.egg1.gotoAndStop(getRNum(userSel[i]));
userSel[i].prevEgg.egg2.gotoAndStop(getRNum(userSel[i]));
userSel[i].itemNow = temp1;
userSel[i].ranNum = temp2;
userSel[i].numRow = temp3;
userSel[i].lastNum = temp4;
userSel[i]._angle = (userSel[i].eggFalln._rotation = (userSel[i].eggFalln.egg1._rotation = (userSel[i].eggFalln.egg2._rotation = 180)));
userSel[i].moveT = 0;
userSel[i].eggFalln._x = (userSel[i].startX * gridSize) + (gridSize * 0.5);
userSel[i].eggFalln._y = (userSel[i].startY * gridSize) + (gridSize * 0.5);
userSel[i]._toX = userSel[i].startX;
userSel[i]._toY = userSel[i].startY;
userSel[i].dropT = 3;
userSel[i].eggsDrop = userSel[i].eggsDrop + 1;
userSel[i].stall = true;
if (i == 0) {
userSel[i].gStatus = 1;
sendStr(String("creg"));
} else {
userSel[i].gStatus = -1;
}
}
} else if (userSel[i].gStatus == 1) {
if (userSel[i]._angle == userSel[i].eggFalln._rotation) {
if (((Key.isDown(32) || (Key.isDown(73))) || (Key.isDown(38))) && (!txtEnter)) {
power = 90;
tX = userSel[i]._toX;
if (userSel[i]._angle == 0) {
if ((tX == 0) || (gridArr[i][tX - 1][userSel[i]._toY].mc != null)) {
if ((tX == 8) || (gridArr[i][tX + 1][userSel[i]._toY].mc != null)) {
if (gridArr[i][tX][userSel[i]._toY - 1].mc != null) {
power = 0;
} else {
power = 180;
}
} else {
userSel[i]._toX = userSel[i]._toX + 1;
if (i == 0) {
sendStr(String("x_" + userSel[i]._toX));
}
}
}
} else if (userSel[i]._angle == 180) {
if ((tX == 8) || (gridArr[i][tX + 1][userSel[i]._toY].mc != null)) {
if ((tX == 0) || (gridArr[i][tX - 1][userSel[i]._toY].mc != null)) {
if (gridArr[i][tX][userSel[i]._toY + 1].mc != null) {
power = 0;
} else {
power = 180;
}
} else {
userSel[i]._toX = userSel[i]._toX - 1;
if (i == 0) {
sendStr(String("x_" + userSel[i]._toX));
}
}
}
} else if (userSel[i]._angle == 90) {
if (gridArr[i][tX][userSel[i]._toY - 1].mc != null) {
power = 0;
}
} else if (userSel[i]._angle == -90) {
if ((gridArr[i][tX][Math.min(18, userSel[i]._toY + 1)].mc != null) || (userSel[i]._toY == 18)) {
power = 0;
}
}
userSel[i]._angle = userSel[i]._angle + power;
while (userSel[i]._angle > 180) {
userSel[i]._angle = userSel[i]._angle - 360;
}
if (i == 0) {
if (power != 0) {
sendStr(String("ang_" + (((userSel[i]._angle < 0) ? (360 + userSel[i]._angle) : userSel[i]._angle) / 90)));
}
}
} else if ((Key.isDown(16) || (Key.isDown(85))) && (!txtEnter)) {
power = 90;
tX = userSel[i]._toX;
if (userSel[i]._angle == 0) {
if ((tX == 8) || (gridArr[i][tX + 1][userSel[i]._toY].mc != null)) {
if ((tX == 0) || (gridArr[i][tX - 1][userSel[i]._toY].mc != null)) {
if (gridArr[i][tX][userSel[i]._toY - 1].mc != null) {
power = 0;
} else {
power = 180;
}
} else {
userSel[i]._toX = userSel[i]._toX - 1;
if (i == 0) {
sendStr(String("x_" + userSel[i]._toX));
}
}
}
} else if (userSel[i]._angle == 180) {
if ((tX == 0) || (gridArr[i][tX - 1][userSel[i]._toY].mc != null)) {
if ((tX == 8) || (gridArr[i][tX + 1][userSel[i]._toY].mc != null)) {
if (gridArr[i][tX][userSel[i]._toY + 1].mc != null) {
power = 0;
} else {
power = 180;
}
} else {
userSel[i]._toX = userSel[i]._toX + 1;
if (i == 0) {
sendStr(String("x_" + userSel[i]._toX));
}
}
}
} else if (userSel[i]._angle == -90) {
if (gridArr[i][tX][userSel[i]._toY - 1].mc != null) {
power = 0;
}
} else if (userSel[i]._angle == 90) {
if ((gridArr[i][tX][Math.min(18, userSel[i]._toY + 1)].mc != null) || (userSel[i]._toY == 18)) {
power = 0;
}
}
userSel[i]._angle = userSel[i]._angle - power;
while (userSel[i]._angle <= -180) {
userSel[i]._angle = userSel[i]._angle + 360;
}
if (i == 0) {
if (power != 0) {
sendStr(String("ang_" + (((userSel[i]._angle < 0) ? (360 + userSel[i]._angle) : userSel[i]._angle) / 90)));
}
}
}
} else {
userSel[i].eggFalln._rotation = userSel[i].eggFalln._rotation - userSel[i]._angle;
if (userSel[i].eggFalln._rotation < 0) {
userSel[i].eggFalln._rotation = Math.min(0, userSel[i].eggFalln._rotation + (25 + ((10 - userSel[i].gspeed) * 2)));
} else {
userSel[i].eggFalln._rotation = Math.max(0, userSel[i].eggFalln._rotation - (25 + ((10 - userSel[i].gspeed) * 2)));
}
userSel[i].eggFalln._rotation = userSel[i].eggFalln._rotation + userSel[i]._angle;
userSel[i].eggFalln.egg1._rotation = (userSel[i].eggFalln.egg2._rotation = -userSel[i].eggFalln._rotation);
}
t2X = (userSel[i]._toX * gridSize) + (gridSize * 0.5);
if (t2X == userSel[i].eggFalln._x) {
if ((Key.isDown(37) || (Key.isDown(65))) && (!txtEnter)) {
if (t2X > ((0.5 + Number(userSel[i]._angle == 90)) * gridSize)) {
blocked = false;
tX = userSel[i]._toX - 1;
tY = userSel[i]._toY;
if (userSel[i]._angle == 0) {
if (gridArr[i][tX][tY].mc != null) {
blocked = true;
} else if (gridArr[i][tX][Math.max(0, tY - 1)].mc != null) {
blocked = true;
}
} else if (userSel[i]._angle == 180) {
if (gridArr[i][tX][tY].mc != null) {
blocked = true;
} else if (gridArr[i][tX][Math.min(19, tY + 1)].mc != null) {
blocked = true;
}
} else if (userSel[i]._angle == 90) {
if (gridArr[i][tX - 1][tY].mc != null) {
blocked = true;
}
} else if (gridArr[i][tX][tY].mc != null) {
blocked = true;
}
if (!blocked) {
userSel[i]._toX = userSel[i]._toX - 1;
if (i == 0) {
sendStr(String("x_" + userSel[i]._toX));
}
}
}
} else if ((Key.isDown(39) || (Key.isDown(68))) && (!txtEnter)) {
if (t2X < ((8.5 - Number(userSel[i]._angle == -90)) * gridSize)) {
blocked = false;
tX = userSel[i]._toX + 1;
tY = userSel[i]._toY;
if (userSel[i]._angle == 0) {
if (gridArr[i][tX][tY].mc != null) {
blocked = true;
} else if (gridArr[i][tX][Math.max(0, tY - 1)].mc != null) {
blocked = true;
}
} else if (userSel[i]._angle == 180) {
if (gridArr[i][tX][tY].mc != null) {
blocked = true;
} else if (gridArr[i][tX][Math.min(19, tY + 1)].mc != null) {
blocked = true;
}
} else if (userSel[i]._angle == 90) {
if (gridArr[i][tX][tY].mc != null) {
blocked = true;
}
} else if (gridArr[i][tX + 1][tY].mc != null) {
blocked = true;
}
if (!blocked) {
userSel[i]._toX = userSel[i]._toX + 1;
if (i == 0) {
sendStr(String("x_" + userSel[i]._toX));
}
}
}
}
} else if (userSel[i].eggFalln._x < t2X) {
userSel[i].eggFalln._x = Math.min(t2X, userSel[i].eggFalln._x + 12);
} else {
userSel[i].eggFalln._x = Math.max(t2X, userSel[i].eggFalln._x - 12);
}
if (userSel[i].stall) {
if ((userSel[i].dropT < userSel[i].gspeed) && (((!Key.isDown(40)) && (!Key.isDown(83))) || (txtEnter))) {
userSel[i].dropT = userSel[i].dropT + 1;
} else {
userSel[i]._toY = userSel[i]._toY + 1;
if (i == 0) {
sendStr(String("y_" + userSel[i]._toY));
}
userSel[i].gStatus = 2;
if (userSel[i]._toY >= (19 - Number(userSel[i]._angle == 0))) {
hit = true;
} else if ((gridArr[i][userSel[i]._toX][userSel[i]._toY + 1].mc != null) && (userSel[i]._angle == 0)) {
hit = true;
} else if ((gridArr[i][userSel[i]._toX][userSel[i]._toY].mc != null) && (userSel[i]._angle == 180)) {
hit = true;
} else if (((gridArr[i][userSel[i]._toX][userSel[i]._toY].mc != null) || (gridArr[i][userSel[i]._toX - 1][userSel[i]._toY].mc != null)) && (userSel[i]._angle == 90)) {
hit = true;
} else if (((gridArr[i][userSel[i]._toX][userSel[i]._toY].mc != null) || (gridArr[i][userSel[i]._toX + 1][userSel[i]._toY].mc != null)) && (userSel[i]._angle == -90)) {
hit = true;
} else {
hit = false;
userSel[i].gStatus = 1;
userSel[i].dropT = 0;
userSel[i].stall = false;
}
if (hit) {
impactEg(i);
if (i == 0) {
sendStr(String("gegg"));
}
}
}
} else {
userSel[i].eggFalln._y = Math.min((userSel[i]._toY * gridSize) + (gridSize * 0.5), (userSel[i].eggFalln._y + (18 - (userSel[i].gspeed * 0.6))) + (5 * Math.min(1, Number(Key.isDown(40)) + (Number(Key.isDown(83)) * Number(!txtEnter)))));
if (userSel[i].eggFalln._y >= ((userSel[i]._toY * gridSize) + (gridSize * 0.5))) {
userSel[i].stall = true;
}
}
} else if (userSel[i].gStatus == 2) {
tempLen = userSel[i].newEggs.length;
j = 0;
while (j < tempLen) {
tX = userSel[i].newEggs[j];
tY = userSel[i].newEggs[j + 1];
tempMC1 = gridArr[i][tX][tY].mc;
eggStop = false;
if ((tY < 18) || (tempMC1.chainC)) {
if ((gridArr[i][tX][tY + 1].mc == null) || (tempMC1.chainC)) {
tempMC1.chainC = null;
if (tempMC1.chainNum != undefined) {
trace("chaiNum != undefined");
tempLen2 = userSel[i].chains[tempMC1.chainNum].length;
tempStr = tempMC1.chainNum;
l = 0;
while (l < tempLen2) {
if (userSel[i].chains[tempStr][l].mc.links != undefined) {
m = userSel[i].chains[tempStr][l].mc.links.length - 1;
while (m >= 0) {
if (userSel[i].chains[tempStr][l].mc.links[m] != null) {
removeMovieClip(userSel[i].chains[tempStr][l].mc.links[m]);
}
m--;
}
userSel[i].chains[tempStr][l].mc.links = null;
}
userSel[i].chains[tempStr][l].mc.chainNum = null;
if (userSel[i].chains[tempStr][l].mc.activeD != true) {
userSel[i].chains[tempStr][l].mc.activeD = true;
userSel[i].chains[tempStr][l].mc.sy = userSel[i].chains[tempStr][l].y;
userSel[i].newEggs.push(userSel[i].chains[tempStr][l].x);
userSel[i].newEggs.push(userSel[i].chains[tempStr][l].y);
tempLen = tempLen + 2;
}
l++;
}
userSel[i].chains[tempStr] = null;
tempLen2 = userSel[i].chainNme.length;
l = 0;
while (l < tempLen2) {
if (userSel[i].chainNme[l] == tempStr) {
userSel[i].chainNme.splice(l, 1);
l = tempLen2;
}
l++;
}
}
if (tY < 18) {
if (gridArr[i][tX][tY + 1].mc == null) {
k = tY - 1;
while (k > -1) {
if (gridArr[i][tX][k].mc != null) {
if (gridArr[i][tX][k].mc.activeD != true) {
gridArr[i][tX][k].mc.activeD = true;
gridArr[i][tX][k].mc.sy = k;
userSel[i].newEggs.push(tX);
userSel[i].newEggs.push(k);
tempLen = tempLen + 2;
}
} else {
k = -1;
}
k--;
}
gridArr[i][tX][tY + 1].mc = tempMC1;
tempMC1._y = tempMC1._y + gridSize;
userSel[i].newEggs[j + 1] = userSel[i].newEggs[j + 1] + 1;
gridArr[i][tX][tY].mc = null;
}
}
} else {
eggStop = true;
}
} else {
eggStop = true;
}
if (eggStop) {
if (i == 0) {
if (gridArr[i][tX][tY].mc.sy != -100) {
if (gridArr[i][tX][tY].mc.sy != tY) {
sendStr(String((((("glue_" + tX) + "-") + gridArr[i][tX][tY].mc.sy) + "-") + tY));
}
gridArr[i][tX][tY].mc.sy = -100;
}
}
k = 0;
while (k < 4) {
if (k == 0) {
t2X = tX + 1;
t2Y = tY;
} else if (k == 1) {
t2X = tX - 1;
t2Y = tY;
} else if (k == 2) {
t2X = tX;
t2Y = tY + 1;
} else {
t2X = tX;
t2Y = tY - 1;
}
if (gridArr[i][t2X][t2Y].mc != null) {
if (gridArr[i][t2X][t2Y].mc.activeD != true) {
tempMC2 = gridArr[i][t2X][t2Y].mc;
if (tempMC2.num == tempMC1.num) {
temp = userSel[i].llayer.attachMovie("egglink", "le" + userSel[i].lcount, userSel[i].lcount);
temp.gotoAndStop(tempMC1.num);
userSel[i].lcount = userSel[i].lcount + 1;
temp._x = (tempMC2._x + tempMC1._x) * 0.5;
temp._y = (tempMC2._y + tempMC1._y) * 0.5;
if (k > 1) {
temp._rotation = 90;
}
if (tempMC2.links == undefined) {
tempMC2.links = new Array();
}
if (tempMC1.links == undefined) {
tempMC1.links = new Array();
}
tempMC2.links.push(temp);
tempMC1.links.push(temp);
if (tempMC1.chainNum == undefined) {
if (tempMC2.chainNum == undefined) {
tempMC1.chainNum = (tempMC2.chainNum = "c" + userSel[i].chainCnt);
userSel[i].chainNme.push(tempMC1.chainNum);
userSel[i].chainCnt = userSel[i].chainCnt + 1;
userSel[i].chains[tempMC1.chainNum] = new Array();
userSel[i].chains[tempMC1.chainNum][0] = new Object();
userSel[i].chains[tempMC1.chainNum][0].x = tX;
userSel[i].chains[tempMC1.chainNum][0].y = tY;
userSel[i].chains[tempMC1.chainNum][0].mc = tempMC1;
userSel[i].chains[tempMC1.chainNum][0].updated = false;
userSel[i].chains[tempMC1.chainNum][1] = new Object();
userSel[i].chains[tempMC1.chainNum][1].x = t2X;
userSel[i].chains[tempMC1.chainNum][1].y = t2Y;
userSel[i].chains[tempMC1.chainNum][1].mc = tempMC2;
} else {
tempMC1.chainNum = tempMC2.chainNum;
tempLen2 = userSel[i].chains[tempMC1.chainNum].length;
userSel[i].chains[tempMC1.chainNum][tempLen2] = new Object();
userSel[i].chains[tempMC1.chainNum][tempLen2].x = tX;
userSel[i].chains[tempMC1.chainNum][tempLen2].y = tY;
userSel[i].chains[tempMC1.chainNum][tempLen2].mc = tempMC1;
if (tempLen2 > 2) {
userSel[i].chains[tempMC1.chainNum][0].updated = true;
} else {
userSel[i].chains[tempMC1.chainNum][0].updated = false;
}
}
} else if (tempMC1.chainNum != tempMC2.chainNum) {
if (tempMC2.chainNum == undefined) {
tempLen2 = userSel[i].chains[tempMC1.chainNum].length;
tempMC2.chainNum = tempMC1.chainNum;
userSel[i].chains[tempMC2.chainNum][tempLen2] = new Object();
userSel[i].chains[tempMC2.chainNum][tempLen2].x = t2X;
userSel[i].chains[tempMC2.chainNum][tempLen2].y = t2Y;
userSel[i].chains[tempMC2.chainNum][tempLen2].mc = tempMC2;
if (tempLen2 > 2) {
userSel[i].chains[tempMC1.chainNum][0].updated = true;
} else {
userSel[i].chains[tempMC1.chainNum][0].updated = false;
}
} else {
tempLen2 = userSel[i].chains[tempMC1.chainNum].length;
tempStr = tempMC1.chainNum;
tempLen3 = userSel[i].chains[tempMC2.chainNum].length;
l = 0;
while (l < tempLen2) {
userSel[i].chains[tempMC2.chainNum][tempLen3 + l] = userSel[i].chains[tempStr][l];
userSel[i].chains[tempStr][l].mc.chainNum = tempMC2.chainNum;
l++;
}
userSel[i].chains[tempStr] = null;
tempLen2 = userSel[i].chainNme.length;
l = 0;
while (l < tempLen2) {
if (userSel[i].chainNme[l] == tempStr) {
userSel[i].chainNme.splice(l, 1);
l = tempLen2;
}
l++;
}
userSel[i].chains[tempMC1.chainNum][0].updated = true;
}
}
}
}
}
k++;
}
gridArr[i][tX][tY].mc.activeD = false;
userSel[i].newEggs.splice(j, 2);
tempLen = tempLen - 2;
j = j - 2;
}
j = j + 2;
}
if (tempLen == 0) {
userSel[i].gStatus = 3;
}
} else if (userSel[i].gStatus == 3) {
QUADROW = false;
tempLen = userSel[i].chainNme.length;
userSel[i].checkNum = userSel[i].checkNum + 1;
j = 0;
while (j < tempLen) {
tempStr = userSel[i].chainNme[j];
if (userSel[i].chains[tempStr][0].updated) {
chainRmv = false;
tempLen3 = userSel[i].chains[tempStr].length;
k = 0;
while (k < tempLen3) {
rowCnt = 1;
posX = userSel[i].chains[tempStr][k].x;
posY = userSel[i].chains[tempStr][k].y;
if (gridArr[i][posX][posY].mc.hCNum != userSel[i].checkNum) {
gridArr[i][posX][posY].mc.hCNum = userSel[i].checkNum;
l = 1;
while (l < 64) {
if ((posX + l) < 9) {
if (gridArr[i][posX + l][posY].mc != null) {
if (gridArr[i][posX + l][posY].mc.chainNum == tempStr) {
gridArr[i][posX + l][posY].mc.hCNum = userSel[i].checkNum;
rowCnt = rowCnt + 1;
if (rowCnt > 3) {
l = 100;
}
} else {
l = 100;
}
} else {
l = 100;
}
}
l++;
}
if (rowCnt < 4) {
l = -1;
while (l > -64) {
if ((posX + l) >= 0) {
if (gridArr[i][posX + l][posY].mc != null) {
if (gridArr[i][posX + l][posY].mc.chainNum == tempStr) {
gridArr[i][posX + l][posY].mc.hCNum = userSel[i].checkNum;
rowCnt = rowCnt + 1;
if (rowCnt > 3) {
l = -100;
}
} else {
l = -100;
}
} else {
l = -100;
}
}
l--;
}
}
}
if ((gridArr[i][posX][posY].mc.vCNum != userSel[i].checkNum) && (rowCnt < 4)) {
gridArr[i][posX][posY].mc.hCNum = userSel[i].checkNum;
rowCnt = 1;
l = 1;
while (l < 64) {
if ((posX + l) < 18) {
if (gridArr[i][posX][posY + l].mc != null) {
if (gridArr[i][posX][posY + l].mc.chainNum == tempStr) {
gridArr[i][posX][posY + l].mc.vCNum = userSel[i].checkNum;
rowCnt = rowCnt + 1;
if (rowCnt > 3) {
l = 100;
}
} else {
l = 100;
}
} else {
l = 100;
}
}
l++;
}
if (rowCnt < 4) {
l = -1;
while (l > -64) {
if ((posX + l) >= 0) {
if (gridArr[i][posX][posY + l].mc != null) {
if (gridArr[i][posX][posY + l].mc.chainNum == tempStr) {
gridArr[i][posX][posY + l].mc.vCNum = userSel[i].checkNum;
rowCnt = rowCnt + 1;
if (rowCnt > 3) {
l = -100;
}
} else {
l = -100;
}
} else {
l = -100;
}
}
l--;
}
}
}
if (rowCnt > 3) {
k = tempLen3;
}
k++;
}
if (rowCnt > 3) {
QUADROW = true;
userSel[i].chains[tempStr][0].cntDown = 0;
} else {
userSel[i].chains[tempStr][0].updated = false;
}
}
j++;
}
if (QUADROW) {
playsnd("pop");
userSel[i].gStatus = 4;
} else if (userSel[i].eggLoad > 0) {
if (!userSel[i].dropped) {
userSel[i].gStatus = 5;
} else {
userSel[i].dropped = false;
userSel[i].gStatus = 0;
}
} else {
userSel[i].gStatus = 0;
}
} else if (userSel[i].gStatus == 4) {
tempLen = userSel[i].chainNme.length;
userSel[i].checkNum = userSel[i].checkNum + 1;
RMVEDONE = true;
j = 0;
while (j < tempLen) {
tempStr = userSel[i].chainNme[j];
if (userSel[i].chains[tempStr][0].updated) {
if (userSel[i].chains[tempStr][0].cntDown < 5) {
if (userSel[i].chains[tempStr][0].cntDown == 0) {
if (i == 0) {
tempNum = userSel[i].chains[tempStr][0].mc.num;
if (tempNum == 9) {
_eggpcl = new Array();
}
tempLen2 = userSel[i].chains[tempStr].length;
webstr = "pop_";
k = 0;
while (k < tempLen2) {
if (userSel[i].chains[tempStr][k].mc.links != undefined) {
l = userSel[i].chains[tempStr][k].mc.links.length - 1;
while (l >= 0) {
if (userSel[i].chains[tempStr][k].mc.links[l] != null) {
removeMovieClip(userSel[i].chains[tempStr][k].mc.links[l]);
}
l--;
}
userSel[i].chains[tempStr][k].mc.links = null;
}
if (userSel[i].chains[tempStr][k].mc._currentframe < 10) {
addfx("beans", userSel[i].chains[tempStr][k].mc);
webstr = webstr + (((userSel[i].chains[tempStr][k].x + "-") + userSel[i].chains[tempStr][k].y) + "-");
userSel[i].chains[tempStr][k].mc.gotoAndStop(userSel[i].chains[tempStr][k].mc.num + 10);
}
if (((tempNum == 6) || (tempNum == 7)) || (tempNum == 8)) {
webstr = chckType(tempNum, userSel[i].chains[tempStr], userSel[i].chains[tempStr][k], gridArr[i], webstr, userSel[i]);
} else if (tempNum == 9) {
webstr = chckType(tempNum, userSel[i].chains[tempStr], userSel[i].chains[tempStr][k], gridArr[i], webstr, userSel[i], _eggpcl, false);
}
k++;
}
if (tempNum == 9) {
webstr = chckType(tempNum, userSel[i].chains[tempStr], null, gridArr[i], webstr, userSel[i], _eggpcl, true);
}
webStr = webStr.substr(0, webStr.length - 1);
sendStr(String(webstr));
}
}
userSel[i].chains[tempStr][0].cntDown = userSel[i].chains[tempStr][0].cntDown + 1;
RMVEDONE = false;
} else {
tempLen2 = userSel[i].chains[tempStr].length;
userSel[i].eggpop = userSel[i].eggpop + tempLen2;
userSel[i].points = userSel[i].points + tempLen2;
tempNum = userSel[i].chains[tempStr][0].mc.num;
userSel[i].colPop[tempNum - 1] = userSel[i].colPop[tempNum - 1] + tempLen2;
scorePan["beam" + tempNum]._width = getWidth(exppnts[tempNum - 1] + userSel[i].colPop[tempNum - 1], egglock[tempNum - 1], 50);
k = 0;
while (k < tempLen2) {
tX = userSel[i].chains[tempStr][k].x;
tY = userSel[i].chains[tempStr][k].y - 1;
if (tY >= 0) {
if (gridArr[i][tX][tY].mc != null) {
if (gridArr[i][tX][tY].mc.chainNum != tempStr) {
if (gridArr[i][tX][tY].mc.activeD != true) {
if (gridArr[i][tX][tY].mc.links != undefined) {
l = gridArr[i][tX][tY].mc.links.length - 1;
while (l >= 0) {
if (gridArr[i][tX][tY].mc.links[l] != null) {
removeMovieClip(gridArr[i][tX][tY].mc.links[l]);
}
l--;
}
gridArr[i][tX][tY].mc.links = null;
}
gridArr[i][tX][tY].mc.activeD = true;
gridArr[i][tX][tY].mc.sy = tY;
userSel[i].newEggs.push(tX);
userSel[i].newEggs.push(tY);
}
}
}
}
userSel[i].eggAmnt = userSel[i].eggAmnt - 1;
removeMovieClip(userSel[i].chains[tempStr][k].mc);
userSel[i].chains[tempStr][k].mc = null;
userSel[i].chains[tempStr][k].x = null;
userSel[i].chains[tempStr][k].y = null;
gridArr[i][tX][tY + 1].mc = null;
k++;
}
findMood();
userSel[i].chains[tempStr] = null;
userSel[i].chainNme.splice(j, 1);
tempLen2 = tempLen2 - 1;
j = j - 1;
}
}
j++;
}
if (RMVEDONE) {
userSel[i].combCunt.push(userSel[i].eggpop);
userSel[i].quake = true;
userSel[i].eggpop = 0;
userSel[i].gStatus = 2;
}
} else if (userSel[i].gStatus == 5) {
tempArr = new Array();
j = 0;
while (j < 27) {
tempArr[j] = ((j % 9) + "|") + Math.floor(j / 9);
j++;
}
tempLen = Math.min(27, userSel[i].eggLoad);
if (tempLen >= 18) {
ppic0.shake = true;
}
tempLen2 = 27;
tempStr = "";
j = 0;
while (j < tempLen) {
tempNum = Math.floor(Math.random() * tempLen2);
tempArr2 = tempArr[tempNum].split("|");
tX = Number(tempArr2[0]);
tY = Number(tempArr2[1]);
if (gridArr[i][tX][tY].mc == null) {
userSel[i].eggAmnt = userSel[i].eggAmnt + 1;
gridArr[i][tX][tY].mc = userSel[i].eggLayer.attachMovie("gloop", "gp" + userSel[i].nameCnt, 1 + userSel[i].nameCnt);
gridArr[i][tX][tY].mc._x = (tX * gridSize) + (gridSize * 0.5);
gridArr[i][tX][tY].mc._y = (tY * gridSize) + (gridSize * 0.5);
gridArr[i][tX][tY].mc.num = Math.floor(Math.random() * userSel[i].itemType) + 1;
gridArr[i][tX][tY].mc.gotoAndStop(gridArr[i][tX][tY].mc.num);
hideLink(gridArr[i][tX][tY].mc);
gridArr[i][tX][tY].mc.activeD = true;
gridArr[i][tX][tY].mc.sy = tY;
userSel[i].newEggs.push(tX);
userSel[i].newEggs.push(tY);
userSel[i].nameCnt = userSel[i].nameCnt + 1;
userSel[i].eggLoad = userSel[i].eggLoad - 1;
tempStr = tempStr + (((((tX + "-") + tY) + "-") + gridArr[i][tX][tY].mc.num) + "-");
}
tempArr.splice(tempNum, 1);
tempLen2 = tempLen2 - 1;
j++;
}
findMood();
if (tempStr.length > 0) {
sendStr(String("cegg_" + tempStr.substr(0, tempStr.length - 1)));
}
updWIco();
userSel[i].gStatus = 2;
userSel[i].dropped = true;
} else if (userSel[i].gStatus == 10) {
if (!gOver) {
if (i == 0) {
sendStr(String("gover_melost"));
ppic0.mood = 3;
ppic0.laugh = false;
ppic0.shake = false;
ppic1.mood = 1;
ppic1.laugh = true;
ppic1.shake = false;
if (gOreason == "disconnected") {
if (Math.floor(userSel[i].time / _fps) < 30) {
winG = true;
stopCon = true;
ppic0.mood = 0;
ppic0.laugh = false;
ppic0.shake = false;
ppic0.mood = 0;
ppic0.laugh = false;
ppic0.shake = false;
} else {
winG = true;
gOreason == "You won!";
ppic0.mood = 1;
ppic0.laugh = true;
ppic0.shake = false;
ppic1.mood = 3;
ppic1.laugh = false;
ppic1.shake = false;
}
} else if (gOreason == "You won!") {
winG = true;
gOreason = "Draw!";
ppic0.mood = 0;
ppic0.laugh = false;
ppic0.shake = false;
ppic1.mood = 0;
ppic1.laugh = false;
ppic1.shake = false;
} else {
winG = false;
gOreason = "You lost!";
ppic0.mood = 3;
ppic0.laugh = false;
ppic0.shake = false;
ppic1.mood = 1;
ppic1.laugh = true;
ppic1.shake = false;
}
gg.txt._visible = true;
qbttn._visible = false;
gg.txt.text = gOreason;
gg.gotoAndPlay(2);
gOver = true;
}
}
if (!cleanUp) {
i2 = 0;
while (i2 < userLen) {
if (userSel[i2].eggFalln._visible) {
userSel[i2].eggFalln._visible = false;
}
tempBoo = true;
while (tempBoo && ((userSel[i2].clnLine < 19) || (userSel[i2].cntDwn != 0))) {
if (userSel[i2].cntDwn == 0) {
j = 0;
while (j < 9) {
if (gridArr[i2][j][userSel[i2].clnLine].mc != null) {
if (winG || (i2 != 0)) {
tempNum = gridArr[i2][j][userSel[i2].clnLine].mc.num - 1;
exppnt[tempNum] = exppnt[tempNum] + 1;
scorePan["beam" + (tempNum + 1)]._width = getWidth(exppnts[tempNum] + userSel[i].colPop[tempNum], egglock[tempNum], 50);
}
if (gridArr[i2][j][userSel[i2].clnLine].mc.links != undefined) {
l = gridArr[i2][j][userSel[i2].clnLine].mc.links.length - 1;
while (l >= 0) {
if (gridArr[i2][j][userSel[i2].clnLine].mc.links[l] != null) {
removeMovieClip(gridArr[i2][j][userSel[i2].clnLine].mc.links[l]);
}
l--;
}
gridArr[i2][j][userSel[i2].clnLine].mc.links = null;
}
addfx("beans", gridArr[i2][j][userSel[i2].clnLine].mc, null, 3);
gridArr[i2][j][userSel[i2].clnLine].mc.gotoAndStop(gridArr[i2][j][userSel[i2].clnLine].mc.num + 10);
userSel[i2].cntDwn = 1;
tempBoo = false;
}
j++;
}
userSel[i2].clnLine = userSel[i2].clnLine + 1;
} else if (userSel[i2].cntDwn > 5) {
j = 0;
while (j < 9) {
if (gridArr[i2][j][userSel[i2].clnLine - 1].mc != null) {
removeMovieClip(gridArr[i2][j][userSel[i2].clnLine - 1].mc);
tempBoo = false;
}
j++;
}
userSel[i2].cntDwn = 0;
tempBoo = false;
} else {
userSel[i2].cntDwn = userSel[i2].cntDwn + 1;
tempBoo = false;
}
}
i2++;
}
if (((((userSel[0].clnLine >= 19) && tempBoo) && (userSel[1].clnLine >= 19)) && (userSel[0].cntDwn == 0)) && (userSel[1].cntDwn == 0)) {
cleanUp = true;
}
}
}
i++;
}
}
tempLen = fx_arr.length;
i = 0;
while (i < tempLen) {
if (fx_arr[i] == null) {
fx_arr.splice(i, 1);
i = i - 1;
tempLen = tempLen - 1;
} else {
if (fx_arr[i].slow != undefined) {
fx_arr[i].forcex = fx_arr[i].forcex * fx_arr[i].slow;
fx_arr[i].forcey = fx_arr[i].forcey * fx_arr[i].slow;
fx_arr[i]._xscale = (fx_arr[i]._xscale * 0.3) + (fx_arr[i]._yscale * 0.7);
}
if (fx_arr[i].gravity != undefined) {
fx_arr[i].forcey = fx_arr[i].forcey + fx_arr[i].gravity;
}
if (fx_arr[i].rotforce != undefined) {
fx_arr[i]._rotation = fx_arr[i]._rotation + fx_arr[i].rotforce;
}
fx_arr[i]._x = fx_arr[i]._x + fx_arr[i].forcex;
fx_arr[i]._y = fx_arr[i]._y + fx_arr[i].forcey;
if (fx_arr[i].ground != undefined) {
if (fx_arr[i]._y > fx_arr[i].ground) {
addfx("splats", fx_arr[i]);
removeMovieClip(fx_arr[i]);
fx_arr.splice(i, 1);
i = i - 1;
tempLen = tempLen - 1;
}
}
}
i++;
}
};
gstart = false;
gridArr = new Array();
gridSize = 18;
gOver = false;
gOreason = "";
cleanUp = false;
lookFor = new Object();
lookFor.action = "";
lookFor.at = 0;
userSel = new Array();
userLen = 2;
user2 = true;
i = 0;
while (i < userLen) {
userSel[i] = new Object();
userSel[i].dropT = 0;
userSel[i].moveT = 0;
userSel[i].itemNow = 1;
userSel[i].lastNum = 0;
userSel[i].numRow = 0;
userSel[i].ranNum = ranNum;
userSel[i].gspeed = 5;
userSel[i].eggsDrop = 0;
userSel[i].startX = 4;
userSel[i].startY = -1;
userSel[i].newEggs = new Array();
userSel[i].chains = new Array();
userSel[i].chainNme = new Array();
userSel[i].chainCnt = 0;
userSel[i].checkNum = 0;
userSel[i].eggLoad = 0;
userSel[i].eggAmnt = 0;
userSel[i].stall = true;
userSel[i].itemType = 9;
userSel[i].glayer = glayer.createEmptyMovieClip("gl" + i, glayer.getNextHighestDepth());
userSel[i].glayer._x = (2 + (18 * i)) * gridSize;
userSel[i].glayer._y = gridSize;
userSel[i].eggLayer = userSel[i].glayer.createEmptyMovieClip("eggl", 1);
userSel[i].eggFalln = userSel[i].glayer.createEmptyMovieClip("deggP", 2);
userSel[i].eggFalln.attachMovie("gloop", "egg1", 1);
userSel[i].eggFalln.attachMovie("gloop", "egg2", 2);
userSel[i].eggFalln.egg2._y = gridSize;
userSel[i].eggFalln.egg1.gotoAndStop(10);
userSel[i].eggFalln.egg2.gotoAndStop(10);
userSel[i].prevEgg = userSel[i].glayer.createEmptyMovieClip("prevEggX", 3);
userSel[i].prevEgg._x = (((i == 0) ? 10 : -2) + 0.5) * gridSize;
userSel[i].prevEgg._y = 1.5 * gridSize;
userSel[i].prevEgg.attachMovie("gloop", "egg1", 1);
userSel[i].prevEgg.attachMovie("gloop", "egg2", 2);
userSel[i].prevEgg.egg1._y = gridSize;
userSel[i].prevEgg.egg1.gotoAndStop(10);
userSel[i].prevEgg.egg2.gotoAndStop(10);
userSel[i].nameCnt = 0;
if (i == 1) {
userSel[i].speedUp = 1;
userSel[i].x_active = -27;
userSel[i].y_active = -27;
userSel[i].y_actNum = -1;
userSel[i].ang_actv = 1023;
userSel[i].gStatus = -1;
userSel[i].dropArr = new Array();
} else {
userSel[i].llayer = glayer.createEmptyMovieClip("link" + i, glayer.getNextHighestDepth());
userSel[i].lcount = 0;
userSel[i].llayer._x = (2 + (18 * i)) * gridSize;
userSel[i].llayer._y = gridSize;
userSel[i].quake = false;
userSel[i].dropped = false;
userSel[i].colPop = new Array();
userSel[i].lastTry = new Array();
j = 0;
while (j < 9) {
userSel[i].colPop[j] = 0;
userSel[i].lastTry[j] = exppnts[j];
j++;
}
userSel[i].time = 0;
userSel[i].points = 0;
userSel[i].eggpop = 0;
userSel[i].combCunt = new Array();
userSel[i].gStatus = 0;
j = 1;
while (j < 10) {
scorePan.attachMovie("eggbeam", "beam" + j, 80 + j);
scorePan["beam" + j].gotoAndStop(j);
scorePan["beam" + j]._x = 15;
scorePan["beam" + j]._y = 35 + (7 * (j - 1));
scorePan["beam" + j]._width = getWidth(exppnts[j - 1] + userSel[i].colPop[j - 1], egglock[j - 1], 50);
j++;
}
userSel[i].warnLayr = userSel[i].glayer.createEmptyMovieClip("eggWarn", 4);
userSel[i].warnArr = new Array();
}
gridArr[i] = new Array();
j = 0;
while (j < 9) {
gridArr[i][j] = new Array();
k = 0;
while (k < 19) {
gridArr[i][j][k] = new Object();
gridArr[i][j][k].mc = null;
k++;
}
j++;
}
userSel[i].clnLine = 0;
userSel[i].cntDwn = 0;
i++;
}
winG = false;
fxl = createEmptyMovieClip("fxl", this.getNextHighestDepth());
fx_num = 0;
fx_arr = new Array();
Frame 15
gotoAndStop (16);
Frame 19
gotoAndStop (16);
Frame 20
gotoAndStop ("menu");
Frame 21
if (avatNum != "NONE") {
loadMovie (String((((servStr + "playpic/playpic") + avatNum) + avatarPic) + ".swf"), ppic0);
} else {
gotoAndStop ("menu");
}
ppic0.mood = 0;
ppic0.shake = false;
ppic0.laugh = false;
stop();
Frame 30
gotoAndStop ("menu");
Symbol 11 MovieClip Frame 48
if (Math.random() < 0.86) {
gotoAndPlay (1);
}
Symbol 19 MovieClip Frame 48
if (Math.random() < 0.86) {
gotoAndPlay (1);
}
Symbol 58 MovieClip Frame 7
stop();
Symbol 63 MovieClip Frame 7
stop();
Symbol 70 MovieClip [splashx2] Frame 6
removeMovieClip(this);
Symbol 76 MovieClip [splashx1] Frame 6
removeMovieClip(this);
Symbol 91 MovieClip Frame 9
removeMovieClip(_parent);
Symbol 99 MovieClip [spark4] Frame 7
removeMovieClip(this);
Symbol 104 MovieClip [spark3] Frame 5
removeMovieClip(this);
Symbol 109 MovieClip [spark2] Frame 5
removeMovieClip(this);
Symbol 122 MovieClip [spark1] Frame 13
removeMovieClip(this);
Instance of Symbol 140 MovieClip "clickBtn" in Symbol 145 MovieClip Frame 1
onClipEvent (load) {
this._alpha = 0;
}
Instance of Symbol 147 MovieClip in Symbol 148 MovieClip Frame 1
on (release) {
_parent._parent.idSel = "";
tempLen = _parent.conItems.length;
i = 0;
while (i < tempLen) {
_parent.conItems[i].clickBtn._alpha = 0;
i++;
}
}
Symbol 170 Button
on (release) {
if (_parent.setPanel.avatar.text == "SANDY") {
_parent.avatNum = "SANDY";
} else if (_parent.setPanel.avatar.text == "LISA") {
_parent.avatNum = "LISA";
} else {
_parent.avatNum = "NONE";
}
_parent.avatarPic = "";
_parent.gotoAndStop("avatarPlayer");
}
Symbol 171 Button
on (release) {
if (_parent.setPanel.avatar.text == "SANDY") {
_parent.avatNum = "SANDY";
} else if (_parent.setPanel.avatar.text == "LISA") {
_parent.avatNum = "LISA";
} else {
_parent.avatNum = "NONE";
}
_parent.avatarPic = "_COLORB";
_parent.gotoAndStop("avatarPlayer");
}
Symbol 183 MovieClip Frame 11
stop();
Symbol 183 MovieClip Frame 28
stop();
Symbol 199 MovieClip Frame 25
_parent.gotoAndStop(_parent._currentframe + 1);
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 3
if (Math.random() > 0.5) {
gotoAndPlay (5);
} else {
gotoAndPlay (8);
}
Symbol 224 MovieClip Frame 7
gotoAndStop (1);
Symbol 224 MovieClip Frame 11
gotoAndStop (1);
Symbol 224 MovieClip Frame 16
gotoAndStop (1);
Symbol 224 MovieClip Frame 21
gotoAndStop (1);
Symbol 224 MovieClip Frame 26
gotoAndStop (1);
Symbol 224 MovieClip Frame 30
gotoAndStop (1);
Symbol 224 MovieClip Frame 35
gotoAndStop (1);
Symbol 224 MovieClip Frame 40
gotoAndStop (1);
Symbol 224 MovieClip Frame 45
gotoAndStop (1);
Symbol 224 MovieClip Frame 50
gotoAndStop (1);
Symbol 266 MovieClip Frame 11
cntDown = 7;
Instance of Symbol 256 MovieClip in Symbol 266 MovieClip Frame 12
on (release) {
if (!_parent._parent.p1start) {
_parent._parent.p1start = true;
_parent._parent.sendStr(String("startg"));
if (_parent._parent.p2start) {
_parent._visible = false;
_parent._parent.gstart = true;
_parent.gotoAndStop("waitscr");
} else {
_parent.gotoAndStop("waitscr");
}
}
}
Symbol 266 MovieClip Frame 26
if (cntDown > 0) {
cntDown = cntDown - 1;
numsmc.nums.text = cntDown;
gotoAndPlay ("loopA");
} else if (!_parent.p1start) {
_parent.p1start = true;
_parent.sendStr(String("startg"));
if (_parent.p2start) {
_visible = false;
_parent.gstart = true;
gotoAndStop ("waitscr");
} else {
gotoAndStop ("waitscr");
}
}
Symbol 273 MovieClip Frame 1
txt._visible = false;
stop();
Symbol 273 MovieClip Frame 12
stop();
Instance of Symbol 272 MovieClip in Symbol 273 MovieClip Frame 12
on (release) {
if (_parent._parent.selftest) {
_parent._parent.destroyGame();
} else {
_parent._parent.stopCon = true;
this.onEnterFrame = function () {
if (_parent._parent.stopCon) {
if (!_parent._parent.sending) {
if (_parent.sendCool <= 0) {
this.v = new LoadVars();
_parent._parent.sending = true;
_parent._parent.sendCool = _parent._parent._fps * _parent._parent.conspeed;
this.v.myid = String(_parent._parent.conID);
this.v.mypass = String(_parent._parent.conPASS);
this.v.conwith = String(_parent._parent.idSel);
this.v.doit = 3;
this.v.leftmsg = escape(_parent._parent.lmsg);
tempLen = _parent._parent.exppnts.length;
if (tempLen > 0) {
tempStr = "";
i = 0;
while (i < tempLen) {
tempStr = tempStr + ((_parent._parent.exppnts[i] + _parent._parent.userSel[0].colPop[i]) + "-");
i++;
}
tempStr = tempStr.substr(0, tempStr.length - 1);
this.v.score = tempStr;
}
tempLen = _parent._parent.egglock.length;
if (tempLen > 0) {
tempStr = "";
i = 0;
while (i < tempLen) {
tempStr = tempStr + _parent._parent.egglock[i];
i++;
}
this.v.egglock = tempStr;
}
this.v.onLoad = function (geladen) {
if (geladen) {
_parent._parent.onEnterFrame = null;
_parent._parent.gotoAndPlay(1);
} else {
_parent._parent.sending = false;
}
};
this.v.sendAndLoad(String(_parent._parent.servStr + "setid.php"), v, "POST");
} else {
_parent.sendCool = _parent.sendCool - 1;
}
}
}
};
}
}
Symbol 280 MovieClip Frame 129
gotoAndPlay (1);
Symbol 282 Button
on (release) {
ppic0.mood = 0;
ppic0.shake = false;
ppic0.laugh = false;
ppic0.gotoAndPlay(1);
moodtxt.text = ppic0.mood;
}
Symbol 285 Button
on (release) {
ppic0.shake = true;
}
Symbol 289 Button
on (release) {
ppic0.laugh = true;
}
Symbol 290 Button
on (release) {
if (ppic0.mood == undefined) {
ppic0.mood = 0;
}
if (ppic0.mood < 3) {
ppic0.mood = ppic0.mood + 1;
}
moodtxt.text = ppic0.mood;
}
Symbol 291 Button
on (release) {
if (ppic0.mood == undefined) {
ppic0.mood = 0;
}
if ((ppic0.mood > 0) && (ppic0.mood < 3)) {
ppic0.mood = ppic0.mood - 1;
}
moodtxt.text = ppic0.mood;
}