Frame 2
function startup() {
if (a) {
return(undefined);
}
a = true;
b = new c();
d = new f();
g = new h();
random = new Random();
i = new j();
}
function c() {
var k = new Array();
var l = 0;
this.m = function (object) {
var _local2 = object;
if (typeof(_local2.n) == "function") {
if (_local2.o) {
l--;
}
_local2.o = false;
var _local1 = 0;
while (_local1 < k.length) {
if (k[_local1] == _local2) {
return;
}
_local1++;
}
k.push(_local2);
} else {
q("tried to run bad object!");
r(_local2);
}
};
this.s = function (object) {
var _local2 = object;
var _local1 = 0;
while (_local1 < k.length) {
if (k[_local1] == _local2) {
l++;
k[_local1].o = true;
return;
}
_local1++;
}
};
onEnterFrame = function () {
var _local2 = k;
var _local1 = 0;
while (_local1 < _local2.length) {
if (!_local2[_local1].o) {
_local2[_local1].n();
}
_local1++;
}
if (l > 0) {
_local1 = 0;
while (_local1 < k.length) {
if (k[_local1].o) {
k[_local1].o = false;
k.splice(_local1, 1);
_local1--;
l--;
}
_local1++;
}
}
};
}
function f() {
var u = createEmptyMovieClip("sprite_root", 0);
var v = 500;
var w = new Array(v);
var _local1 = 0;
while (_local1 < v) {
w[_local1] = v - _local1;
_local1++;
}
this.x = function () {
return(w.length);
};
this.y = function (z) {
var _local1 = z;
var _local3 = w.pop() + (v * 4);
var ad = ("sp" + _local3);
var ae = (_local1.af ? (_local1.af) : (u));
var _local2;
if (typeof(_local1.ah) == "string") {
_local2 = ae.attachMovie(_local1.ah, ad, _local3);
} else {
_local2 = ae.createEmptyMovieClip(ad, _local3);
}
_local2._x = ((typeof(_local1.ai) == "number") ? (_local1.ai) : 0);
_local2._y = ((typeof(_local1.aj) == "number") ? (_local1.aj) : 0);
if (typeof(_local1.width) == "number") {
_local2._width = _local1.width;
}
if (typeof(_local1.height) == "number") {
_local2._height = _local1.height;
}
if (typeof(_local1.ak) == "number") {
_local2._xscale = _local1.ak;
}
if (typeof(_local1.al) == "number") {
_local2._yscale = _local1.al;
}
_local2._visible = ((typeof(_local1.am) == "boolean") ? (_local1.am) : true);
_local2._alpha = ((typeof(_local1.an) == "number") ? (_local1.an) : 100);
_local2.ao = _local3;
_local2.ap = function (aq) {
var _local1 = this;
var ar = _local1.ao;
var _local2 = ((aq - 1) * v) + (_local1.ao % v);
_local1.swapDepths(_local2);
_local1.ao = _local2;
};
if (typeof(_local1.at) == "number") {
_local2.ap(_local1.at);
}
return(_local2);
};
this.au = function (av) {
var _local2 = av;
if (!_local2.ao) {
} else {
var _local1 = _local2.ao % v;
_local2.removeMovieClip();
w.push(_local1);
return(_local1);
}
return(undefined);
};
this.sort = function (aw, ax) {
var _local3 = aw;
var _local2 = [];
var _local1 = 0;
while (_local1 < _local3.length) {
_local2.push(_local3[_local1].getDepth());
_local1++;
}
var ay = function (az, bc) {
if (az < bc) {
return(-1);
}
if (az > bc) {
return(1);
}
return(0);
};
var bd = function (az, bc) {
if (az > bc) {
return(-1);
}
if (az < bc) {
return(1);
}
return(0);
};
_local2.sort(((ax == true) ? (bd) : (ay)));
_local1 = 0;
while (_local1 < _local2.length) {
_local3[_local1].swapDepths(_local2[_local1]);
_local3[_local1].ao = _local2[_local1];
_local1++;
}
};
}
function h() {
var _local2 = ["card_sound_2.aif", "card_sound_6.aif", "click_sound_2.aif", "game_over.aif", "game_win.aif", "next_round.aif", "stick.aif", "tone_a.aif", "tone_b.aif"];
var bf = createEmptyMovieClip("sound_fx_base", -1);
var bg = 0;
var bh = new Object();
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = new Sound(bf.createEmptyMovieClip("sound_" + (_local1 + 1), (-_local1) - 2));
_local3.attachSound(_local2[_local1]);
_local3.onSoundComplete = function () {
this.bj = false;
};
bh[_local2[_local1]] = _local3;
bh[_local2[_local1]].bj = false;
bh[_local2[_local1]].bk = _local2[_local1];
_local1++;
}
this.play = function (sound, bl, bm) {
var _local1 = sound;
if (bn == 1) {
} else {
if (bh[_local1].bj) {
if (bl) {
return;
}
this.stop(_local1);
}
bh[_local1].bj = true;
if (bm) {
bh[_local1].setVolume(bm);
} else {
bh[_local1].setVolume(100);
}
bh[_local1].start();
}
};
this.bo = function (sound, bm) {
var _local1 = sound;
if (bn == 1) {
} else if (bh[_local1].bj) {
} else {
bh[_local1].bj = true;
if (bm) {
bh[_local1].setVolume(bm);
} else {
bh[_local1].setVolume(100);
}
bh[_local1].start(0, 99);
}
};
this.stop = function (sound) {
bh[sound].stop();
bh[sound].bj = false;
};
}
function Random() {
var _local1 = this;
var bp = 0;
var bq = 0;
_local1.br = function (start, stop) {
var _local2 = stop - start;
var _local1 = Math.random() * (_local2 + 1);
_local1 = Math.floor(start + _local1);
return(Math.min(_local1, stop));
};
_local1.bu = function (bi) {
bp = bi & 65535;
bq = bp;
};
_local1.bv = function (start, stop) {
var _local2 = stop - start;
var _local1 = this.bw() * (_local2 + 1);
_local1 = Math.floor(start + _local1);
return(Math.min(_local1, stop));
};
_local1.bx = function (start, stop) {
var _local2 = stop - start;
var _local1 = this.by() * (_local2 + 1);
_local1 = Math.floor(start + _local1);
return(Math.min(_local1, stop));
};
_local1.bw = function () {
bp = ((bp * 732573) + 3545443) & 65535;
var _local1 = bp / 65536;
return(_local1);
};
_local1.by = function () {
bq = ((bq * 732573) + 3545443) & 65535;
var _local1 = bq / 65536;
return(_local1);
};
}
function q() {
var _local2 = arguments;
var _local3 = "> ";
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + _local2[_local1];
_local1++;
if (_local2.length != _local1) {
_local3 = _local3 + " ";
}
}
trace(_local3);
if (cb) {
i.cc.cd(("LOG " + i.ce.cf.cg) + _local3);
}
}
function r(ch, ci) {
var _local1 = ch;
var _local3 = ci;
function cj(ch, ci, ck) {
var _local1 = ch;
var _local2 = ck;
var _local3 = ci;
_local2 = ((typeof(_local2) == "string") ? (_local2 + ".") : "");
for (var cl in _local1) {
trace(((_local2 + cl) + ": ") + _local1[cl]);
if (_local3) {
if (typeof(_local1[cl]) == "object") {
cj(_local1[cl], _local3, _local2 + cl);
}
}
}
}
trace("--- Obj dump: ---------");
cj(_local1, _local3);
trace("-----------------------");
}
function cm(width, cn) {
var _local2 = "";
var _local3 = ((typeof(cn) != "string") ? " " : (cn));
var _local1 = 0;
while (_local1 < width) {
_local2 = _local2 + _local3;
_local1++;
}
return(_local2);
}
function cq(cr) {
var cs = [];
var _local2 = false;
var _local1 = "";
var _local3;
var p = 0;
while (p < cr.length) {
_local3 = cr.substr(p, 1);
if ((_local3 == "\"") && (!_local2)) {
_local2 = true;
} else if ((_local3 == " ") && (!_local2)) {
if (_local1 != "") {
cs.push(_local1);
_local1 = "";
}
} else if ((_local3 == "\"") && (_local2)) {
_local2 = false;
cs.push(_local1);
_local1 = "";
} else {
_local1 = _local1 + _local3;
}
p++;
}
if (_local1 != "") {
cs.push(_local1);
}
return(cs);
}
function j(z) {
var _local1 = this;
_local1.cz = 0;
_local1.width = 752;
_local1.height = 550;
_local1.da = false;
_local1.db = false;
_local1.dc = function (z) {
var _local1 = this;
i = _local1;
b.m(_local1);
_local1.gamedata = new dd({parent:_local1});
_local1.de = new df({parent:_local1});
_local1.ce = new dg();
_local1.cc = new dh({parent:_local1});
_local1.di = new dj();
_local1.dk = new dl();
_local1.cc.dm("MCC", _local1);
_local1.cc.dm("MSG", _local1);
};
_local1.n = function () {
this.cz++;
};
_local1.dn = function () {
var _local1 = this;
_local1.de.dp();
_local1.cc.connect(_local1.gamedata.mp);
};
_local1.dq = function (dr) {
this.dk.dq(dr);
};
_local1.ds = function (dr) {
this.dk.ds(dr);
};
_local1.dt = function (du) {
var _local1 = this;
var _local2 = du;
q("game.remove_player()", _local2);
if (!_local1.db) {
_local1.de.dv(_local1.gamedata.text.opponent_disconnect);
_local1.ce.dw[_local2].dx.dy._visible = false;
}
if (!_local1.da) {
_local1.dz("opponent_disconnect");
} else if (_local1.ce.cf.ea == _local1.ce.dw[_local2].ea) {
_local1.dz("teammate_disconnect");
} else {
_local1.dz("opponent_disconnect");
}
};
_local1.eb = function () {
var _local2 = this;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.ce.dw.length) {
if (_local2.ce.dw[_local1]) {
_local3++;
}
_local1++;
}
if (_local3 < _local2.dk.ed()) {
_local2.dt(-1);
} else {
_local2.cc.ee();
new ef({eg:2, eh:_local2.cc.ei, ej:_local2.cc});
new ef({eg:0.4, eh:_local2.de.ek, ej:_local2.de});
new ef({eg:1, eh:_local2.el, ej:_local2});
}
};
_local1.el = function () {
var _local1 = this;
_local1.em = new en();
_local1.em.start(_local1.ce.dw);
_local1.dk.eb();
};
_local1.eo = function (ep) {
};
_local1.er = function () {
var _local1 = this;
if (_local1.db) {
} else {
fscommand ("gameStart");
_local1.da = true;
_local1.de.es();
_local1.de.et();
_local1.de.eu.ev();
new ef({eg:1.5, eh:_local1.de.ew.show, ej:_local1.de.ew});
_local1.ce.ex();
new ef({eg:1, eh:_local1.dk.ey, ej:_local1.dk});
}
};
_local1.ez = function () {
new ef({eg:1.7, eh:i.de.fa, ej:i.de});
};
_local1.dz = function (fb) {
var _local1 = this;
if (_local1.db) {
} else {
_local1.db = true;
var _local3 = (_local1.ce.cf.fc ? 1000 : 500);
if (fb == "disconnected") {
_local3 = 0;
} else if (fb == "teammate_disconnect") {
_local3 = 500;
} else if (fb == "opponent_disconnect") {
_local3 = 1000;
}
_local1.ce.fd();
_local1.de.fd();
if (_local1.em.fe) {
_local1.em.fd();
}
fscommand ("gameEnd", _local3);
var ff = function () {
this.cc.fg();
q("quit");
fscommand ("gameQuit");
};
var _local2 = parseInt(i.gamedata.postdelay);
if (isNaN(_local2)) {
_local2 = 0;
}
_local2 = _local2 + 2;
new ef({eg:_local2, eh:ff, ej:_local1});
}
};
_local1.fi = function () {
return(this.dk.fi());
};
_local1.fj = function (fk, fl) {
var _local1 = this;
if (cy) {
q("game.networkServerEvent()", fk, fl);
}
switch (fk) {
case "STR" :
_local1.dk.fm();
return;
case "STJ" :
var _local2 = fl.split(",");
var fn = parseInt(_local2[0]);
var fo = parseInt(_local2[1]);
_local1.dk.fp(fn, fo);
return;
case "STD" :
_local1.dk.er();
return;
case "SDC" :
_local2 = fl.split(",", 2);
var fq = parseInt(_local2[0]);
var _local3 = _local2[1];
_local1.dk.fs(fq, _local3);
}
};
_local1.ft = function (fk, cg, di) {
var _local1 = cg;
var _local2 = this;
var _local3 = di;
if (cy) {
q("game.networkGameEvent()", fk, _local1, _local3);
}
switch (fk) {
case "GPC" :
var cs = _local3.split(",");
var index = parseInt(cs[0]);
var fr = cs[1];
_local2.dk.fu(_local1, index, fr);
return;
case "GGT" :
_local2.dk.fv(_local1);
return;
case "GST" :
_local2.dk.fw(_local3);
return;
case "GNR" :
_local2.dk.fx(_local1);
return;
case "GMO" :
_local2.ce.dw[_local1].fy.fz(parseInt(_local3));
}
};
_local1.gc = function (fk, fl) {
var _local1 = fl;
if (cy) {
q("game.networkEvent()", fk, _local1);
}
switch (fk) {
case "MCC" :
if (gd) {
gd.hm("MCC " + _local1);
}
return;
case "MSG" :
if (!this.de.ew) {
break;
}
this.de.ew.gf(_local1);
}
};
_local1.gg = function (gh) {
var _local1 = this;
if (_local1.db) {
} else {
_local1.dz("disconnected");
_local1.de.dv(_local1.gamedata.text[gh]);
_local1.de.ek();
}
};
_local1.dc(z);
}
function dd(z) {
var _local3 = this;
_local3.gi = false;
_local3.dc = function (z) {
var _local1 = this;
_local1.parent = z.parent;
b.m(_local1);
if (cw) {
_local1.gj();
}
};
_local3.n = function () {
if (gameData != undefined) {
this.gk(gameData);
b.s(this);
}
};
_local3.gk = function (gl) {
var _local1 = this;
_local1.gm(gl);
_local1.gi = true;
_local1.parent.dn();
};
_local3.gm = function (gl) {
var _local3 = this;
_local3.settings = {};
_local3.text = {};
_local3.mp = {};
var gn = new XML();
gn.ignoreWhite = true;
gn.parseXML(gl);
var gp = gn.firstChild.attributes;
for (var cl in gp) {
_local3[cl] = gp[cl];
}
var _local2 = gn.firstChild.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == "text") {
_local3.text[_local2[_local1].attributes.id] = _local2[_local1].firstChild.nodeValue;
} else if (_local2[_local1].nodeName == "multiplayer") {
for (var cl in _local2[_local1].attributes) {
_local3.mp[cl] = _local2[_local1].attributes[cl];
}
} else if (_local2[_local1].nodeName == "settings") {
for (var cl in _local2[_local1].attributes) {
_local3.settings[cl] = _local2[_local1].attributes[cl];
}
}
_local1++;
}
};
_local3.gj = function () {
var _local1 = new XML();
_local1.ignoreWhite = true;
_local1.onData = function (src) {
gameData = src;
};
_local1.load("xml/gamedata.xml");
};
_local3.dc(z);
}
function dl(z) {
var _local2 = this;
var dw;
var cf;
var gs;
var ex;
var ep;
var gu;
var gv;
var gw = 4;
var gx = 2;
var gy = 3;
var gz = false;
var ha = false;
var hb = random.bv(0, gw - 1);
var hc = 0;
var hd = null;
var he = {};
he["2"] = 0;
he["3"] = 10;
he["4"] = 0;
he["5"] = 0;
he["6"] = 0;
he["7"] = 0;
he["8"] = 0;
he["9"] = 0;
he.T = 0;
he.J = 2;
he.Q = 3;
he.K = 4;
he.A = 11;
var hf = {};
hf["2"] = 2;
hf["3"] = 3;
hf["4"] = 4;
hf["5"] = 5;
hf["6"] = 6;
hf["7"] = 7;
hf["8"] = 8;
hf["9"] = 9;
hf.T = 10;
hf.J = 11;
hf.Q = 12;
hf.K = 13;
hf.A = 14;
_local2.dc = function (z) {
dw = i.ce.dw;
this.hg = -1;
gu = [0, 1, 2, 3];
gv = hb;
gs = gu[gv];
};
_local2.fs = function (fq, fr) {
var _local1 = fr;
if (hc == gw) {
if (cf.hh) {
this.fw(_local1);
i.cc.cd((("GST " + cf.cg) + ",") + _local1);
}
} else {
dw[fq].fs(_local1);
i.cc.ee();
new ef({eh:i.cc.ei, ej:i.cc, eg:0.2});
}
if (hc < (gw + 1)) {
hc++;
}
};
_local2.fw = function (fr) {
i.ce.hi.fw(fr);
this.eo();
hd = i.ce.hi.hj.color;
i.cc.ee();
new ef({eg:1.2, eh:i.cc.ei, ej:i.cc});
};
_local2.hk = function (fy, hl) {
var _local1 = hl;
var _local2 = fy;
if (cf.cg != gs) {
} else {
var hm = _local2.hn(_local1);
_local2.ho(_local1);
_local1.gu = gv;
i.ce.hp.hq(_local1, _local2.parent);
i.cc.cd(((((("GPC " + cf.cg) + ",") + hm) + ",") + _local1.value) + _local1.color);
if (i.ce.hi.hr() > 1) {
i.cc.cd(("JRC " + cf.cg) + ",1");
i.cc.ee();
new ef({eh:i.cc.ei, ej:i.cc, eg:0.2});
} else if (i.ce.hi.hr() == 1) {
var _local3 = i.ce.hi.ht();
cf.hu(_local3);
i.cc.cd("GGT " + cf.cg);
}
this.hv();
}
};
_local2.fu = function (hw, hm, hx) {
var _local2 = dw[hw].fy;
var _local1 = _local2.hy(hm);
_local2.ho(_local1);
_local1.hz({color:hx.charAt(1), value:hx.charAt(0)});
_local1.ia();
_local1.gu = gv;
i.ce.hp.hq(_local1, _local2.parent);
this.hv();
i.cc.ee();
new ef({eh:i.cc.ei, ej:i.cc, eg:0.2});
};
_local2.hv = function () {
var _local1 = this;
var _local2 = i.ce.hp;
if (_local2.ib() == dw.length) {
_local1.ic();
if (cf.fy.id() == 0) {
_local1.ez();
}
} else {
_local1.ie();
}
};
_local2.ic = function () {
var hp = i.ce.hp;
var _local2 = hp.ih();
hp.ii();
var ij = -1;
var ik = -1;
var il = _local2[0].color;
var im = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = 0;
if ((_local2[_local1].color == il) || (_local2[_local1].color == hd)) {
_local3 = _local3 + (he[_local2[_local1].value] * 100);
_local3 = _local3 + hf[_local2[_local1].value];
_local3 = _local3 * ((_local2[_local1].color == hd) ? 10000 : 1);
}
im = im + he[_local2[_local1].value];
if (_local3 > ij) {
ij = _local3;
ik = _local2[_local1].gu;
ip = 1;
} else if (_local3 > ij) {
ip++;
}
_local1++;
}
var iq = gu[ik];
dw[iq].ir(_local2);
dw[iq].is[ep] = dw[iq].is[ep] + im;
var ff = function () {
i.de.it(this.cn.iu, this.bi);
if (i.ce.cf.cg == iq) {
g.play("stick.aif");
}
};
new ef({eg:1.4, eh:ff, ej:{cn:dw[iq], bi:dw[iq].is[ep]}});
this.ie(ik, 0.6);
};
_local2.eb = function () {
ep = (ex = 0);
};
_local2.eo = function () {
ep = ex;
gv = hb;
gs = gu[gv];
dw[gs].iv();
var _local1 = 0;
while (_local1 < dw.length) {
dw[_local1].is[ep] = 0;
i.de.it(dw[_local1].iu, 0);
_local1++;
}
i.eo(ep);
};
_local2.ez = function () {
hc = 0;
var _local1 = 0;
while (_local1 < dw.length) {
dw[_local1].iw = false;
_local1++;
}
hb = (hb + 1) % gw;
ex++;
if (ex == gy) {
this.dz();
}
i.ez();
};
_local2.ix = function () {
var bi = i.dk.iy();
var _local2 = bi[ep];
var _local1 = cf.ea;
var _local3 = _local2[_local1] >= _local2[(_local1 + 1) % 2];
return(_local3);
};
_local2.jc = function () {
var _local2 = this.iy();
var _local3 = cf.ea;
var jd = 0;
var je = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
jd = jd + _local2[_local1][_local3];
je = je + _local2[_local1][(_local3 + 1) % 2];
_local1++;
}
return(jd >= je);
};
_local2.dz = function () {
gz = true;
var _local3 = this.iy();
var _local2 = 0;
var _local1 = 0;
while (_local1 < gx) {
_local2 = Math.max(_local2, _local3[gy][_local1]);
_local1++;
}
if (_local2 == _local3[gy][cf.ea]) {
cf.fc = true;
}
_local1 = 0;
while (_local1 < dw.length) {
dw[_local1].iw = false;
_local1++;
}
i.dz();
};
_local2.fi = function () {
return(gz);
};
_local2.jh = function () {
i.cc.cd("GNR " + cf.cg);
this.fx(cf.cg);
};
_local2.fx = function (cg) {
dw[cg].iw = true;
i.ce.dw[cg].dx.dy._visible = true;
var _local2 = true;
var _local1 = 0;
while (_local1 < dw.length) {
_local2 = _local2 & dw[_local1].iw;
_local1++;
}
if (_local2) {
i.ce.ex();
this.ey();
}
};
_local2.ie = function (jj, jk) {
var _local1 = this;
dw[gs].jl();
if (typeof(jj) == "number") {
gv = jj;
} else {
gv = (gv + 1) % gu.length;
}
gs = gu[gv];
if (typeof(jk) == "number") {
new ef({eg:jk, eh:_local1.jm, ej:_local1});
} else {
new ef({eg:0.5, eh:_local1.jm, ej:_local1});
}
};
_local2.jm = function () {
dw[gs].iv();
};
_local2.dq = function (dr) {
var _local1 = i.ce.dq(dr);
_local1.is = [];
_local1.jo = 0;
cf = _local1;
};
_local2.ds = function (dr) {
var _local1 = i.ce.ds(dr);
_local1.jp = _local1.cg;
_local1.is = [];
};
_local2.fv = function (cg) {
var _local1 = i.ce.hi.ht();
dw[cg].hu(_local1);
};
_local2.jq = function () {
return(hd);
};
_local2.ey = function () {
dw[0].jr(true);
if (cf.hh) {
i.cc.cd("JRD");
var _local1 = 0;
while (_local1 < gu.length) {
var _local2 = gu[(_local1 + hb) % gu.length];
i.cc.cd((("JRC " + _local2) + ",") + 3);
_local1++;
}
i.cc.cd((("JRC " + cf.cg) + ",") + 1);
}
};
_local2.iy = function () {
var js = [];
js[gy] = [];
var _local3 = 0;
while (_local3 < gx) {
js[gy][_local3] = 0;
_local3++;
}
var _local1 = 0;
while (_local1 < gy) {
js[_local1] = [];
_local3 = 0;
while (_local3 < gx) {
js[_local1][_local3] = 0;
_local3++;
}
_local3 = 0;
while (_local3 < i.ce.dw.length) {
var _local2 = i.ce.dw[_local3];
js[_local1][_local2.ea] = js[_local1][_local2.ea] + _local2.is[_local1];
js[gy][_local2.ea] = js[gy][_local2.ea] + _local2.is[_local1];
_local3++;
}
_local1++;
}
return(js);
};
_local2.ju = function () {
return(ep);
};
_local2.jv = function () {
return(hb);
};
_local2.ed = function () {
return(gw);
};
_local2.jw = function () {
if (!ha) {
i.cc.cd("CIR");
ha = true;
}
};
_local2.jx = function () {
this.jy(99);
};
_local2.jy = function (hg) {
var _local1 = hg;
if (_local1 == cf.ea) {
return(false);
}
if (cf.jo < 1) {
cf.jo++;
this.hg = _local1;
i.cc.cd("JST " + _local1);
return(true);
}
return(false);
};
_local2.fm = function () {
cf.jo--;
this.hg = -1;
i.em.fp(cf.cg, cf.ea);
};
_local2.fp = function (fn, fo) {
cf.jo--;
dw[fn].jz(fo);
i.em.fp(fn, fo);
};
_local2.ka = function () {
q("rules.team_select_timeout()");
i.em.kb();
if ((cf.jo > 0) || (cf.ea < 0)) {
this.jy(99);
}
};
_local2.er = function () {
i.em.kc();
i.em.kb();
new ef({eg:0.8, eh:this.kd, ej:this});
i.cc.ee();
new ef({eg:2, eh:i.cc.ei, ej:i.cc});
};
_local2.kd = function () {
var _local3 = [0, 1];
var kf = [0, 0];
var _local2 = 0;
while (_local2 < dw.length) {
var _local1 = dw[_local2].ea;
gu[_local3[_local1]] = _local2;
dw[_local2].kg(_local3[_local1]);
_local3[_local1] = _local3[_local1] + 2;
kf[_local1]++;
_local2++;
}
if ((kf[0] != 2) || (kf[1] != 2)) {
i.em.hide();
i.dt(-1);
} else {
_local2 = 0;
while (_local2 < dw.length) {
var kh = (((dw[_local2].ki - cf.ki) + dw.length) % dw.length);
dw[_local2].kj(kh);
_local2++;
}
i.em.hide();
}
};
_local2.dc(z);
}
function df(z) {
var _local1 = this;
_local1.kk = "startup";
_local1.kl = 0;
_local1.km = [];
_local1.kn = [];
_local1.ko = [];
_local1.kp = [];
_local1.kq = [];
_local1.kr = {};
_local1.ks = null;
_local1.dc = function (z) {
var _local2 = this;
_local2.parent = z.parent;
_local2.kt = d.y({ah:"placeholders_gui", am:false});
var _local1;
var _local3 = 0;
while (_local3 < 4) {
_local1 = _local2.kt["player" + _local3];
_local2.kn.push([_local1._x, _local1._y, _local1._xscale, _local1._yscale]);
_local1 = _local2.kt["avatar" + _local3];
_local2.ko.push([_local1._x, _local1._y, _local1._xscale, _local1._yscale]);
_local3++;
}
_local1 = _local2.kt.emoticons;
_local2.kr.eu = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local1 = _local2.kt.hourglass;
_local2.kr.ku = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local1 = _local2.kt.score_board;
_local2.kr.kv = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local1 = _local2.kt.chat_icon;
_local2.kr.kw = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local1 = _local2.kt.chat_box;
_local2.kr.kx = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local3 = 0;
while (_local3 < 4) {
_local1 = _local2.kt["score_avatar" + _local3];
_local2.kp.push([_local1._x, _local1._y, _local1._xscale, _local1._yscale]);
_local3++;
}
d.au(_local2.kt);
_local2.kt = d.y({ah:"placeholders_instructions", am:false});
_local1 = _local2.kt.instructions;
_local2.kr.ky = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local1 = _local2.kt.statusbox;
_local2.kr.kz = [_local1._x, _local1._y, _local1._xscale, _local1._yscale];
_local3 = 0;
while (_local3 < 4) {
_local1 = _local2.kt["avatar" + _local3];
_local2.kq.push([_local1._x, _local1._y, _local1._xscale, _local1._yscale]);
_local3++;
}
d.au(_local2.kt);
_local2.la = d.y({ah:"bg_main", ai:0, aj:0});
_local2.la.bg_table._visible = false;
_local2.lb = d.y({ah:"bg_dark_plate", ai:0, aj:0, am:false});
_local2.lc = d.y({ah:"briscola_logo", ai:294, aj:20, am:false});
_local2.ld = d.y({ah:"briscola_logo_ligg", ai:306, aj:29, am:true});
_local2.lf = d.y({ah:"score_board", ai:_local2.kr.kv[0], aj:_local2.kr.kv[1], am:false, at:6});
_local2.lf.fe = false;
var lg = function () {
i.de.lh();
};
_local2.ks = new li({duration:10, lj:_local2.lf.next_round_counter, ff:lg, lk:"sec"});
_local2.eu = new ll({ai:_local2.kr.eu[0], aj:_local2.kr.eu[1]});
_local2.ku = new lm({ai:_local2.kr.ku[0], aj:_local2.kr.ku[1], scale:_local2.kr.ku[2]});
_local2.ew = new ln({lo:_local2.kr, lp:i.gamedata.text.chat_to_fast});
_local2.lq(4);
_local2.lr = d.y({ah:"alertbox", ai:0, aj:0, am:false, at:22});
_local2.lr.fe = false;
_local2.lr._x = (i.width * 0.5) - (_local2.lr._width / 2);
_local2.lr._y = (i.height * 0.43) - (_local2.lr._height / 2);
_local2.lr.ls = new lu();
};
_local1.lv = function () {
var _local1 = this;
_local1.ky = d.y({ah:"instructions", ai:_local1.kr.ky[0], aj:_local1.kr.ky[1]});
_local1.ky.fe = true;
_local1.ky.header.text = i.gamedata.text.instruction_header.toUpperCase();
_local1.ky.h1.text = i.gamedata.text.instruction_h1.toUpperCase();
_local1.ky.t1.text = i.gamedata.text.instruction_t1;
_local1.ky.h2.text = i.gamedata.text.instruction_h2.toUpperCase();
_local1.ky.t2.text = i.gamedata.text.instruction_t2;
_local1.ky.h3.text = i.gamedata.text.instruction_h3.toUpperCase();
_local1.ky.h4.text = i.gamedata.text.instruction_h4.toUpperCase();
_local1.ky.t4.text = i.gamedata.text.instruction_t4;
var _local2 = "";
_local2 = _local2 + (i.gamedata.text.ace + ":\n");
_local2 = _local2 + (i.gamedata.text.three + ":\n");
_local2 = _local2 + (i.gamedata.text.king + ":\n");
_local2 = _local2 + (i.gamedata.text.queen + ":\n");
_local2 = _local2 + (i.gamedata.text.jack + ":\n");
_local2 = _local2 + i.gamedata.text.instruction_t3;
_local1.ky.t3.text = _local2;
_local1.ky.t3b.text = "11\n10\n4\n3\n2";
_local1.ky.t3c.text = cm(5, i.gamedata.text.points + newline);
_local1.ky.ls = new lu();
var _local3 = [{av:_local1.ky, ly:{_alpha:0, _xscale:70, _yscale:70, _x:_local1.kr.ky[0] + (_local1.ky._width * 0.15), _y:_local1.kr.ky[1] + (_local1.ky._height * 0.15)}, lz:{_alpha:100, _xscale:100, _yscale:100, _x:_local1.kr.ky[0], _y:_local1.kr.ky[1]}}];
_local1.ky.ls.go(_local3, {duration:300});
_local1.ky.onRelease = function () {
i.de.ma();
};
};
_local1.ma = function () {
var _local1 = this;
if (!_local1.ky.fe) {
} else {
_local1.ky.fe = false;
delete _local1.ky.onRelease;
_local1.mb();
_local1.mc();
i.cc.ee();
new ef({eg:0.6, eh:i.cc.ei, ej:i.cc});
i.dk.jw();
}
};
_local1.mb = function () {
var _local1 = this;
var _local2 = [{av:_local1.ky, ly:{_alpha:100, _xscale:100, _yscale:100, _x:_local1.kr.ky[0], _y:_local1.kr.ky[1]}, lz:{_alpha:0, _xscale:70, _yscale:70, _x:_local1.kr.ky[0] + (_local1.ky._width * 0.15), _y:_local1.kr.ky[1] + (_local1.ky._height * 0.15)}}];
_local1.ky.ls.go(_local2, {duration:200});
};
_local1.es = function () {
var _local1 = this;
var _local2 = new lu();
var _local3 = [{lz:{_rotation:0, _alpha:100}, ly:{_rotation:-160, _alpha:0}, av:_local1.la.bg_table}, {lz:{_alpha:0, _x:_local1.ld._x - 4, _y:_local1.ld._y + 16, _width:_local1.ld._width + 8}, ly:{_alpha:80, _x:_local1.ld._x, _y:_local1.ld._y, _width:_local1.ld._width}, av:_local1.ld}, {lz:{_alpha:100, _x:_local1.lc._x, _y:_local1.lc._y, _width:_local1.lc._width, _height:_local1.lc._height}, ly:{_alpha:0, _x:_local1.ld._x, _y:_local1.ld._y, _width:_local1.ld._width, _height:_local1.ld._height}, av:_local1.lc}];
_local2.go(_local3, {duration:300});
_local1.la.bg_table._visible = true;
};
_local1.fa = function () {
var _local3 = this;
q("gui.show_scoreboard()");
_local3.lf.fe = true;
_local3.lf.header.text = i.gamedata.text.scoreboard_header.toUpperCase();
_local3.lf.next_round.text = i.gamedata.text.next_round.toUpperCase();
_local3.lf.r1_tag.text = i.gamedata.text.round_1.toUpperCase();
_local3.lf.r2_tag.text = i.gamedata.text.round_2.toUpperCase();
_local3.lf.r3_tag.text = i.gamedata.text.round_3.toUpperCase();
_local3.lf.total.text = i.gamedata.text.total.toUpperCase();
_local3.lf.team_a.text = i.gamedata.text.team_green;
_local3.lf.team_b.text = i.gamedata.text.team_blue;
var bi = i.dk.iy();
var _local2 = 0;
while (_local2 < bi.length) {
var _local1 = 0;
while (_local1 < bi[_local2].length) {
_local3.lf[(("r" + (_local2 + 1)) + "c") + (_local1 + 1)].text = bi[_local2][_local1];
_local1++;
}
_local2++;
}
if (!i.fi()) {
_local3.lf.onRelease = function () {
i.de.lh();
};
_local3.ks.dc();
_local3.ks.md();
g.play("next_round.aif");
} else {
_local3.lf.next_round.text = "";
_local3.lf.next_round_counter.text = "";
_local3.lf.next_round_frame._visible = false;
if (i.ce.cf.fc) {
g.play("game_win.aif");
} else {
g.play("game_over.aif");
}
}
_local3.lf._visible = true;
_local3.lf._alpha = 0;
if (!_local3.lf.ls) {
_local3.lf.ls = new lu();
}
var lx = [{av:_local3.lf, ly:{_alpha:0, _xscale:70, _yscale:70, _x:_local3.kr.kv[0] + (_local3.lf._width * 0.15), _y:_local3.kr.kv[1] + (_local3.lf._height * 0.15)}, lz:{_alpha:100, _xscale:100, _yscale:100, _x:_local3.kr.kv[0], _y:_local3.kr.kv[1]}}];
_local3.lf.ls.go(lx, {duration:300, eh:_local3.me, ej:_local3});
_local3.lb._visible = true;
};
_local1.lh = function () {
var _local1 = this;
delete _local1.lf.onRelease;
_local1.ks.mf();
i.dk.lh();
_local1.mg();
i.ce.cf.dx.mh("neutral");
i.dk.jh();
};
_local1.mg = function () {
var _local2 = this;
if (!_local2.lf.fe) {
} else {
_local2.lf.fe = false;
var _local3 = [{av:_local2.lf, ly:{_alpha:100, _xscale:100, _yscale:100, _x:_local2.kr.kv[0], _y:_local2.kr.kv[1]}, lz:{_alpha:0, _xscale:70, _yscale:70, _x:_local2.kr.kv[0] + (_local2.lf._width * 0.15), _y:_local2.kr.kv[1] + (_local2.lf._height * 0.15)}}];
_local2.lf.ls.go(_local3, {duration:200});
_local2.lb._visible = false;
var _local1 = 0;
while (_local1 < i.ce.dw.length) {
_local2.mi(i.ce.dw[_local1].iu, i.ce.dw[_local1].dx);
i.ce.dw[_local1].dx.dy._visible = i.ce.dw[_local1].iw;
_local2.it(_local1, 0);
_local1++;
}
}
};
_local1.lq = function (mj) {
var _local3 = this;
var _local2 = 0;
while (_local2 < mj) {
var mk = ((_local3.kn[_local2][0] < (i.width / 2)) ? "player_box_left" : "player_box_right");
var _local1 = d.y({ah:mk, ai:_local3.kn[_local2][0], aj:_local3.kn[_local2][1], am:false});
_local1.hilite._visible = false;
var mm = (((_local2 % 2) == 0) ? 38191 : 34768);
var mn = new Color(_local1.color_top);
mn.setRGB(mm);
_local1.name.text = "";
_local1.number.text = "0";
_local1.name._alpha = 60;
_local1.number._alpha = 60;
_local3.km[_local2] = _local1;
_local2++;
}
};
_local1.mo = function (mp, mq) {
if (mq) {
this.km[mp].hilite._visible = true;
} else {
this.km[mp].hilite._visible = false;
}
};
_local1.mr = function (mp, ea, name) {
var _local1 = this.km[mp];
var _local3 = (((ea % 2) == 0) ? 38191 : 34768);
var _local2 = new Color(_local1.color_top);
_local2.setRGB(_local3);
_local1.name.text = name;
};
_local1.it = function (mp, ms) {
var _local1 = this.km[mp];
_local1.number.text = ms;
};
_local1.et = function () {
var _local1 = this;
var cs = new lu();
var lx = [];
var mt;
var az;
var _local3 = 0;
while (_local3 < _local1.km.length) {
mt = _local1.kn[_local3][0] < (i.width / 2);
_local1.km[_local3]._x = (mt ? (-_local1.km[_local3]._width) : (i.width));
_local1.km[_local3]._visible = true;
az = {av:_local1.km[_local3], ly:{_x:_local1.km[_local3]._x}, lz:{_x:_local1.kn[_local3][0]}};
lx.push(az);
_local3++;
}
var _local2;
var mv;
_local3 = 0;
while (_local3 < i.ce.dw.length) {
_local2 = i.ce.dw[_local3].dx.dy;
mv = i.ce.dw[_local3].dx.dy._x;
mt = _local2._x < (i.width / 2);
_local2._x = (mt ? (-mv) : (i.width + (i.width - mv)));
_local2._visible = true;
az = {av:_local2, ly:{_x:_local2._x}, lz:{_x:mv}};
lx.push(az);
_local3++;
}
cs.go(lx, {duration:500});
};
_local1.mw = function (dx) {
var _local1 = this;
var _local2 = dx;
_local2.dy._xscale = -_local1.kq[_local1.kl][2];
_local2.dy._yscale = _local1.kq[_local1.kl][3];
_local2.dy._x = _local1.kq[_local1.kl][0] + (_local2.mx * (_local1.kq[_local1.kl][2] / 100));
_local2.dy._y = _local1.kq[_local1.kl][1] + _local1.kz.my;
_local2.dy._visible = true;
_local1.kl++;
_local1.mz(((i.gamedata.text.waiting_for_players + " (") + _local1.kl) + "/4)");
};
_local1.mi = function (fq, dx) {
var _local1 = dx;
var _local2 = this;
var _local3 = fq;
_local1.dy._x = _local2.ko[_local3][0];
_local1.dy._y = _local2.ko[_local3][1];
_local1.dy._visible = false;
if (_local2.kn[_local3][0] < (i.width / 2)) {
_local1.dy._xscale = -100;
_local1.dy._x = _local1.dy._x + _local1.mx;
} else {
_local1.dy._xscale = 100;
}
_local1.dy._yscale = 100;
};
_local1.me = function () {
var _local3;
var _local1;
var _local2 = [0, 2];
var p = 0;
while (p < i.ce.dw.length) {
_local3 = i.ce.dw[p].dx.dy;
_local1 = i.ce.dw[p].ea;
_local3._x = this.kp[_local2[_local1]][0];
_local3._y = this.kp[_local2[_local1]][1];
_local3._yscale = this.kp[_local2[_local1]][3];
if ((_local2[_local1] % 2) == 1) {
_local3._xscale = this.kp[_local2[_local1]][2];
} else {
_local3._xscale = -this.kp[_local2[_local1]][2];
_local3._x = _local3._x + (i.ce.dw[p].dx.mx * (this.kp[_local2[_local1]][2] / 100));
}
_local3._visible = true;
_local2[_local1]++;
p++;
}
var jb = i.dk.ix();
if (i.fi()) {
jb = i.dk.jc();
}
var nb = (jb ? "happy" : "angry");
i.ce.cf.dx.mh(nb);
};
_local1.dp = function () {
var _local1 = this;
_local1.kz = d.y({ah:"statusbox", ai:_local1.kr.kz[0], aj:_local1.kr.kz[1]});
_local1.kz.status.text = i.gamedata.text.status_tag.toUpperCase();
_local1.kz.status_msg.text = i.gamedata.text.waiting_for_players + " (0/4)";
_local1.kz.time_to_game.text = i.gamedata.text.time_to_start.toUpperCase();
_local1.kz.time.text = "";
_local1.kz.my = 0;
var _local2 = function () {
i.de.nc();
};
_local1.nd = new li({duration:20, lj:_local1.kz.time, ff:_local2, lk:"time"});
_local1.nd.md();
_local1.kz.ls = new lu();
var _local3 = [{lz:{_alpha:100}, ly:{_alpha:0}, av:_local1.kz}];
_local1.kz.ls.go(_local3, {duration:200});
_local1.kz.fe = true;
};
_local1.mc = function () {
var _local2 = this;
var nf = ((i.height / 2) - (_local2.kz._height / 2));
var ng = (_local2.kr.kz[1] - nf);
_local2.kz.my = -ng;
var lx = [{ly:{_y:_local2.kr.kz[1]}, lz:{_y:nf}, av:_local2.kz}];
var _local3;
var mu;
var mv;
var _local1 = 0;
while (_local1 < i.ce.dw.length) {
mu = i.ce.dw[_local1].dx.dy;
nh = i.ce.dw[_local1].dx.dy._y;
_local3 = {av:mu, ly:{_y:_local2.kq[_local1][1]}, lz:{_y:_local2.kq[_local1][1] - ng}};
lx.push(_local3);
_local1++;
}
_local2.kz.ls.go(lx, {duration:500});
};
_local1.ek = function () {
var _local3 = this;
if (!_local3.kz.fe) {
} else {
_local3.kz.fe = false;
_local3.nd.mf();
if (_local3.ni) {
_local3.ni.stop();
}
var lx = [{lz:{_alpha:0}, ly:{_alpha:100}, av:_local3.kz}];
_local3.kz.ls.go(lx, {duration:200});
_local3.kz.q1._visible = false;
_local3.kz.q2._visible = false;
_local3.kz.q3._visible = false;
_local3.kz.q4._visible = false;
var _local2;
var _local1 = 0;
while (_local1 < i.ce.dw.length) {
_local2 = i.ce.dw[_local1].dx.dy;
_local2._visible = false;
_local1++;
}
}
};
_local1.mz = function (gh) {
if (!this.kz) {
return(undefined);
}
this.kz.status_msg.text = gh;
};
_local1.nc = function () {
var _local1 = this;
i.dk.jw();
_local1.ma();
_local1.ni = {nj:"", nk:0, nl:0, nm:false, n:function () {
var _local1 = this;
_local1.nl++;
var _local2 = "..............";
if ((_local1.nl % 25) == 0) {
_local1.nk++;
_local1.nk = _local1.nk % 11;
i.de.kz.time.text = _local1.nj + _local2.substr(0, _local1.nk);
}
}, start:function () {
var _local1 = this;
if (_local1.nm) {
} else {
_local1.nm = true;
b.m(_local1);
}
}, stop:function () {
var _local1 = this;
if (!_local1.nm) {
} else {
_local1.nm = false;
b.s(_local1);
}
}};
_local1.ni.start();
};
_local1.dv = function (gh) {
var _local1 = this;
_local1.lb._visible = true;
_local1.lr.header.text = "ALERT";
_local1.lr.msg.text = gh;
_local1.lr._visible = true;
if (!_local1.lr.fe) {
_local1.lr._alpha = 0;
var _local2 = [{av:_local1.lr, ly:{_alpha:0, _xscale:70, _yscale:70, _x:_local1.lr._x + (_local1.lr._width * 0.15), _y:_local1.lr._y + (_local1.lr._height * 0.15)}, lz:{_alpha:100, _xscale:100, _yscale:100, _x:_local1.lr._x, _y:_local1.lr._y}}];
_local1.lr.ls.go(_local2, {duration:300});
}
_local1.lr.fe = true;
};
_local1.fd = function () {
var _local1 = this;
if (_local1.ky.fe) {
delete _local1.ky.onRelease;
_local1.mb();
}
if (_local1.kz.fe) {
_local1.ek();
}
if (_local1.lf.fe) {
delete _local1.lf.onRelease;
_local1.ks.mf();
_local1.mg();
}
};
_local1.dc(z);
}
function dg(z) {
var _local2 = this;
_local2.dw = [];
_local2.lo = [];
_local2.no = [];
_local2.np = [];
_local2.cf = null;
_local2.hi = null;
_local2.hp = null;
_local2.nq = [];
_local2.nr = [];
_local2.ns = [];
_local2.nt = d.y({ai:0, aj:0, ah:"table_mask"});
_local2.nu = d.y({ai:0, aj:0});
_local2.nu.setMask(_local2.nt);
_local2.dc = function (z) {
var _local3 = this;
_local3.kt = d.y({ah:"placeholders_table", am:false});
var _local2;
var _local1;
var ai;
var aj;
var p = 0;
while (p < 4) {
_local2 = _local3.kt["hand" + p];
_local1 = _local2.getBounds(_root);
ai = _local1.xMin + ((_local1.xMax - _local1.xMin) / 2);
aj = _local1.yMin + ((_local1.yMax - _local1.yMin) / 2);
_local3.np.push([ai, aj, _local2._rotation, _local2._xscale]);
_local3.lo.push([ai, aj, _local2._width, _local2._height]);
_local2 = _local3.kt["pile" + p];
_local1 = _local2.getBounds(_root);
ai = _local1.xMin + ((_local1.xMax - _local1.xMin) / 2);
aj = _local1.yMin + ((_local1.yMax - _local1.yMin) / 2);
_local3.nq.push([ai, aj, _local2._rotation, _local2._xscale]);
_local2 = _local3.kt["trick" + p];
_local1 = _local2.getBounds(_root);
ai = _local1.xMin + ((_local1.xMax - _local1.xMin) / 2);
aj = _local1.yMin + ((_local1.yMax - _local1.yMin) / 2);
var nv = 20;
if (ai > (i.width / 2)) {
nv = -nv;
}
_local3.no.push([ai, aj, nv, 0, _local2._rotation * 2]);
p++;
}
_local2 = _local3.kt.deck;
_local1 = _local2.getBounds(_root);
ai = _local1.xMin + ((_local1.xMax - _local1.xMin) / 2);
aj = _local1.yMin + ((_local1.yMax - _local1.yMin) / 2);
_local3.nr = [ai, aj, _local2._rotation, _local2._xscale];
var ja = _local3.kt.trump;
_local1 = ja.getBounds(_root);
ai = _local1.xMin + ((_local1.xMax - _local1.xMin) / 2);
aj = _local1.yMin + ((_local1.yMax - _local1.yMin) / 2);
_local3.ns = [ai, aj, ja._rotation, ja._xscale];
_local3.hp = new nw({ai:200, aj:200, parent:_local3});
};
_local2.nx = function (ny) {
var nz = ((ny._rotation * Math.PI) / 180);
var ai = 0;
};
_local2.dq = function (dr) {
var _local1 = dr;
var _local2 = this;
_local1.parent = _local2;
_local1.oa = true;
_local2.dw[_local1.cg] = new ob(_local1);
_local2.cf = _local2.dw[_local1.cg];
_local2.dw[_local1.cg].oc();
return(_local2.dw[_local1.cg]);
};
_local2.ds = function (dr) {
var _local1 = dr;
var _local2 = this;
_local1.parent = _local2;
_local1.oa = false;
_local2.dw[_local1.cg] = new ob(_local1);
_local2.dw[_local1.cg].oc();
return(_local2.dw[_local1.cg]);
};
_local2.fs = function (od, fq, fr) {
};
_local2.ex = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.dw.length) {
_local2.dw[_local1].ex();
_local1++;
}
_local2.hi = new oe({ai:_local2.nr[0], aj:_local2.nr[1], nz:_local2.nr[2], scale:_local2.nr[3], of:_local2.ns[0], og:_local2.ns[1], oh:_local2.ns[2], oi:_local2.ns[3], parent:_local2, oj:_local2.nu});
_local2.hi.show();
};
_local2.fd = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.dw.length) {
_local2.dw[_local1].fd();
_local1++;
}
};
_local2.dc(z);
}
function dh(z) {
var _local1 = this;
var _local3 = z;
_local1.ok = {};
_local1.ol = 0;
_local1.om = [];
_local1.dc = function (z) {
this.parent = z.parent;
};
_local1.connect = function (z) {
var _local1 = this;
var _local2 = z;
_local1.oo = _local2;
var _local3 = {op:_local1, host:_local2.hostname, port:_local2.port, oq:parseInt(_local2.pingtime)};
_local1.ot = new ou(_local3);
_local1.ot.connect();
};
_local1.fg = function () {
this.ot.fg();
};
_local1.dm = function (fk, ch) {
this.ok[fk] = ch;
};
_local1.ov = function (z, ow) {
var _local1 = this;
var _local2 = z;
if (typeof(_local2.status) == "string") {
if (_local2.status == "connection established") {
var ox = _local1.oo.slotid;
var oy = _local1.oo.magic;
_local1.cd((("CCC " + ox) + " ") + oy);
} else if ((_local2.status == "no connection") || (_local2.status == "connection failed")) {
_local1.gg("unable_to_connect");
} else if (_local2.status == "connection closed") {
_local1.gg("local_disconnect");
}
}
if (typeof(_local2.oz) == "string") {
if (((_local1.ol > 0) || (_local1.om.length > 0)) && (ow != true)) {
_local1.om.push(_local2);
} else {
var od = _local2.oz.charAt(0);
var _local3 = _local2.oz.substr(0, 3);
var fl = _local2.oz.substr(4);
if (od == "S") {
_local1.pa(_local3, fl);
} else if (od == "G") {
_local1.pb(_local3, fl);
} else if (_local1.ok[_local3]) {
_local1.ok[_local3].gc(_local3, fl);
}
}
}
};
_local1.pa = function (fk, fl) {
var _local1 = this;
var _local2 = fl;
switch (fk) {
case "SCA" :
_local1.parent.dq(_local1.pc(_local2));
return;
case "SAC" :
_local1.parent.ds(_local1.pc(_local2));
return;
case "SCD" :
_local1.parent.dt(parseInt(_local2));
return;
case "SSG" :
_local1.parent.eb();
return;
case "SAG" :
_local1.gg("server_abort_game");
return;
case "STM" :
return;
default :
_local1.parent.fj(fk, _local2);
}
};
_local1.pb = function (fk, fl) {
var _local1 = fl.split(",");
var _local2 = parseInt(_local1[0]);
_local1.splice(0, 1);
var _local3 = _local1.join(",");
this.parent.ft(fk, _local2, _local3);
};
_local1.gg = function (gh) {
this.parent.gg(gh);
};
_local1.cd = function (cu) {
if (this.ot.pe) {
this.ot.cd(cu);
}
};
_local1.ee = function () {
this.ol++;
};
_local1.ei = function () {
var _local2 = this;
_local2.ol--;
if (_local2.ol > 0) {
} else {
var _local1 = 0;
while (_local1 < _local2.om.length) {
_local2.ov(_local2.om[_local1], true);
if (_local2.ol > 0) {
_local2.om.splice(0, _local1 + 1);
return;
}
_local1++;
}
_local2.om = [];
}
};
_local1.pc = function (fl) {
var _local2 = cq(fl);
var _local1 = {};
_local1.cg = parseInt(_local2[0]);
_local1.pf = _local2[1];
_local1.dx = _local2[2];
return(_local1);
};
_local1.dc(_local3);
}
function dj(z) {
this.dc = function (z) {
};
this.dc(z);
}
function en(z) {
var _local1 = this;
_local1.fe = false;
_local1.pg = [];
_local1.ph = [];
_local1.pj = 0.8;
_local1.pk = false;
_local1.dc = function (z) {
this.parent = z.parent;
this.pl = new lu();
};
_local1.start = function (pm) {
var _local1 = this;
_local1.pm = pm;
_local1.fe = true;
_local1.pn = d.y({ah:"team_select", ai:0, aj:0});
_local1.pn.info.text = i.gamedata.text.team_select;
_local1.pn.time.text = i.gamedata.text.time;
_local1.pn.team_a.header.text = i.gamedata.text.team_green.toUpperCase();
_local1.pn.team_b.header.text = i.gamedata.text.team_blue.toUpperCase();
_local1.pn.time._visible = false;
var po = [];
po.push(null);
var p = 0;
while (p < _local1.pm.length) {
if (_local1.pm[p].oa) {
po[0] = _local1.pm[p].dx.dy;
} else {
po.push(_local1.pm[p].dx.dy);
}
p++;
}
d.sort(po, true);
var pp = 332;
var pq = 90;
var pr;
var ps = 0;
var pt = 0;
var _local2 = 0;
var p = 0;
while (p < _local1.pm.length) {
if (_local1.pm[p].oa) {
_local2 = 0;
} else {
pt++;
_local2 = pt;
}
if ((_local2 % 2) != 99) {
_local1.pm[_local2].dx.dy._xscale = _local1.pj * 100;
_local1.pm[_local2].dx.dy._x = pp;
} else {
_local1.pm[_local2].dx.dy._xscale = (-_local1.pj) * 100;
_local1.pm[_local2].dx.dy._x = pp + (_local1.pm[_local2].dx.mx * _local1.pj);
}
_local1.pm[_local2].dx.dy._y = pq;
_local1.pm[_local2].dx.dy._yscale = _local1.pj * 100;
_local1.pm[_local2].dx.dy._visible = false;
var pv = d.y({ah:"avatar_name_tag", ai:pp, aj:pq});
pv.name.text = _local1.pm[_local2].pf;
if (_local1.pm[_local2].oa) {
_local1.pw = new px({parent:_local1, av:_local1.pm[_local2].dx.dy, py:pv});
_local1.pz = new px({parent:_local1, av:pv, py:_local1.pm[_local2].dx.dy});
_local1.qa = d.y({ah:"you_arrow_anim", ai:pp - 40, aj:pq + 42, am:false});
_local1.qa.mc.txt.text = i.gamedata.text.you.toUpperCase();
_local1.qb = true;
_local1.qa.ls = new lu();
var ff = function () {
this.qa.gotoAndPlay(1);
this.qa._visible = true;
};
new ef({eg:0.6, eh:ff, ej:_local1});
}
pq = pq + (_local1.pm[_local2].dx.qc * _local1.pj);
var _local3 = {cn:_local1.pm[_local2], fo:-1};
_local3.qe = _local1.pm[_local2].dx.dy._x;
_local3.qf = _local1.pm[_local2].dx.dy._y;
_local3.ls = new lu();
_local3.pv = pv;
_local1.pg[_local2] = _local3;
p++;
}
_local1.qg();
var p = 0;
while (p < 2) {
_local1.ph.push([]);
p++;
}
var cs = new lu();
var lx = [{av:_local1.pn, lz:{_alpha:100, _xscale:100, _yscale:100, _x:_local1.pn._x, _y:_local1.pn._y}, ly:{_alpha:0, _xscale:70, _yscale:70, _x:_local1.pn._x + (i.width * 0.15), _y:_local1.pn._y + (i.height * 0.15)}}];
cs.go(lx, {duration:200, eh:_local1.qh, ej:_local1});
};
_local1.qh = function () {
var _local2 = this;
_local2.ku = new lm({ai:697, aj:502, scale:38});
_local2.ku.start({duration:20000, eh:i.dk.ka, ej:i.dk});
_local2.pn.time._visible = true;
var _local1 = 0;
while (_local1 < _local2.pg.length) {
_local2.pg[_local1].cn.dx.dy._visible = true;
_local1++;
}
};
_local1.fp = function (fn, fo) {
var _local1 = this;
_local1.pk = false;
var _local2;
var _local3 = 0;
while (_local3 < _local1.pg.length) {
if (_local1.pg[_local3].cn.cg == fn) {
_local2 = _local1.pg[_local3];
break;
}
_local3++;
}
if (typeof(_local2.qj) == "number") {
_local1.ph[_local2.fo][_local2.qj] = false;
_local2.qj = false;
}
if (fo == -1) {
var lx = [{lz:{_x:_local2.qe, _y:_local2.qf}, ly:{_x:_local2.cn.dx.dy._x, _y:_local2.cn.dx.dy._y}, av:_local2.cn.dx.dy}, {lz:{_x:_local2.qe, _y:_local2.qf}, ly:{_x:_local2.cn.dx.dy._x, _y:_local2.cn.dx.dy._y}, av:_local2.pv}];
} else {
var qj = 0;
_local3 = 0;
while (_local3 < _local1.ph[fo].length) {
if (_local1.ph[fo][_local3]) {
qj++;
} else {
break;
}
_local3++;
}
_local1.ph[fo][qj] = true;
_local2.fo = fo;
_local2.qj = qj;
var qk = ((fo == 0) ? (_local1.pn.team_a) : (_local1.pn.team_b));
var nf = ((qk._y + (qj * ((_local2.cn.dx.qc * _local1.pj) + 10))) + 35);
var lx = [{lz:{_x:(qk._x + (qk._width / 2)) - ((_local2.cn.dx.mx * _local1.pj) / 2), _y:nf}, ly:{_x:_local2.cn.dx.dy._x, _y:_local2.cn.dx.dy._y}, av:_local2.cn.dx.dy}, {lz:{_x:(qk._x + (qk._width / 2)) - ((_local2.cn.dx.mx * _local1.pj) / 2), _y:nf}, ly:{_x:_local2.cn.dx.dy._x, _y:_local2.cn.dx.dy._y}, av:_local2.pv}];
}
var ql = {duration:200};
if (_local2.cn.oa) {
ql.eh = _local1.qm;
ql.ej = _local1;
}
_local2.ls.go(lx, ql);
if (_local2.cn.oa) {
_local1.qn();
}
};
_local1.qo = function (ag) {
this.qn();
};
_local1.qp = function (ag) {
var _local2 = this;
var _local3 = ag;
var qi;
var _local1 = 0;
while (_local1 < _local2.pg.length) {
if ((_local2.pg[_local1].cn.dx.dy == _local3) || (_local2.pg[_local1].pv == _local3)) {
qi = _local2.pg[_local1];
break;
}
_local1++;
}
var qk;
var qq = -1;
if (_local2.pn.team_a.hitTest(_local3._x + ((qi.cn.dx.mx * _local2.pj) / 2), _local3._y + ((qi.cn.dx.qc * _local2.pj) / 2))) {
qk = _local2.pn.team_a;
qq = 0;
} else if (_local2.pn.team_b.hitTest(_local3._x + ((qi.cn.dx.mx * _local2.pj) / 2), _local3._y + ((qi.cn.dx.qc * _local2.pj) / 2))) {
qk = _local2.pn.team_b;
qq = 1;
}
_local2.qr(qq);
};
_local1.qr = function (qq) {
var _local1 = this;
if (i.dk.jy(qq)) {
if (_local1.pk) {
} else {
_local1.pk = true;
_local1.kb();
}
}
};
_local1.qm = function () {
var _local1 = this;
if (_local1.fe) {
_local1.qg();
_local1.pw.iv();
_local1.pz.iv();
}
};
_local1.kb = function () {
var _local1 = this;
_local1.pw.jl();
_local1.pz.jl();
delete _local1.pn.team_a.onRelease;
delete _local1.pn.team_b.onRelease;
};
_local1.qg = function () {
this.pn.team_a.onRelease = function () {
i.em.qr(0);
};
this.pn.team_b.onRelease = function () {
i.em.qr(1);
};
};
_local1.kc = function () {
this.ku.stop();
this.pn.time._visible = false;
};
_local1.qn = function () {
var _local1 = this;
if (_local1.qb) {
_local1.qb = false;
var _local3 = [{av:_local1.qa, ly:{_alpha:100}, lz:{_alpha:0}}];
var _local2 = function () {
d.au(this.qa);
};
_local1.qa.ls.go(_local3, {duration:400, eh:_local2, ej:_local1});
}
};
_local1.hide = function () {
var _local2 = this;
_local2.fe = false;
_local2.pw.jl();
_local2.pz.jl();
var _local1 = 0;
while (_local1 < _local2.pg.length) {
_local2.pg[_local1].cn.dx.dy._visible = false;
_local2.pg[_local1].pv._visible = false;
_local2.pg[_local1].ls.stop();
_local1++;
}
var _local3 = new lu();
var lx = [{av:_local2.pn, ly:{_alpha:100, _xscale:100, _yscale:100, _x:_local2.pn._x, _y:_local2.pn._y}, lz:{_alpha:0, _xscale:70, _yscale:70, _x:_local2.pn._x + (i.width * 0.15), _y:_local2.pn._y + (i.height * 0.15)}}];
_local3.go(lx, {duration:200, eh:_local2.qs, ej:_local2});
_local2.pn.info._visible = false;
_local2.pn.time._visible = false;
_local2.qn();
};
_local1.fd = function () {
this.ku.qs();
this.kb();
};
_local1.qs = function () {
var _local2 = this;
_local2.ku.qs();
var _local1 = 0;
while (_local1 < _local2.pg.length) {
d.au(_local2.pg[_local1].pv);
_local1++;
}
d.au(_local2.pn);
new ef({eg:0.2, eh:i.er, ej:i});
};
_local1.dc(z);
}
function qt(z) {
var _local1 = this;
_local1.gi = false;
_local1.mx = 110;
_local1.qc = 110;
_local1.dc = function (z) {
var _local1 = this;
_local1.parent = z.parent;
_local1.z = z;
_local1.qu = i.gamedata.mp.chatcontrol;
};
_local1.load = function () {
var _local1 = this;
if (gd) {
_local1.qv = gd;
if (gd.qw) {
_local1.qx();
} else {
var _local3 = {parent:_local1};
_local3.n = function () {
var _local1 = this;
if (_local1.parent.qv.qw) {
b.s(_local1);
_local1.parent.qx();
}
};
b.m(_local3);
}
} else {
_local1.ag = d.y({ai:0, aj:0, at:10});
_local1.qv = d.y({ai:0, aj:0, af:_local1.ag});
_local1.qv.loadMovie(_local1.qu);
_local1.qv.qw = false;
gd = _local1.qv;
var _local3 = {qz:false, rc:_local1.qv, parent:_local1};
_local3.n = function () {
var _local1 = this;
if (_local1.qz) {
b.s(_local1);
_local1.parent.rd();
_local1.parent.qx();
} else {
var _local2 = _local1.rc.getBytesTotal();
if (isNaN(_local2) || (_local2 < 1)) {
_local2 = -1;
} else if (_local1.rc.getBytesLoaded() == _local2) {
_local1.qz = true;
}
}
};
b.m(_local3);
}
};
_local1.rd = function () {
var _local1 = this;
if (gd) {
if (gd.qw) {
return(false);
}
}
if (cw) {
_local1.qv.init(_local1, "../../chatcontrol/");
} else {
_local1.qv.init(_local1);
}
_local1.qv.qw = true;
_local1.qv.enable();
return(undefined);
};
_local1.qx = function () {
var _local1 = this;
if (!_local1.qv.qw) {
} else {
_local1.rf = _local1.qv.getAvatar(_local1.z.cg, _local1.z.dx, 0, 0, _local1.parent.oa, _local1);
_local1.rf.show();
_local1.dy = _local1.rf.getClip();
}
};
_local1.onAvatarLoaded = function () {
var _local1 = this;
_local1.gi = true;
if (_local1.parent.mw) {
_local1.parent.mw();
}
};
_local1.mh = function (nb) {
var _local1 = this;
if (!_local1.rf) {
} else {
_local1.qv.setMood(_local1.rf, nb);
}
};
_local1.ccom = function (az) {
i.cc.cd(az);
};
_local1.dc(z);
}
function rg(z) {
var _local1 = this;
var _local2 = z;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.ag = _local2.ag;
_local1.rh = _local2.rh;
_local1.eh = _local2.eh;
_local1.ej = _local2.ej;
_local1.ri = ((typeof(_local2.ri) == "number") ? (_local2.ri) : 0);
_local1.rj = _local2.rj || false;
_local1.rk = new Color(_local1.ag);
_local1.rl = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0};
_local1.rm = ((typeof(_local2.rm) == "object") ? (_local2.rm) : null);
_local1.rn = ((typeof(_local2.rn) == "number") ? (_local2.rn) : null);
if (_local1.ri > 0) {
_local1.ro = _local1.ag.createEmptyMovieClip("cl_a", 99);
_local1.ro._x = -_local1.ri;
_local1.ro._y = -_local1.ri;
_local1.rp(_local1.ro, _local1.ag._width + (_local1.ri * 2), _local1.ag._height + (_local1.ri * 2), 65280, 0);
} else {
_local1.ro = _local1.ag;
}
_local1.ro.parent = _local1;
_local1.iv();
};
_local1.iv = function () {
var _local1 = this;
_local1.ro.onPress = function () {
if (this.parent.rj) {
this.parent.rq();
}
};
_local1.ro.onRelease = function () {
if (!this.parent.rj) {
this.parent.rq();
}
};
_local1.ro.onRollOver = function () {
var _local1 = this;
if (_local1.parent.rm) {
_local1.parent.rk.setTransform(_local1.parent.rm);
}
if (_local1.parent.rn) {
_local1.parent.ag._alpha = _local1.parent.rn;
}
};
_local1.ro.onRollOut = function () {
var _local1 = this;
if (_local1.parent.rm) {
_local1.parent.rk.setTransform(_local1.parent.rl);
}
if (_local1.parent.rn) {
_local1.parent.ag._alpha = 100;
}
};
_local1.ro.onDragOut = function () {
var _local1 = this;
if (_local1.parent.rm) {
_local1.parent.rk.setTransform(_local1.parent.rl);
}
if (_local1.parent.rn) {
_local1.parent.ag._alpha = 100;
}
};
};
_local1.jl = function () {
var _local1 = this;
delete _local1.ro.onPress;
delete _local1.ro.onRelease;
delete _local1.ro.onDragOut;
delete _local1.ro.onRollOver;
delete _local1.ro.onRollOut;
};
_local1.rq = function () {
var _local1 = this;
if (_local1.eh) {
_local1.eh.call(_local1.ej);
}
};
_local1.qs = function () {
var _local1 = this;
_local1.jl();
delete _local1.ro.parent;
d.au(_local1.ro);
};
_local1.rp = function (ny, rr, rs, cv, az) {
var _local1 = ny;
_local1.moveTo(0, 0);
_local1.beginFill(cv, az);
_local1.lineTo(rr, 0);
_local1.lineTo(rr, rs);
_local1.lineTo(0, rs);
_local1.lineTo(0, 0);
_local1.endFill();
};
_local1.dc(_local2);
}
function ou(z) {
var _local1 = this;
var _local3 = z;
function rz(sg) {
if (sg) {
self.pe = true;
if (cy) {
trace("CommSocket: connection established");
}
sd({status:"connection established"});
} else {
if (cy) {
trace("CommSocket: connection failed");
}
sd({status:"connection failed"});
}
}
function sa() {
self.pe = false;
if (cy) {
trace("CommSocket: connection closed");
}
sd({status:"connection closed"});
}
function sc(sh) {
if (cy) {
trace("CommSocket error: " + sh);
}
}
function sb(src) {
sd({oz:src});
rv = getTimer();
}
function sd(ch) {
rw.push(ch);
}
function si(ch) {
op.ov(ch);
}
var rt = null;
var host = _local3.host;
var port = _local3.port;
var oq = ((_local3.oq > 0) ? (_local3.oq * 1000) : 10000);
var ru = 0;
var rv = 0;
var op = _local3.op;
var rw = [];
var rx = 0;
var ry = 0;
var self = _local1;
_local1.pe = false;
_local1.connect = function () {
if (rt) {
return(undefined);
}
b.m(this);
rt = new XMLSocket();
rt.onConnect = rz;
rt.onClose = sa;
rt.onData = sb;
rt.onError = sc;
if (rt.connect(host, port)) {
if (cy) {
trace((("CommSocket: connecting to " + host) + " ") + port);
}
sd({status:"connecting"});
} else {
if (cy) {
trace("CommSocket: no connection");
}
sd({status:"no connection"});
}
};
_local1.fg = function () {
if (!rt) {
return(undefined);
}
rt.close();
this.pe = false;
rt = null;
b.s(this);
};
_local1.cd = function (cu) {
rt.send(cu);
};
_local1.se = function (oz) {
var _local1 = sf(oz);
rt.send(_local1);
};
_local1.n = function () {
var _local2 = this;
if (rw.length > 0) {
si(rw.shift());
}
var _local1 = getTimer();
if ((_local1 - ru) > oq) {
ru = _local1;
if (_local2.pe) {
_local2.cd("CTM");
}
} else if ((_local1 - rv) > (oq + 4000)) {
_local2.fg();
op.gg("local_disconnect");
}
};
}
function sj(z) {
var _local1 = this;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.nm = false;
_local1.sk = _local2.av;
_local1.ny = _local1.sk;
_local1.ny.stop();
_local1.eh = null;
_local1.sl = (_local2.sl ? true : false);
_local1.sm = ((typeof(_local2.sm) == "number") ? (_local2.sm) : 1);
};
_local1.n = function () {
var _local1 = this;
if (!_local1.nm) {
} else if ((--_local1.sn) == 0) {
_local1.sn = _local1.sm;
if (_local1.so > _local1.sp) {
if (_local1.sl) {
_local1.so = (z.lx ? 0 : 1);
// unexpected jump
}
_local1.stop();
if (_local1.eh) {
_local1.eh();
_local1.eh = null;
}
} else {
if (_local1.lx) {
_local1.ny.gotoAndStop(_local1.lx[_local1.so]);
} else {
_local1.ny.gotoAndStop(_local1.so);
}
_local1.so++;
}
}
};
_local1.start = function (lx, ff) {
var _local1 = this;
var _local2 = lx;
if (_local1.nm) {
} else {
_local1.eh = ff;
if (_local2) {
_local1.lx = _local2;
_local1.sp = _local2.length - 1;
_local1.so = 0;
} else {
_local1.lx = false;
_local1.sp = _local1.ny._totalframes;
_local1.so = 1;
}
_local1.sn = _local1.sm;
_local1.nm = true;
b.m(_local1);
}
};
_local1.stop = function () {
var _local1 = this;
if (!_local1.nm) {
} else {
_local1.nm = false;
b.s(_local1);
}
};
_local1.dc(z);
}
function li(z) {
var _local2 = this;
var _local3 = z;
function ta(ja) {
var _local1 = ja;
var _local2 = "";
if (ss == "sec") {
_local2 = "" + Math.floor(_local1);
} else {
_local2 = Math.floor(_local1 / 60) + ":";
_local1 = _local1 % 60;
_local2 = _local2 + ((_local1 < 10) ? ("0" + _local1) : (_local1));
}
return(_local2);
}
var nm = false;
var sq = {};
var lj;
var sr;
var ss = "time";
var eh;
var st;
_local2.dc = function (z) {
var _local1 = z;
sq.su = getTimer();
sq.sv = sq.su;
sq.sw = 0;
sq.current = -1;
sq.sx = false;
if (_local1.duration) {
sq.duration = parseInt(_local1.duration);
}
if (_local1.lj) {
lj = _local1.lj;
sr = null;
} else if (_local1.sr) {
sr = _local1.sr;
lj = null;
}
if (_local1.ff) {
eh = _local1.ff;
}
if (typeof(_local1.lk) == "string") {
ss = _local1.lk;
}
if (typeof(_local1.st) == "string") {
st = _local1.st;
}
nm = false;
if (sq.duration > 0) {
this.sy();
}
};
_local2.sy = function () {
if (sq.sx) {
} else {
var _local3 = Math.max(0, (sq.duration * 1000) - (getTimer() - sq.su));
var _local1 = Math.round(_local3 / 1000);
sq.sw = _local1;
var _local2 = ta(_local1);
if (sq.current != _local2) {
sq.current = _local2;
if (lj) {
lj.text = _local2;
} else if (sr) {
sr(_local2);
}
if (_local1 <= 5) {
if (typeof(st) == "string") {
g.play(st);
}
}
}
if (_local3 == 0) {
this.mf();
if (eh) {
eh();
}
}
return(_local1);
}
return(undefined);
};
_local2.md = function () {
if (nm) {
return(undefined);
}
nm = true;
sq.su = sq.su + (getTimer() - sq.sv);
sq.sx = false;
b.m(this);
};
_local2.mf = function () {
if (!nm) {
return(undefined);
}
nm = false;
sq.sv = getTimer();
sq.sx = true;
b.s(this);
};
_local2.tb = function () {
this.mf();
this.dc();
};
_local2.n = function () {
this.sy();
};
_local2.tc = function (ja) {
sq.sv = parseInt(ja);
};
_local2.td = function (ja) {
var _local2 = ja;
sq.su = sq.sv + ((_local2 - sq.duration) * 1000);
sq.sw = _local2;
var _local1 = ta(_local2);
if (sq.current != _local1) {
sq.current = _local1;
if (lj) {
lj.text = _local1;
} else if (sr) {
sr(_local1);
}
}
};
_local2.te = function () {
return(sq.sw);
};
_local2.dc(_local3);
}
function tf(z) {
var _local1 = this;
function tq() {
var _local1 = ti - th;
var _local2 = _local1 * tg;
if (Math.abs(_local1) <= 2) {
th = ti;
} else {
th = th + _local2;
}
tj.text = tk + Math.round(th);
if (ti == th) {
tt();
}
}
function tt() {
nm = false;
}
var nm = false;
var tg = 0.4;
var th = 0;
var ti = 0;
var tj;
var tk;
_local1.dc = function (z) {
tj = z.tl;
tk = z.tm;
};
_local1.tn = function (to) {
nm = true;
ti = ti + to;
};
_local1.tp = function (to) {
ti = Math.round(to);
th = ti;
tj.text = tk + ti;
};
_local1.n = function () {
if (nm) {
tq();
}
};
_local1.dc(z);
}
function tu(z) {
var _local1 = this;
var _local3 = z;
_local1.tv = true;
_local1.tw = null;
_local1.tx = null;
_local1.dc = function (z) {
var _local1 = this;
_local1.az = z.az;
_local1.az.ty = _local1.az._width;
_local1.az.tz = _local1.az._height;
_local1.bc = z.bc;
_local1.bc.ty = _local1.bc._width;
_local1.bc.tz = _local1.bc._height;
};
_local1.ua = function (ub, uc) {
var _local1 = this;
if (!_local1.tv) {
var _local2 = ((ub == "a") ? (_local1.bc) : (_local1.az));
if (_local2 == _local1.tw) {
q("halt");
return;
}
} else {
if (ub == "a") {
_local1.tw = _local1.bc;
_local1.tx = _local1.az;
} else {
_local1.tw = _local1.az;
_local1.tx = _local1.bc;
}
if (_local1.tv) {
_local1.tx._width = _local1.tw.ty;
_local1.tx._height = _local1.tw.tz;
}
_local1.tx._alpha = 0;
_local1.tx._visible = true;
_local1.ue = uc || 6;
_local1.uf = _local1.tw._alpha;
_local1.ug = -(_local1.uf / _local1.ue);
_local1.uh = (_local1.tw.ty - _local1.tx.ty) / _local1.ue;
_local1.ui = (_local1.tw.tz - _local1.tx.tz) / _local1.ue;
_local1.uj = 0;
if (_local1.tv) {
b.m(_local1);
}
_local1.tv = false;
}
};
_local1.n = function () {
var _local1 = this;
if (_local1.tv) {
} else {
_local1.uf = Math.max(0, Math.min(100, _local1.uf + _local1.ug));
_local1.tw._alpha = _local1.uf;
_local1.tx._alpha = 100 - _local1.uf;
_local1.tw._visible = _local1.uf > 0;
_local1.tx._visible = (100 - _local1.uf) > 0;
_local1.tw._width = _local1.tw._width - _local1.uh;
_local1.tw._height = _local1.tw._height - _local1.ui;
_local1.tx._width = _local1.tx._width - _local1.uh;
_local1.tx._height = _local1.tx._height - _local1.ui;
if (_local1.uf == _local1.uj) {
_local1.tv = true;
b.s(_local1);
_local1.tw._width = _local1.uk;
_local1.tw._height = _local1.ul;
_local1.tx._width = _local1.um;
_local1.tx._height = _local1.un;
}
}
};
_local1.dc(_local3);
}
function lu(z) {
var _local1 = this;
function uv(az, bc, cv) {
var _local1 = az;
if (_local1 >= bc) {
return(((_local1 > cv) ? (cv) : (_local1)));
}
return(bc);
}
function uw(ly, lz, ut) {
return(ly + ((lz - ly) * ut));
}
_local1.nm = false;
_local1.uo = [];
_local1.eh = null;
_local1.ej = null;
_local1.dc = function (z) {
};
_local1.go = function (lx, z) {
var _local2 = this;
var _local3 = z;
_local2.duration = _local3.duration || 500;
_local2.uq = _local3.uq || (new Date().getTime());
_local2.eh = _local3.eh;
_local2.ej = _local3.ej;
_local2.uo = lx;
if (Key.isDown(16) && (cw)) {
_local2.duration = _local2.duration * 5;
}
_local2.ur();
var _local1 = 0;
while (_local1 < _local2.uo.length) {
if (typeof(_local2.uo[_local1].ly._alpha) == "number") {
_local2.uo[_local1].av._visible = true;
}
_local1++;
}
if (!_local2.nm) {
_local2.nm = true;
b.m(_local2);
}
};
_local1.n = function () {
this.ur();
};
_local1.ur = function () {
var _local2 = this;
var us;
var ut;
var uu = new Date().getTime();
var cv = _local2.uo.length;
var _local1;
var _local3;
us = uv(uu - _local2.uq, 0, _local2.duration);
ut = 0.5 - (0.5 * Math.cos((Math.PI * us) / _local2.duration));
if (us >= _local2.duration) {
if (_local2.nm) {
_local2.nm = false;
b.s(_local2);
}
_local1 = 0;
while (_local1 < cv) {
_local3 = _local2.uo[_local1].av;
for (cl in _local2.uo[_local1].lz) {
_local3[cl] = _local2.uo[_local1].lz[cl];
if (cl == "_alpha") {
if (_local2.uo[_local1].lz[cl] < 1) {
_local3._visible = false;
}
}
}
_local1++;
}
if (_local2.eh) {
_local2.eh.call(_local2.ej);
}
} else {
_local1 = 0;
while (_local1 < cv) {
_local3 = _local2.uo[_local1].av;
for (cl in _local2.uo[_local1].lz) {
_local3[cl] = uw(_local2.uo[_local1].ly[cl], _local2.uo[_local1].lz[cl], ut);
}
_local1++;
}
}
};
_local1.stop = function () {
var _local1 = this;
if (_local1.nm) {
_local1.nm = false;
b.s(_local1);
}
};
_local1.dc(z);
}
function ef(z) {
var _local1 = this;
var _local2 = z;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.eh = _local2.eh;
_local1.ej = _local2.ej;
if (typeof(_local2.frames) == "number") {
_local1.ux = 0;
_local1.uy = _local2.frames;
_local1.n = _local1.uz;
} else if (typeof(_local2.eg) == "number") {
_local1.va = getTimer();
_local1.vb = _local2.eg;
_local1.n = _local1.vc;
} else {
q("invalid delay...");
r(_local2);
return(false);
}
b.m(_local1);
return(undefined);
};
_local1.uz = function () {
var _local1 = this;
_local1.ux++;
if (_local1.ux >= _local1.uy) {
_local1.vd();
}
};
_local1.vc = function () {
var _local2 = this;
var _local1 = Math.max(0, _local2.vb - ((getTimer() - _local2.va) / 1000));
if (_local1 == 0) {
_local2.vd();
}
return(_local1);
};
_local1.vd = function () {
var _local1 = this;
b.s(_local1);
if (_local1.eh) {
_local1.eh.call(_local1.ej);
}
};
_local1.dc(_local2);
}
function px(z) {
var _local1 = this;
var _local2 = _root;
var _local3 = z;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.parent = _local2.parent;
_local1.ag = _local2.av;
_local1.ve = _local2.ve || (_local2.av);
_local1.py = _local2.py;
_local1.ag.vf = _local1;
_local1.iv();
};
_local1.iv = function () {
var _local1 = this;
_local1.ag.onPress = _local1.vg;
_local1.ag.onRelease = _local1.vh;
_local1.ag.onReleaseOutside = _local1.vi;
};
_local1.jl = function () {
var _local1 = this;
delete _local1.ag.onPress;
delete _local1.ag.onRelease;
delete _local1.ag.onReleaseOutside;
delete _local1.ag.onMouseMove;
};
_local1.vg = function () {
var _local1 = this;
var _local2 = _root;
_local1.vj = _local1.vf.ve._x - _local2._xmouse;
_local1.vk = _local1.vf.ve._y - _local2._ymouse;
if (_local1.vf.py) {
_local1.vl = _local1.vf.ve._x - _local2._xmouse;
_local1.vm = _local1.vf.ve._y - _local2._ymouse;
}
_local1.onMouseMove = function () {
var _local1 = this;
var _local2 = _root;
_local1.vf.ve._x = _local2._xmouse + _local1.vj;
_local1.vf.ve._y = _local2._ymouse + _local1.vk;
if (_local1.vf.py) {
_local1.vf.py._x = _local2._xmouse + _local1.vl;
_local1.vf.py._y = _local2._ymouse + _local1.vm;
}
};
_local1.vf.vn();
};
_local1.vh = function () {
this.vf.vo();
};
_local1.vi = function () {
this.vf.vo();
};
_local1.vn = function () {
var _local1 = this;
if (_local1.parent.qo) {
_local1.parent.qo(_local1.ve);
}
};
_local1.vo = function () {
var _local1 = this;
delete _local1.ag.onMouseMove;
if (_local1.parent.qp) {
_local1.parent.qp(_local1.ve);
}
};
_local1.dc(_local3);
}
function ll(z) {
var _local1 = this;
_local1.tv = true;
_local1.vp = false;
_local1.vq = [];
_local1.vr = 180;
_local1.vs = 100;
_local1.vt = -1;
_local1.vu = ["mad", "tired", "superior", "happy", "surprised"];
_local1.vv = false;
_local1.vw = 5;
_local1.dc = function (z) {
var _local1 = this;
_local1.parent = z.parent;
_local1.ag = d.y({ah:"emoticons", ai:z.ai, aj:z.aj, am:false, at:6});
_local1.ai = _local1.ag._x;
_local1.aj = _local1.ag._y;
_local1.ty = _local1.ag._width;
_local1.tz = _local1.ag._height;
var _local2;
var _local3 = 1;
while (_local3 <= 5) {
_local2 = _local1.ag["icon_" + _local3];
_local1.vq.push(_local2);
_local2.ai = _local2._x + _local1.ai;
_local2.aj = _local2._y + _local1.aj;
_local3++;
}
_local1.ag.onRelease = function () {
this.parent.vx();
};
_local1.ag.parent = _local1;
_local1.ag.onRollOver = function () {
this.parent.vp = true;
};
_local1.ag.onRollOut = function () {
this.parent.vp = false;
this.parent.tv = false;
};
_local1.ag.onDragOut = function () {
this.parent.vp = false;
this.parent.tv = false;
};
b.m(_local1);
};
_local1.vx = function () {
var _local1 = this;
i.ce.cf.dx.mh(_local1.vu[_local1.vt]);
_local1.vy = getTimer();
_local1.vv = true;
};
_local1.vz = function () {
i.ce.cf.dx.mh("neutral");
this.vv = false;
};
_local1.n = function () {
var _local1 = this;
if (_local1.vv) {
var ja = Math.max(0, _local1.vw - ((getTimer() - _local1.vy) / 1000));
if (ja == 0) {
_local1.vz();
}
}
_local1.wa = _root._xmouse;
_local1.wb = _root._ymouse;
if (_local1.tv && (!_local1.vp)) {
} else {
_local1.tv = false;
if (_local1.vp) {
var wc = (_local1.ai + (_local1.ty / 2));
var wd = (_local1.aj + _local1.tz);
var ai = (_root._xmouse - wc);
var aj = (_root._ymouse - wd);
var we = Math.sqrt((ai * ai) + (aj * aj));
ai = ai / we;
aj = aj / we;
var nz = Math.acos(-aj);
if (ai < 0) {
nz = -nz;
}
var wf = 2.9845130209103;
nz = nz + (wf / 2);
var wg = Math.floor(5 * (nz / wf));
_local1.vt = Math.max(0, Math.min(4, wg));
} else {
_local1.vt = -1;
}
var _local3;
var gi = true;
var _local2 = 0;
while (_local2 < _local1.vq.length) {
if (_local2 == _local1.vt) {
_local3 = _local1.vq[_local2]._xscale + ((_local1.vr - _local1.vq[_local2]._xscale) * 0.45);
gi = gi & (_local1.vr == Math.round(_local3));
_local1.vq[_local2]._xscale = _local3;
_local1.vq[_local2]._yscale = _local3;
} else {
_local3 = _local1.vq[_local2]._xscale + ((_local1.vs - _local1.vq[_local2]._xscale) * 0.45);
gi = gi & (_local1.vs == Math.round(_local3));
_local1.vq[_local2]._xscale = _local3;
_local1.vq[_local2]._yscale = _local3;
}
_local2++;
}
_local1.tv = gi;
}
};
_local1.ev = function () {
var _local1 = this;
_local1.ag._visible = true;
_local1.ag._alpha = 0;
var _local2 = new lu();
_local2.go([{av:_local1.ag, ly:{_rotation:20, _alpha:0}, lz:{_rotation:0, _alpha:100}}], {duration:300});
};
_local1.iv = function () {
};
_local1.jl = function () {
};
_local1.show = function () {
this.ag._visible = true;
};
_local1.hide = function () {
this.ag._visible = false;
};
_local1.dc(z);
}
function lm(z) {
var _local1 = this;
var _local2 = z;
function uv(az, bc, cv) {
var _local1 = az;
if (_local1 >= bc) {
return(((_local1 > cv) ? (cv) : (_local1)));
}
return(bc);
}
function uw(ly, lz, wt) {
return(ly + ((lz - ly) * wt));
}
_local1.nm = false;
_local1.wh = -41;
_local1.wi = 6;
_local1.wj = 59;
_local1.wk = 11;
_local1.eh = null;
_local1.ej = null;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.ag = d.y({ah:"hourglass", ai:_local2.ai, aj:_local2.aj, an:0});
_local1.ag._xscale = _local2.scale;
_local1.ag._yscale = _local2.scale;
_local1.wl = _local1.ag.mask_top;
_local1.wm = _local1.ag.mask_bottom;
_local1.wn = _local1.ag.sand;
_local1.ls = new lu();
_local1.wl.stop();
_local1.wm.stop();
_local1.wn.stop();
_local1.wn._visible = false;
};
_local1.start = function (z) {
var _local1 = this;
var _local2 = z;
_local1.wo = (_local2.wp / 100) || 1;
_local1.duration = _local2.duration || 5000;
_local1.uq = new Date().getTime();
_local1.eh = _local2.eh;
_local1.ej = _local2.ej;
_local1.wq = uw(_local1.wh, _local1.wi, 1 - _local1.wo);
_local1.wr = uw(_local1.wj, _local1.wk, 1 - _local1.wo);
_local1.wl.gotoAndPlay(1);
_local1.wm.gotoAndPlay(1);
_local1.wn.gotoAndPlay(1);
_local1.wn._visible = true;
if (!_local1.nm) {
_local1.nm = true;
b.m(_local1);
var _local3 = [{ly:{_rotation:180, _alpha:10}, lz:{_rotation:0, _alpha:100}, av:_local1.ag}];
_local1.ls.go(_local3, {duration:250});
}
_local1.n();
};
_local1.stop = function () {
var _local1 = this;
_local1.wl.stop();
_local1.wm.stop();
_local1.wn.stop();
_local1.wn._visible = false;
if (_local1.nm) {
_local1.nm = false;
b.s(_local1);
var _local2 = [{ly:{_rotation:0, _alpha:100}, lz:{_rotation:-180, _alpha:0}, av:_local1.ag}];
_local1.ls.go(_local2, {duration:250});
}
};
_local1.n = function () {
var _local1 = this;
var ws = new Date().getTime();
var _local3 = uv(ws - _local1.uq, 0, _local1.duration);
var _local2 = _local3 / _local1.duration;
if (_local3 >= _local1.duration) {
_local1.stop();
_local1.wl._y = _local1.wi;
_local1.wm._y = _local1.wk;
if (_local1.eh) {
_local1.eh.call(_local1.ej);
}
} else {
var wu = uw(_local1.wq, _local1.wi, _local2);
var wv = uw(_local1.wr, _local1.wk, _local2);
_local1.wl._y = wu;
_local1.wm._y = wv;
}
};
_local1.show = function () {
};
_local1.hide = function () {
};
_local1.qs = function () {
var _local1 = this;
_local1.ls.stop();
d.au(_local1.ag);
if (_local1.nm) {
b.s(_local1);
}
};
_local1.dc(_local2);
}
function ln(z) {
var _local1 = this;
_local1.ww = [];
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.lo = _local2.lo;
_local1.kx = d.y({ah:"chat_box", ai:_local1.lo.kx[0], aj:_local1.lo.kx[1], am:false, an:0, at:9});
_local1.kx.ty = _local1.kx._width;
_local1.kx.tz = _local1.kx._height;
_local1.kx.bg.onRelease = function () {
};
_local1.kx.bg.useHandCursor = false;
_local1.kw = d.y({ah:"chat_icon", ai:_local1.lo.kw[0], aj:_local1.lo.kw[1], am:false, at:6});
_local1.wx = new rg({ag:_local1.kw, rh:"open", ej:_local1, eh:_local1.wy, ri:4, rn:60});
_local1.kw.ty = _local1.kw._width;
_local1.kw.tz = _local1.kw._height;
_local1.wz = _local2.lp;
_local1.xa = _local1.kx.chat_in;
_local1.xb = _local1.kx.send_button;
_local1.xc = {fe:false, xd:0, xe:0, nl:0, xf:1000};
_local1.ls = new lu();
if (typeof(_local2.xg) == "string") {
_local1.xg = _local2.xg;
}
_local1.xa.maxChars = 40;
_local1.xa.fe = false;
_local1.xa.onSetFocus = function () {
this.fe = true;
};
_local1.xa.onKillFocus = function () {
this.fe = false;
};
_local1.onKeyUp = function () {
if (!this.xa.fe) {
if (Key.getCode() == 32) {
this.wy();
}
}
};
_local1.onKeyDown = function () {
var _local1 = this;
if (_local1.xa.fe) {
if (_local1.xa.text == "") {
if ((Key.getCode() == 13) || (Key.getCode() == 32)) {
_local1.xh();
}
} else if (Key.getCode() == 13) {
_local1.xi();
}
}
};
Key.addListener(_local1);
_local1.xj = new rg({ag:_local1.xb, ej:_local1, eh:_local1.xi, rn:72});
_local1.xa.text = "";
};
_local1.xi = function () {
var _local1 = this;
var _local3 = getTimer();
if (_local1.xc.fe) {
if (_local3 > (_local1.xc.xd + (_local1.xc.xf * 5))) {
_local1.xc.fe = false;
// unexpected jump
}
} else {
_local1.xc.nl++;
_local1.xc.xe = _local1.xc.xe + (_local3 - _local1.xc.xd);
_local1.xc.xd = _local3;
if (_local1.xc.nl >= 3) {
if (_local1.xc.xe < (_local1.xc.xf * 3)) {
_local1.xl(i.ce.cf.cg, (newline + _local1.wz) + newline);
_local1.xc.fe = true;
}
_local1.xc.nl = 0;
_local1.xc.xe = 0;
if (_local1.xc.fe) {
return;
}
} else {
var _local2 = _local1.xa.text;
if (_local2 != "") {
i.cc.cd((("MSG " + i.ce.cf.cg) + ",") + _local2);
_local1.xl(i.ce.cf.cg, _local2);
g.play("tone_a.aif", false, 60);
}
_local1.xh();
}
}
};
_local1.gf = function (fl) {
var _local1 = fl.split(",", 2);
var _local3 = parseInt(_local1[0]);
var _local2 = _local1[1];
this.xl(_local3, _local2);
g.play("tone_b.aif", false, 60);
};
_local1.xn = function () {
Selection.setFocus(this.xa);
};
_local1.show = function () {
this.kw._visible = true;
};
_local1.hide = function () {
this.kw._visible = false;
this.kx._visible = false;
};
_local1.wy = function () {
var _local1 = this;
_local1.xa.text = "";
var _local2 = [{lz:{_alpha:0, _x:_local1.lo.kx[0], _y:_local1.lo.kx[1], _width:_local1.kx.ty, _height:_local1.kx.tz}, ly:{_alpha:100, _x:_local1.lo.kw[0], _y:_local1.lo.kw[1], _width:_local1.kw.ty, _height:_local1.kw.tz}, av:_local1.kw}, {lz:{_alpha:100, _x:_local1.lo.kx[0], _y:_local1.lo.kx[1], _width:_local1.kx.ty, _height:_local1.kx.tz}, ly:{_alpha:0, _x:_local1.lo.kw[0], _y:_local1.lo.kw[1], _width:_local1.kw.ty, _height:_local1.kw.tz}, av:_local1.kx}];
_local1.ls.go(_local2, {duration:300});
_local1.xn();
};
_local1.xh = function () {
var _local1 = this;
var _local2 = [{lz:{_alpha:0, _x:_local1.lo.kw[0], _y:_local1.lo.kw[1], _width:_local1.kw.ty, _height:_local1.kw.tz}, ly:{_alpha:100, _x:_local1.lo.kx[0], _y:_local1.lo.kx[1], _width:_local1.kx.ty, _height:_local1.kx.tz}, av:_local1.kx}, {lz:{_alpha:100, _x:_local1.lo.kw[0], _y:_local1.lo.kw[1], _width:_local1.kw.ty, _height:_local1.kw.tz}, ly:{_alpha:0, _x:_local1.lo.kx[0], _y:_local1.lo.kx[1], _width:_local1.kx.ty, _height:_local1.kx.tz}, av:_local1.kw}];
_local1.ls.go(_local2, {duration:300});
};
_local1.xl = function (du, cu) {
var _local1 = this;
if (_local1.ww[du] != undefined) {
if (_local1.ww[du].xo < 3) {
_local1.ww[du].xo = 2;
_local1.ww[du].xp = true;
_local1.ww[du].xq();
}
}
var _local3 = i.de.kn[i.ce.dw[du].iu];
var xs = (_local3[0] < (i.width / 2));
var xt = (_local3[1] < (i.height / 2));
var xu = (xt ? -1 : 1);
var pp = (_local3[0] + (xs ? -5 : 10));
var pq = (xt ? (_local3[1] + 60) : (_local3[1] - 40));
var xv = (xt ? "chat_bubble_flipped" : "chat_bubble");
var _local2 = d.y({ah:xv, ai:pp, aj:pq, an:0, at:9});
_local2.txt.text = cu;
var xw = ((_local2.txt._height - _local2.txt.textHeight) / 2);
if (xw > 3) {
_local2.txt._y = _local2.txt._y + (((_local2.txt._height - _local2.txt.textHeight) / 2) - 2);
}
_local2.ls = new lu();
_local1.ww[du] = _local2;
_local2.du = du;
_local2.parent = _local1;
_local2.xo = 0;
_local2.xq = function () {
var _local1 = this;
if (_local1.xo == 0) {
var _local2 = [{ly:{_alpha:0, _y:pq}, lz:{_alpha:100, _y:pq - (15 * xu)}, av:_local1}];
_local1.ls.go(_local2, {duration:400, ej:_local1, eh:_local1.xq});
} else if (_local1.xo == 1) {
var _local2 = [{ly:{_y:_local1._y}, lz:{_y:_local1._y - (5 * xu)}, av:_local1}];
_local1.ls.go(_local2, {duration:2000, ej:_local1, eh:_local1.xq});
} else if (_local1.xo == 2) {
var _local2 = [{ly:{_y:_local1._y, _alpha:100}, lz:{_y:_local1._y - (10 * xu), _alpha:0}, av:_local1}];
_local1.ls.go(_local2, {duration:300, ej:_local1, eh:_local1.xq});
} else if (_local1.xo == 3) {
_local1.ls.stop();
if (!_local1.xp) {
_local1.parent.ww[_local1.du] = null;
}
d.au(_local1);
}
_local1.xo++;
};
_local2.xq();
};
_local1.dc(z);
}
function nw(z) {
var _local1 = this;
var _local3 = z;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.parent = _local2.parent;
_local1.ai = _local2.ai;
_local1.aj = _local2.aj;
_local1.xx = [];
};
_local1.hq = function (xy, xz) {
var _local1 = this;
var _local2 = xz;
var pp = ((_local1.parent.nq[_local2.iu][0] + random(4)) - 2);
var pq = ((_local1.parent.nq[_local2.iu][1] + random(2)) - 1);
var ya = ((_local1.parent.nq[_local2.iu][2] + random(4)) - 2);
var _local3 = _local1.parent.nq[_local2.iu][3];
var ff = function () {
this.yc(6);
};
xy.yd({ai:pp, aj:pq, nz:ya, scale:_local3, ff:ff, ye:xy});
_local1.xx.push(xy);
};
_local1.ib = function () {
return(this.xx.length);
};
_local1.ih = function () {
return(this.xx);
};
_local1.ii = function () {
this.xx = [];
};
_local1.iv = function () {
};
_local1.jl = function () {
};
_local1.show = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].show();
_local1++;
}
};
_local1.hide = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].hide();
_local1++;
}
};
_local1.qs = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].qs();
_local1++;
}
};
_local1.dc(_local3);
}
function oe(z) {
var _local1 = this;
var _local3 = z;
_local1.dc = function (z) {
var _local1 = this;
_local1.parent = z.parent;
_local1.ai = z.ai;
_local1.aj = z.aj;
_local1.nz = z.nz;
_local1.scale = z.scale;
_local1.of = z.of;
_local1.og = z.og;
_local1.oh = z.oh;
_local1.oi = z.oi;
_local1.hj = null;
_local1.xx = [];
z.yf = 40;
var yg = [];
var pp = _local1.ai;
var pq = _local1.aj;
var yh = true;
if (z.yf > 0) {
var _local3 = 0;
while (_local3 < z.yf) {
var _local2 = new yi({ai:pp, aj:pq, scale:_local1.scale, oj:z.oj, parent:_local1});
_local2.hide();
_local1.xx.push(_local2);
yg.push(_local2.yj());
if ((_local3 % 8) == 7) {
pq = pq - 1;
pp = pp - 1;
}
_local3++;
}
}
d.sort(yg);
_local1.xx[_local1.xx.length - 1].show();
};
_local1.fw = function (fr) {
var _local1 = this;
var _local3 = fr;
q("Deck.setTrump()", _local3);
if (_local1.xx.length > 0) {
var _local2 = _local1.xx[0];
_local1.xx.splice(0, 1);
_local2.hz({color:_local3.charAt(1), value:_local3.charAt(0)});
_local2.yk(true);
_local2.yd({ai:_local1.of, aj:_local1.og, nz:_local1.oh, scale:_local1.yl});
_local1.hj = _local2;
}
};
_local1.ht = function () {
q("deck.get_trump_card()");
var _local1 = this.hj;
this.hj = null;
return(_local1);
};
_local1.ym = function () {
var _local1 = this;
var _local2 = null;
if (_local1.xx.length > 0) {
_local2 = _local1.xx[_local1.xx.length - 1];
_local1.xx.splice(_local1.xx.length - 1, 1);
_local2.show();
if (_local1.xx.length > 0) {
_local1.xx[_local1.xx.length - 1].show();
}
} else if (_local1.hj) {
_local2 = _local1.hj;
_local1.hj = null;
}
return(_local2);
};
_local1.hr = function () {
return(this.xx.length + ((this.hj != null) ? 1 : 0));
};
_local1.iv = function () {
};
_local1.jl = function () {
};
_local1.show = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
if ((_local1 % 8) == 0) {
_local2.xx[_local1].show();
}
_local1++;
}
if (_local2.xx.length > 0) {
_local2.xx[_local2.xx.length - 1].show();
}
if (_local2.hj != null) {
_local2.hj.show();
}
};
_local1.hide = function () {
var _local2 = this;
q("deck.hide()");
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].hide();
_local1++;
}
if (_local2.hj != null) {
_local2.hj.hide();
}
};
_local1.qs = function () {
};
_local1.dc(_local3);
}
function yi(z) {
var _local1 = this;
var _local2 = z;
_local1.value = null;
_local1.color = null;
_local1.yo = true;
_local1.yp = null;
_local1.yq = null;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
yn++;
_local1.parent = _local2.parent;
_local1.ai = _local2.ai;
_local1.aj = _local2.aj;
_local1.nz = _local2.nz;
_local1.scale = _local2.scale;
_local1.scale = ((typeof(_local2.scale) == "number") ? (_local2.scale) : 100);
_local1.yr = new lu();
_local1.ys = d.y({ai:_local1.ai, aj:_local1.aj, at:8, af:_local2.oj});
_local1.yp = d.y({ah:"card_bg", af:_local1.ys, ai:0, aj:0});
_local1.yq = d.y({ah:"card_fg", af:_local1.ys, ai:0, aj:0, am:false});
_local1.yp._x = _local1.yp._x - (_local1.yp._width / 2);
_local1.yp._y = _local1.yp._y - (_local1.yp._height / 2);
_local1.yq._x = _local1.yq._x - (_local1.yq._width / 2);
_local1.yq._y = _local1.yq._y - (_local1.yq._height / 2);
_local1.yq.gotoAndStop(1);
_local1.yk(false);
_local1.ys.parent = _local1;
_local1.ys._rotation = _local1.nz;
_local1.ys.yt = function (yu) {
this._xscale = yu;
this._yscale = yu;
};
_local1.ys.addProperty("scale", function () {
return(this._xscale);
}, _local1.ys.yt);
_local1.ys.yt(_local1.scale);
_local1.ys.onRollOver = function () {
this.parent.yv(this);
};
_local1.ys.onDragOver = function () {
this.parent.yv(this);
};
_local1.ys.onRollOut = function () {
this.parent.yw(this);
};
_local1.ys.onDragOut = function () {
this.parent.yw(this);
};
_local1.ys.useHandCursor = false;
_local1.width = _local1.yp._width;
_local1.height = _local1.yp._height;
};
_local1.yv = function (ag) {
this.parent.yv(this);
};
_local1.yw = function () {
this.parent.yw(this);
};
_local1.yx = function (ai, aj) {
var _local1 = this;
_local1.ys._x = (_local1.ai = ai);
_local1.ys._y = (_local1.aj = aj);
};
_local1.yy = function (cn) {
this.parent = cn;
};
_local1.yd = function (z) {
var _local1 = this;
var _local2 = z;
var ai = ((typeof(_local2.ai) == "number") ? (_local2.ai) : (_local1.ys._x));
var aj = ((typeof(_local2.aj) == "number") ? (_local2.aj) : (_local1.ys._y));
var nz = ((typeof(_local2.nz) == "number") ? (_local2.nz) : (_local1.ys._rotation));
var _local3 = ((typeof(_local2.scale) == "number") ? (_local2.scale) : (_local1.ys._xscale));
_local1.ai = ai;
_local1.aj = aj;
_local1.nz = nz;
_local1.scale = _local3;
var lx = [{lz:{_x:ai, _y:aj, _rotation:nz, scale:_local3}, ly:{_x:_local1.ys._x, _y:_local1.ys._y, _rotation:_local1.ys._rotation, scale:_local1.ys._xscale}, av:_local1.ys}];
_local1.yr.go(lx, {duration:350, eh:_local2.ff, ej:_local2.ye});
};
_local1.yz = function () {
var _local1 = this;
_local1.ys.onRelease = function () {
this.parent.za();
};
_local1.ys.useHandCursor = true;
};
_local1.zb = function () {
delete this.ys.onRelease;
this.ys.useHandCursor = false;
};
_local1.yc = function (we) {
this.ys.yc(we);
};
_local1.hz = function (zc) {
var _local1 = this;
var _local2 = zc;
if ((_local2.color == "x") || (_local2.value == "x")) {
} else {
_local1.color = _local2.color;
_local1.value = _local2.value;
_local1.yq.gotoAndStop(_local1.zd(_local1.color, _local1.value));
_local1.ys._visible = true;
}
};
_local1.yk = function (ze) {
if (this.yo != ze) {
this.ia();
}
};
_local1.ia = function () {
var _local1 = this;
if (_local1.yo) {
_local1.yo = false;
_local1.yq._visible = false;
_local1.yp._visible = true;
} else {
_local1.yo = true;
_local1.yq._visible = true;
_local1.yp._visible = false;
}
};
_local1.za = function () {
this.parent.zf(this, "args...");
};
_local1.iv = function () {
};
_local1.jl = function () {
};
_local1.show = function () {
this.ys._visible = true;
};
_local1.hide = function () {
this.ys._visible = false;
};
_local1.yj = function () {
return(this.ys);
};
_local1.qs = function () {
var _local1 = this;
d.au(_local1.yq);
d.au(_local1.yp);
d.au(_local1.ys);
yn--;
};
_local1.zd = function (zg, zh) {
var _local1 = 0;
switch (zg) {
case "S" :
break;
case "H" :
_local1 = 13;
break;
case "C" :
_local1 = 26;
break;
case "D" :
_local1 = 39;
}
return(this.zj(zh) + _local1);
};
_local1.zk = function () {
return(this.zj(this.value));
};
_local1.zj = function (zh) {
var _local2 = parseInt(zh);
if ((_local2 > 0) && (_local2 < 10)) {
return(_local2);
}
var _local1 = {};
_local1.T = 10;
_local1.J = 11;
_local1.Q = 12;
_local1.K = 13;
_local1.A = 14;
return(_local1[zh]);
};
_local1.dc(_local2);
}
function zn(z) {
var _local1 = this;
_local1.dc = function (z) {
var _local2 = this;
_local2.parent = z.parent;
_local2.xx = z.xx;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx.zo(_local2);
_local1++;
}
var _local3 = _local2.parent.zp();
_local2.ai = _local3.ai;
_local2.aj = _local3.aj;
_local2.nz = _local3.nz;
};
_local1.zq = function () {
var _local1 = this;
var ff = function () {
this.hide();
};
var _local2 = 0;
while (_local2 < _local1.xx.length) {
_local1.xx[_local2].yc(8);
_local1.xx[_local2].yk(false);
if (_local2 > 0) {
_local1.xx[_local2].yd({ai:_local1.ai, aj:_local1.aj, nz:_local1.nz, ff:ff, ye:_local1.xx[_local2]});
} else {
_local1.xx[_local2].yd({ai:_local1.ai, aj:_local1.aj, nz:_local1.nz});
}
_local2++;
}
g.play("card_sound_6.aif", false, 80);
};
_local1.ib = function () {
return(this.xx.length);
};
_local1.yj = function () {
return(this.xx[0].yj());
};
_local1.ih = function () {
return(this.xx);
};
_local1.ii = function () {
this.xx = [];
};
_local1.iv = function () {
};
_local1.jl = function () {
};
_local1.show = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].show();
_local1++;
}
};
_local1.hide = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].hide();
_local1++;
}
};
_local1.qs = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].qs();
_local1++;
}
};
_local1.dc(z);
}
function zr(z) {
var _local1 = this;
_local1.xx = [];
_local1.vp = false;
_local1.zs = -1;
_local1.vs = 140;
_local1.vr = 155;
_local1.zt = 40;
_local1.zu = 4;
_local1.zv = (Math.PI/2) / _local1.zt;
_local1.zw = 8;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.parent = _local2.parent;
_local1.zx(_local2.ai, _local2.aj);
b.m(_local1);
};
_local1.zx = function (ai, aj, nz, scale) {
var _local1 = this;
_local1.ai = ai;
_local1.aj = aj;
_local1.nz = nz;
_local1.scale = scale;
};
_local1.fs = function (fr) {
var _local2 = this;
var _local3 = fr;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2.ym(_local2.ai + (_local2.xx.length * 32), _local2.aj, {color:_local3.charAt(_local1 + 1), value:_local3.charAt(_local1)});
_local1 = _local1 + 2;
}
_local2.zy();
};
_local1.zy = function () {
var _local1 = this;
_local1.zz();
var fh = (_local1.parent.oa ? 32 : 16);
var aaa = (Math.cos((_local1.nz * Math.PI) / 180) * fh);
var aab = (Math.sin((_local1.nz * Math.PI) / 180) * fh);
var aac = 8;
var ai = _local1.ai;
var _local3 = _local1.aj;
var nz = _local1.nz;
var _local2 = 1;
while (_local2 < _local1.xx.length) {
ai = ai - (aaa / 2);
_local3 = _local3 - (aab / 2);
nz = nz - (aac / 2);
_local2++;
}
_local2 = 0;
while (_local2 < _local1.xx.length) {
_local1.xx[_local2].yd({ai:ai, aj:_local3, nz:nz, scale:_local1.scale});
ai = ai + aaa;
_local3 = _local3 + aab;
nz = nz + aac;
_local2++;
}
};
_local1.id = function () {
return(this.xx.length);
};
_local1.aad = function () {
return(this.xx[random.bv(0, this.xx.length - 1)]);
};
_local1.ym = function (ai, aj, zc) {
var _local2 = this;
var _local1 = _local2.parent.parent.hi.ym();
_local1.yy(_local2);
_local1.hz(zc);
_local2.hq(_local1);
};
_local1.aae = function (ai, aj, zc) {
var _local1 = new yi({ai:ai, aj:aj, parent:this});
_local1.hz(zc);
this.hq(_local1);
};
_local1.hq = function (xy) {
var _local1 = this;
var _local2 = xy;
if (_local1.parent.oa && (_local1.enabled)) {
_local2.yz();
}
_local2.yy(_local1);
_local1.xx.push(_local2);
_local1.zy();
};
_local1.aaf = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].yk(true);
_local1++;
}
};
_local1.zf = function (ch, aag) {
var _local2 = this;
var _local3 = 1000000 /* 0x0F4240 */;
var aai = null;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
aaa = Math.abs(_local2.xx[_local1].ai - _local2.wa);
if (aaa < _local3) {
_local3 = aaa;
aai = _local2.xx[_local1];
}
_local1++;
}
_local2.parent.hk(_local2, aai);
};
_local1.yv = function (hl) {
this.vp = true;
};
_local1.yw = function (hl) {
this.vp = false;
};
_local1.fz = function (yu) {
var _local2 = this;
if (_local2.zs != yu) {
if (_local2.zs >= 0) {
var ja = new lu();
var _local1 = _local2.xx[_local2.zs];
var lx = [{lz:{_x:_local1.ai, _y:_local1.aj}, ly:{_x:_local1.ys._x, _y:_local1.ys._y}, av:_local1.ys}];
ja.go(lx, {duration:350});
}
_local2.zs = yu;
var _local1 = _local2.xx[_local2.zs];
var _local3 = ((Math.PI*2) * _local1.ys._rotation) / 360;
var aaj = (_local1.ai + (6 * Math.sin(_local3)));
var aak = (_local1.aj - (6 * Math.cos(_local3)));
var ja = new lu();
var lx = [{lz:{_x:aaj, _y:aak}, ly:{_x:_local1.ys._x, _y:_local1.ys._y}, av:_local1.ys}];
ja.go(lx, {duration:350});
}
};
_local1.aal = function (yu) {
};
_local1.hy = function (p) {
var _local1 = p;
if ((_local1 < 0) || (_local1 >= this.xx.length)) {
return(null);
}
return(this.xx[_local1]);
};
_local1.hn = function (ch) {
var _local2 = this;
var _local3 = ch;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
if (_local3 == _local2.xx[_local1]) {
return(_local1);
}
_local1++;
}
return(undefined);
};
_local1.ho = function (ch) {
var _local2 = this;
var _local3 = ch;
_local2.zs = -1;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
if (_local3 == _local2.xx[_local1]) {
_local2.xx.splice(_local1, 1);
if (i.ce.hi.hr() == 0) {
_local2.zy();
}
_local3.zb();
g.play("click_sound_2.aif", false, 65);
return(_local3);
}
_local1++;
}
return(undefined);
};
_local1.aam = function () {
var _local2 = this;
var _local1 = _local2.xx[_local2.xx.length - 1];
var _local3 = _local2.xx[0];
var aap = ((((_local2.wa > (_local3.ai - (_local3.ys._width / 2))) && (_local2.wa < (_local1.ai + (_local1.ys._width / 2)))) && (_local2.wb > (_local1.aj - (_local1.ys._height / 2)))) && (_local2.wb < (_local1.aj + (_local1.ys._height / 2))));
return(aap);
};
_local1.n = function () {
var _local1 = this;
if (_local1.parent.oa) {
_local1.wa = _root._xmouse;
_local1.wb = _root._ymouse;
if (_local1.enabled) {
if (_local1.aam()) {
var _local3;
var aah = 1000000;
var aai = null;
var aaq = -1;
var _local2 = 0;
while (_local2 < _local1.xx.length) {
_local3 = Math.abs(_local1.xx[_local2].ai - _local1.wa);
if (_local3 < aah) {
aah = _local3;
aaq = _local2;
aai = _local1.xx[_local2];
}
_local2++;
}
var cv = _local1.xx[aaq];
var nz = (((Math.PI*2) * cv.ys._rotation) / 360);
var aar = (cv.ai + (_local1.zw * Math.sin(nz)));
var aas = (cv.aj - (_local1.zw * Math.cos(nz)));
if (aaq != _local1.zs) {
if (_local1.zs >= 0) {
var aat = _local1.xx[_local1.zs];
var ja = new lu();
var lx = [{lz:{_y:aat.aj}, ly:{_y:aat.ys._y}, av:aat.ys}];
ja.go(lx, {duration:100});
}
_local1.zs = aaq;
var ja = new lu();
var lx = [{lz:{_y:aas}, ly:{_y:cv.ys._y}, av:cv.ys}];
ja.go(lx, {duration:100});
i.cc.cd((("GMO " + _local1.parent.cg) + ",") + _local1.zs);
}
_local2 = 0;
while (_local2 < _local1.xx.length) {
var aau = (_local1.xx[_local2].ys._width * ((_local2 / (_local1.xx.length - 1)) - 0.5));
_local3 = (_local1.xx[_local2].ai - _local1.wa) + aau;
_local3 = Math.min(Math.max(_local3, -_local1.zt), _local1.zt);
var pp = ((_local2 == aaq) ? (aar) : (_local1.xx[_local2].ai));
var aaj = (pp + (_local1.zu * Math.sin(_local3 * _local1.zv)));
_local1.xx[_local2].ys._x = _local1.xx[_local2].ys._x + ((aaj - _local1.xx[_local2].ys._x) * 0.3);
_local2++;
}
} else {
if (_local1.zs >= 0) {
_local1.zs = -1;
i.cc.cd((("GMO " + _local1.parent.cg) + ",") + _local1.zs);
}
var _local2 = 0;
while (_local2 < _local1.xx.length) {
_local1.xx[_local2].ys._x = _local1.xx[_local2].ys._x + ((_local1.xx[_local2].ai - _local1.xx[_local2].ys._x) * 0.6);
_local1.xx[_local2].ys._y = _local1.xx[_local2].ys._y + ((_local1.xx[_local2].aj - _local1.xx[_local2].ys._y) * 0.6);
_local2++;
}
}
} else if (_local1.zs >= 0) {
_local1.zs = -1;
i.cc.cd((("GMO " + _local1.parent.cg) + ",") + _local1.zs);
}
}
return(true);
};
_local1.iv = function () {
var _local2 = this;
_local2.enabled = true;
if (_local2.parent.oa) {
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].yz();
_local1++;
}
}
};
_local1.zz = function () {
var _local2 = this;
var _local3 = [];
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local3.push(_local2.xx[_local1].yj());
_local1++;
}
d.sort(_local3);
};
_local1.jl = function () {
var _local2 = this;
_local2.enabled = false;
if (_local2.parent.oa) {
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].zb();
_local1++;
}
}
};
_local1.fd = function () {
var _local2 = this;
b.s(_local2);
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].fd();
_local1++;
}
};
_local1.show = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].show();
_local1++;
}
};
_local1.hide = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].hide();
_local1++;
}
};
_local1.qs = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.xx.length) {
_local2.xx[_local1].qs();
_local1++;
}
_local2.xx = [];
};
_local1.dc(z);
}
function ob(z) {
var _local1 = this;
_local1.dc = function (z) {
var _local1 = this;
var _local2 = z;
_local1.parent = _local2.parent;
_local1.pf = _local2.pf;
_local1.cg = _local2.cg;
_local1.aaw = _local2.dx;
_local1.oa = _local2.oa;
_local1.ki = -1;
_local1.ea = -1;
_local1.iu = -1;
_local1.dx = null;
_local1.hh = false;
_local1.fc = false;
_local1.aax = _local1.parent.lo[_local1.cg][0] + (_local1.parent.lo[_local1.cg][2] / 2);
_local1.aay = _local1.parent.lo[_local1.cg][1] + (_local1.parent.lo[_local1.cg][3] / 2);
_local1.aaz = _local1.parent.np[_local1.cg];
_local1.fy = new zr({parent:_local1, ai:_local1.aaz[0], aj:_local1.aaz[1]});
_local1.aba = [];
};
_local1.kg = function (fq) {
this.ki = fq;
};
_local1.kj = function (fq) {
var _local1 = this;
var _local2 = fq;
_local1.iu = _local2;
_local1.aax = _local1.parent.lo[_local1.iu][0] + (_local1.parent.lo[_local1.iu][2] / 2);
_local1.aay = _local1.parent.lo[_local1.iu][1] + (_local1.parent.lo[_local1.iu][3] / 2);
_local1.aaz = _local1.parent.np[_local1.iu];
_local1.fy.zx(_local1.aaz[0], _local1.aaz[1], _local1.aaz[2], _local1.aaz[3]);
i.de.mi(_local2, _local1.dx);
i.de.mr(_local2, _local1.ea, _local1.pf);
};
_local1.oc = function () {
var _local1 = this;
_local1.dx = new qt({parent:_local1, cg:_local1.cg, dx:_local1.aaw, ai:0, aj:0});
_local1.dx.load();
};
_local1.mw = function () {
if (this.oa) {
i.de.lv();
}
i.de.mw(this.dx);
};
_local1.fs = function (fr) {
var _local1 = this;
_local1.fy.fs(fr);
if (_local1.oa) {
_local1.fy.aaf();
}
if (fr.length > 2) {
var _local2 = function () {
g.play("card_sound_2.aif", false, 70);
};
new ef({eg:0.1, eh:_local2, ej:_local1});
}
};
_local1.jr = function (fh) {
this.hh = fh;
};
_local1.hu = function (xy) {
var _local1 = this;
if (!_local1.oa) {
xy.yk(false);
}
_local1.fy.hq(xy);
_local1.fy.zy();
};
_local1.ir = function (xx) {
var _local2 = this;
var abb = new zn({xx:xx, parent:_local2});
_local2.aba.push(abb);
var _local3 = [];
var _local1 = 0;
while (_local1 < _local2.aba.length) {
_local3.push(_local2.aba[_local1].yj());
_local1++;
}
d.sort(_local3);
new ef({eg:1.2, eh:abb.zq, ej:abb});
};
_local1.zp = function () {
var _local1 = this;
var _local3 = _local1.parent.no[_local1.iu][0];
var _local2 = _local1.parent.no[_local1.iu][1];
var ya = _local1.parent.no[_local1.iu][4];
_local3 = _local3 + (_local1.aba.length * _local1.parent.no[_local1.iu][2]);
_local2 = _local2 + (_local1.aba.length * _local1.parent.no[_local1.iu][3]);
return({ai:_local3, aj:_local2, nz:ya});
};
_local1.ex = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.aba.length) {
_local2.aba[_local1].qs();
_local1++;
}
_local2.aba = [];
};
_local1.jz = function (fo) {
this.ea = fo;
};
_local1.abd = function () {
var _local1 = this.fy.aad();
i.dk.hk(this.fy, _local1);
};
_local1.iv = function () {
var _local1 = this;
_local1.enabled = true;
if (_local1.fy.id() > 0) {
if (_local1.oa) {
_local1.fy.iv();
var _local2 = parseInt(i.gamedata.autoplay);
if (isNaN(_local2) || (_local2 == 0)) {
_local2 = 10;
}
i.de.ku.start({duration:_local2 * 1000, eh:_local1.abd, ej:_local1});
}
i.de.mo(_local1.iu, true);
}
};
_local1.hk = function (fy, hl) {
i.de.ku.stop();
i.dk.hk(fy, hl);
};
_local1.jl = function () {
var _local1 = this;
_local1.enabled = false;
if (_local1.oa) {
_local1.fy.jl();
}
i.de.mo(_local1.iu, false);
};
_local1.fd = function () {
this.fy.fd();
if (this.oa) {
i.de.ku.stop();
}
};
_local1.show = function () {
this.fy.show();
};
_local1.hide = function () {
this.fy.hide();
};
_local1.qs = function () {
this.fy.qs();
};
_local1.dc(z);
}
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_focusrect = false;
var cw = false;
var cx = "1.1";
var cy = false;
var cb = false;
var yn = 0;
stop();
startup();
Symbol 129 MovieClip [card_fg] Frame 1
stop();