Combined Code
movieClip 3 register {
frame 49 {
stop();
}
}
movieClip 1619 WetPlayIcon_bmp {
}
movieClip 1622 WetPlayIcon {
}
movieClip 1623 splash_ng {
}
movieClip 1626 splash_ag {
}
movieClip 1629 splash_kg {
}
movieClip 20480 __Packages.bmcache_item {
#initclip
if (!bmcache_item) {
_global.bmcache_item = function (_up, _idstr, _callback, _cb_data) {
this.up = _up;
this.idstr = _idstr;
this.callback = _callback;
this.cb_data = _cb_data;
};
var v1 = _global.bmcache_item.prototype;
v1.delegate = function (f, i) {
return com.dynamicflash.utils.Delegate.create(this, f, i);
};
v1.loaded_mc = function () {
if (!this.bmp) {
var v2 = this.cb_data.bmpw ? this.cb_data.bmpw : 100;
var v3 = this.cb_data.bmph ? this.cb_data.bmph : 100;
var v4 = this.cb_data.bmpt ? this.cb_data.bmpt : true;
this.bmp = new flash.display.BitmapData(v2, v3, v4, 0);
this.bmp.draw(this.bmp_mc.loadhere);
if (this.bmp_mc.loadhere2) {
var v5 = new flash.display.BitmapData(v2, v3, v4, 0);
v5.draw(this.bmp_mc.loadhere2);
this.bmp.copyChannel(v5, new flash.geom.Rectangle(0, 0, v2, v3), new flash.geom.Point(0, 0), 2, 8);
}
this.bmp_mc.removeMovieClip();
this.bmp_mc = null;
}
if (this.cb_data.onload) {
this.cb_data.onload(this);
}
};
v1.chop = function (from, px, py, sx, sy) {
this.cb_data = from.cb_data;
var v7 = this.cb_data.bmpt ? this.cb_data.bmpt : true;
this.bmp = new flash.display.BitmapData(sx, sy, v7, 0);
this.bmp.copyPixels(from.bmp, new flash.geom.Rectangle(px, py, sx, sy), new flash.geom.Point(0, 0));
};
v1.create = function (mc, idstr, depth) {
if (this.bmp) {
var v6 = this.cb_data.hx ? this.cb_data.hx : 0;
var v7 = this.cb_data.hy ? this.cb_data.hy : 0;
var v8 = this.cb_data.px ? this.cb_data.px : 0;
var v9 = this.cb_data.py ? this.cb_data.py : 0;
var v10 = this.cb_data.sx ? this.cb_data.sx : 100;
var v11 = this.cb_data.sy ? this.cb_data.sy : 100;
var v12 = this.cb_data.rot ? this.cb_data.rot : 0;
var v5 = this.up.create(mc, null, depth);
v5.createEmptyMovieClip('loadhere', 0);
v5.loadhere.attachBitmap(this.bmp, 0, 'auto', true);
v5.loadhere._x = v6;
v5.loadhere._y = v7;
v5._x = v8;
v5._y = v9;
v5._xscale = v10;
v5._yscale = v11;
v5._rotation = v12;
return v5;
}
v5 = this.callback(mc, idstr, depth, this.cb_data, this);
return v5;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20481 __Packages.MainStatic {
#initclip
if (!MainStatic) {
_global.MainStatic = function () {};
var v1 = _global.MainStatic.prototype;
_global.MainStatic.choose_and_apply_scalar = function (me, flags) {
var v5 = flags.split(',');
if (_root.talk && _root.popup == _root.talk) {
MainStatic.half = true;
} else {
MainStatic.half = false;
}
var v4 = 0;
goto 928;
for (;;) {
++v4;
label 928:
if (v4 >= v5.length) break;
var v6 = v5[v4];
if (v6 == '800x600') {
MainStatic.w = 800;
MainStatic.h = 600;
} else {
if (v6 == '640x480') {
MainStatic.w = 640;
MainStatic.h = 480;
} else {
if (v6 == 'wide') {
MainStatic.wide = true;
MainStatic.half = false;
} else {
if (v6 == 'nothalf') {
MainStatic.half = false;
} else {
if (v6 == 'notwide') {
MainStatic.wide = false;
MainStatic.notwide = true;
}
}
}
}
}
}
_root.scalar.bx = MainStatic.w;
_root.scalar.by = MainStatic.h;
if (_root.scale == 'fixed') {
if (!MainStatic.notwide) {
gfx.setscroll(me.mc, 0, 0, 1.5 * MainStatic.w, MainStatic.h);
_root.scalar.ox = 1.5 * MainStatic.w;
_root.scalar.oy = MainStatic.h;
_root.scalar.wide = true;
} else {
gfx.setscroll(me.mc, 0, 0, MainStatic.w, MainStatic.h);
_root.scalar.ox = MainStatic.w;
_root.scalar.oy = MainStatic.h;
_root.scalar.wide = false;
}
} else {
if (!MainStatic.notwide && (MainStatic.wide || Stage.width / Stage.height > (MainStatic.w / MainStatic.h + 1.5 * MainStatic.w / MainStatic.h) / 2)) {
if (_root.scalar.ox != 1.5 * MainStatic.w) {
gfx.setscroll(me.mc, 0, 0, 1.5 * MainStatic.w, MainStatic.h);
_root.scalar.ox = 1.5 * MainStatic.w;
_root.scalar.oy = MainStatic.h;
_root.scalar.wide = true;
}
} else {
if (_root.scalar.ox != MainStatic.w) {
gfx.setscroll(me.mc, 0, 0, MainStatic.w, MainStatic.h);
_root.scalar.ox = MainStatic.w;
_root.scalar.oy = MainStatic.h;
_root.scalar.wide = false;
}
}
}
_root.scalar.apply(me.mc, MainStatic.half);
_root.scalar.apply(_root.mc_popup, MainStatic.half);
_root.scalar.apply(_root.mc_swish, MainStatic.half);
_root.scalar.apply(_root.__mochiservicesMC);
_root.__mochiservicesMC._xscale *= 1.5;
_root.__mochiservicesMC._yscale *= 1.5;
_root.__mochiservicesMC.swapDepths(16385);
};
_global.MainStatic.apply_800x600_scale = function (m) {
m._xscale = 100 * MainStatic.w / 800;
m._yscale = 100 * MainStatic.h / 600;
};
_global.MainStatic.get_base_context_menu = function (me, ncm) {
if (ncm) {
var v4 = ncm;
} else {
var v4 = new ContextMenu();
v4.hideBuiltInItems();
}
var v6 = function () {
if (_root._quality == 'MEDIUM') {
_root._quality = 'LOW';
} else {
_root._quality = 'MEDIUM';
}
};
var v5 = new ContextMenuItem('Toggle quality.', com.dynamicflash.utils.Delegate.create(me, v6));
v4.customItems.push(v5);
v6 = function () {
if (Stage.displayState == 'normal') {
Stage.fullScreenSourceRect = undefined;
Stage.displayState = 'fullScreen';
if (!MainStatic.notwide && (MainStatic.wide || Stage.width / Stage.height > (640 / 480 + 1.5 * 640 / 480) / 2)) {
Stage.displayState = 'normal';
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 960, 480);
Stage.displayState = 'fullScreen';
} else {
Stage.displayState = 'normal';
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 640, 480);
Stage.displayState = 'fullScreen';
}
} else {
Stage.displayState = 'normal';
}
};
v5 = new ContextMenuItem('Toggle fullscreen mode.', com.dynamicflash.utils.Delegate.create(me, v6));
v4.customItems.push(v5);
v6 = function () {
if (Stage.displayState == 'normal') {
Stage.fullScreenSourceRect = undefined;
Stage.displayState = 'fullScreen';
if (!MainStatic.notwide && (MainStatic.wide || Stage.width / Stage.height > (640 / 480 + 1.5 * 640 / 480) / 2)) {
Stage.displayState = 'normal';
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 480, 240);
Stage.displayState = 'fullScreen';
} else {
Stage.displayState = 'normal';
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 320, 240);
Stage.displayState = 'fullScreen';
}
} else {
Stage.displayState = 'normal';
}
};
v5 = new ContextMenuItem('Toggle lowscreen mode.', com.dynamicflash.utils.Delegate.create(me, v6));
v4.customItems.push(v5);
v6 = function () {
this.state_next = 'menu';
};
v5 = new ContextMenuItem('Quit to Main Menu.', com.dynamicflash.utils.Delegate.create(me, v6));
v4.customItems.push(v5);
v6 = function () {
this.state_next = 'login';
};
v5 = new ContextMenuItem('Logout.', com.dynamicflash.utils.Delegate.create(me, v6));
v4.customItems.push(v5);
return v4;
};
_global.MainStatic.update_setup = function () {
return new Array();
};
_global.MainStatic.update_add = function (tab, func) {
tab[tab.length] = func;
};
_global.MainStatic.update_remove = function (tab, func) {
var v4 = 0;
goto 3984;
for (;;) {
++v4;
label 3984:
if (v4 >= tab.length) break;
if (tab[v4] == func) {
tab.splice(v4, 1);
return undefined;
}
}
};
_global.MainStatic.update_do = function (tab) {
var v3 = 0;
goto 4105;
for (;;) {
++v3;
label 4105:
if (v3 >= tab.length) break;
tab[v3]();
}
};
_global.MainStatic.spine = function (s) {
if (s < 0) {
s = -s;
}
if (s > 1) {
s = 1;
}
var v3 = s * s;
return v3 + v3 * 2 - v3 * s * 2;
};
_global.MainStatic.spine_half = function (s) {
if (s < 0) {
s = -s;
}
if (s > 1) {
s = 1;
}
return MainStatic.spine(s * 0.5) * 2;
};
ASSetPropFlags(v1, null, 1);
_global.MainStatic.w = 800;
_global.MainStatic.h = 600;
_global.MainStatic.wide = false;
_global.MainStatic.notwide = false;
_global.MainStatic.half = true;
}
#endinitclip
}
movieClip 20482 __Packages.BetaComms {
#initclip
if (!BetaComms) {
_global.BetaComms = function (_up) {
this.up = _up;
this.php = 'http://' + _root.host + '/swf/beta.php';
this.sending_scores = false;
this.get_high_after_sending = false;
};
var v1 = _global.BetaComms.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.delegate2 = function (f, d1, d2) {
return com.dynamicflash.utils.Delegate.create(this, f, d1, d2);
};
v1.send_score_check = function () {
if (this.sent_score < this.datas.score) {
this.send_score();
}
};
v1.send_score_wait_and_check = function () {
var v2 = new Date();
if (v2.getTime() - this.sent_stamp > 1000 * 60) {
this.send_score_check();
}
};
v1.reset_sent_stamp = function () {
var v2 = new Date();
this.sent_stamp = v2.getTime();
this.sent_score = this.datas.score;
return this.sent_stamp;
};
v1.send_score = function () {
if (_root.audit) {
return undefined;
}
if (_root.skip_wetscore) {
return undefined;
}
this.lv_score = new LoadVars();
this.lv_score.S = _root.Login_Session;
this.lv_score.name = _root.Login_Name;
this.lv_score.game = this.datas.game;
this.lv_score.host = this.datas.host;
this.lv_score.seed = this.datas.seed;
this.lv_score.state = this.datas.state;
this.lv_score.score = this.datas.score;
this.lv_score.moves = this.datas.moves;
this.lv_score.time = this.datas.time;
this.lv_score.start_time = this.datas.start_time;
this.lv_score.replay_str = this.datas.replay_str;
this.lv_score.timestamp = this.reset_sent_stamp();
fbsig.copy_fb_sigs(_root, this.lv_score);
this.lv_score.onLoad = this.delegate(this.send_score_post, this.lv_score);
this.lv_score.sendAndLoad(this.php + '?cmd=submit', this.lv_score, 'POST');
this.sending_scores = true;
};
v1.send_score_post = function (success, lv) {
this.sending_scores = false;
if (success) {
if (lv.score != 0) {
_root.talk.chat_status('Sent Score: ' + lv.score);
}
}
if (this.get_high_after_sending) {
this.get_high(this.get_high_after_sending_cmd, this.get_high_after_sending_filter, this.get_high_after_sending_callback);
this.get_high_after_sending = false;
}
};
v1.get_high = function (cmd, filter, callback) {
if (_root.skip_wetscore) {
return undefined;
}
if (this.sending_scores) {
this.get_high_after_sending_cmd = cmd;
this.get_high_after_sending_filter = filter;
this.get_high_after_sending_callback = callback;
this.get_high_after_sending = true;
return undefined;
}
this.lv_high = new LoadVars();
this.lv_high.S = _root.Login_Session;
this.lv_high.name = _root.Login_Name;
this.lv_high.game = this.datas.game;
this.lv_high.host = this.datas.host;
this.lv_high.seed = this.datas.seed;
this.lv_high.state = this.datas.state;
this.lv_high.filter = filter;
this.lv_high.min = 1;
this.lv_high.max = 10;
fbsig.copy_fb_sigs(_root, this.lv_high);
this.lv_high.onLoad = this.delegate2(this.get_high_post, this.lv_high, callback);
this.lv_high.sendAndLoad(this.php + '?cmd=' + cmd, this.lv_high, 'POST');
};
v1.get_high_post = function (success, lv, callback) {
var v6 = new Array();
var v7 = false;
var v5 = 1;
goto 2556;
for (;;) {
++v5;
label 2556:
if (v5 > 10) break;
if (lv['name' + v5] != undefined) {
v6[v5 - 1] = lv['score' + v5] + ';' + lv['name' + v5] + ';' + lv['seed' + v5];
v7 = true;
} else {
v6[v5 - 1] = '0;...';
}
}
if (v7) {
callback(v6);
}
};
v1.send_audit = function (a_scoreid, a_score, replay_str) {
this.lv_audit = new LoadVars();
this.lv_audit_got = null;
this.lv_audit.S = _root.Login_Session;
this.lv_audit.replay_id = a_scoreid;
this.lv_audit.replay_str = replay_str;
this.lv_audit.score = a_score;
fbsig.copy_fb_sigs(_root, this.lv_audit);
this.lv_audit.onLoad = this.delegate(this.send_audit_post, this.lv_audit);
this.lv_audit.sendAndLoad(this.php + '?cmd=audit', this.lv_audit, 'POST');
};
v1.send_audit_post = function (success, lv) {
if (lv != this.lv_audit) {
return undefined;
}
if (!success) {
return undefined;
}
this.lv_audit_got = lv;
if (lv.replay_str.length < 6) {
this.send_audit(lv.replay_id, 0);
}
};
v1.send_pbemstart = function (game, em1, em2) {
if (_root.skip_wetscore) {
return undefined;
}
this.lv_pbem = new LoadVars();
this.lv_pbem.S = _root.Login_Session;
this.lv_pbem.name = _root.Login_Name;
this.lv_pbem.game = game;
this.lv_pbem.em1 = em1;
this.lv_pbem.em2 = em2;
this.lv_pbem.onLoad = this.delegate(this.send_pbemstart_post, this.lv_pbem);
this.lv_pbem.sendAndLoad(this.php + '?cmd=pbemstart', this.lv_pbem, 'POST');
};
v1.send_pbemstart_post = function (success, lv) {};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20483 __Packages.bmcache {
#initclip
if (!bmcache) {
_global.bmcache = function () {
this.aa = new Array();
this.aa_check = new Array();
this.aa_loading = new Array();
this.mc = this.create(_root, null, null);
this.mc._visible = false;
this.available = flash.display.BitmapData ? true : false;
};
var v1 = _global.bmcache.prototype;
v1.delegate = function (f, i) {
return com.dynamicflash.utils.Delegate.create(this, f, i);
};
v1.clear_loading = function () {
this.check_loading();
this.aa_loading = new Array();
};
v1.check_loading = function () {
var v6 = 0;
var v7 = 0;
var v2 = 0;
goto 1025;
for (;;) {
++v2;
label 1025:
if (v2 >= this.aa_loading.length) break;
var v3 = this.aa_loading[v2];
if (v3.bmp_mc) {
var v4 = v3.bmp_mc.loadhere.getBytesTotal();
if (Math.floor(v4) == 0) {
v4 = 1024 * 16;
}
var v5 = v3.bmp_mc.loadhere.getBytesLoaded();
if (v5 >= v4 && v3.bmp_mc.loadhere._width > 0) {
v3.loaded_mc();
} else {
v6 += v4;
v7 += v5;
}
}
}
if (v6) {
return v7 / v6;
} else {
return 1;
}
};
v1.isloading = function (idstr) {
if (this.aa[idstr]) {
return true;
}
return false;
};
v1.checkloading = function (idstr) {
if (this.aa[idstr]) {
return true;
}
if (this.aa_check[idstr]) {
return true;
}
return false;
};
v1.isloaded = function (idstr) {
var v5 = this.aa[idstr];
if (!v5) {
return 0;
}
if (v5.bmp_mc) {
var v4 = v5.bmp_mc.loadhere.getBytesLoaded();
var v3 = v5.bmp_mc.loadhere.getBytesTotal();
if (Math.floor(v3) == 0) {
v3 = 1024 * 16;
}
if (v4 >= v3 && v5.bmp_mc.loadhere._width > 0) {
v5.loaded_mc();
}
}
return v5.bmp ? 1 : 0;
};
v1.remember = function (idstr, callback, cb_data) {
if (this.aa[idstr] == null) {
this.aa[idstr] = new bmcache_item(this, idstr, callback, cb_data);
this.aa[idstr].bmp_mc = callback(this.mc, idstr, null, cb_data, this.aa[idstr]);
if (!this.aa[idstr].bmp) {
this.aa_loading[this.aa_loading.length] = this.aa[idstr];
}
} else {
if (cb_data.onload) {
cb_data.onload(this.aa[idstr]);
}
}
};
v1.forget = function (idstr) {
this.aa[idstr] = null;
this.aa_check[idstr] = true;
};
v1.getbmp = function (idstr) {
return this.aa[idstr].bmp;
};
v1.create = function (_mc, idstr, depth, px, py, sx, sy, rot) {
if (_mc.newdepth == undefined) {
_mc.newdepth = 0;
}
if (depth == null) {
depth = ++_mc.newdepth;
}
if (idstr == null || this.aa[idstr] == null) {
var v10 = _mc.createEmptyMovieClip('mc' + depth, depth);
v10.newdepth = 0;
} else {
var v10 = this.aa[idstr].create(_mc, idstr, depth);
}
v10.newdepth = 0;
if (px != null) {
v10._x = px;
}
if (py != null) {
v10._y = py;
}
if (sx != null) {
v10._xscale = sx;
}
if (sy != null) {
v10._yscale = sy;
}
if (rot != null) {
v10._rotation = rot;
}
return v10;
};
_global.bmcache.create_generic = function (mc, idstr, depth, cb_data, item) {
storedv7.idstr = idstr;
var v13 = cb_data.hx ? cb_data.hx : 0;
var v14 = cb_data.hy ? cb_data.hy : 0;
var v8 = cb_data.px ? cb_data.px : 0;
var v9 = cb_data.py ? cb_data.py : 0;
var v10 = cb_data.sx ? cb_data.sx : 100;
var v11 = cb_data.sy ? cb_data.sy : 100;
if (!cb_data.rot) {
var v12 = 0;
var v7 = item.up.create(mc, null, null, v8, v9, v10, v11, v12);
v7.createEmptyMovieClip('loadhere', 0);
v7.loadhere._x = v13;
v7.loadhere._y = v14;
return v7;
}
var v12 = cb_data.rot;
var v7 = item.up.create(mc, null, null, v8, v9, v10, v11, v12);
v7.createEmptyMovieClip('loadhere', 0);
v7.loadhere._x = v13;
v7.loadhere._y = v14;
return v7;
};
_global.bmcache.create_null = function (mc, idstr, depth, cb_data, item) {
var v7 = bmcache.create_generic(mc, idstr, depth, cb_data, item);
item.bmp_mc = v7;
item.call_loaded_mc = true;
item.loaded_mc();
return null;
};
_global.bmcache.create_img = function (mc, idstr, depth, cb_data, item) {
var v7 = bmcache.create_generic(mc, idstr, depth, cb_data, item);
var v8 = gfx.add_clip(v7.loadhere, cb_data.url, null);
item.bmp_mc = v7;
item.call_loaded_mc = true;
item.loaded_mc();
return null;
};
_global.bmcache.create_jp4g = function (mc, idstr, depth, cb_data, item) {
var v9 = cb_data.hx ? cb_data.hx : 0;
if (!cb_data.hy) {
var v10 = 0;
var v7 = bmcache.create_generic(mc, idstr, depth, cb_data, item);
v7.createEmptyMovieClip('loadhere2', 1);
v7.loadhere2._x = v9;
v7.loadhere2._y = v10;
var v8 = gfx.add_clip(v7.loadhere, cb_data.url + '.rgb', null);
v8 = gfx.add_clip(v7.loadhere2, cb_data.url + '.a', null);
item.bmp_mc = v7;
item.call_loaded_mc = true;
item.loaded_mc();
return null;
}
var v10 = cb_data.hy;
var v7 = bmcache.create_generic(mc, idstr, depth, cb_data, item);
v7.createEmptyMovieClip('loadhere2', 1);
v7.loadhere2._x = v9;
v7.loadhere2._y = v10;
var v8 = gfx.add_clip(v7.loadhere, cb_data.url + '.rgb', null);
v8 = gfx.add_clip(v7.loadhere2, cb_data.url + '.a', null);
item.bmp_mc = v7;
item.call_loaded_mc = true;
item.loaded_mc();
return null;
};
_global.bmcache.create_url = function (mc, idstr, depth, cb_data, item) {
var v7 = bmcache.create_generic(mc, idstr, depth, cb_data, item);
v7.loadhere.loadMovie(cb_data.url);
return v7;
};
v1.bmp_chop = function (from, to, px, py, sx, sy) {
if (this.aa[to] == null) {
if (this.aa[from]) {
this.aa[to] = new bmcache_item(this, to, null, null);
this.aa[to].chop(this.aa[from], px, py, sx, sy);
}
}
};
v1.bmp_blit = function (from, to, fx, fy, sx, sy, tx, ty) {
if (this.aa[to].bmp && this.aa[from].bmp) {
this.aa[to].bmp.copyPixels(this.aa[from].bmp, new flash.geom.Rectangle(fx, fy, sx, sy), new flash.geom.Point(tx, ty));
}
};
v1.bmp_fill = function (to, fx, fy, sx, sy, argb) {
if (this.aa[to].bmp) {
this.aa[to].bmp.fillRect(new flash.geom.Rectangle(fx, fy, sx, sy), argb);
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20484 __Packages.FieldItem {
#initclip
if (!FieldItem) {
_global.FieldItem = function (_up) {
this.up = _up;
};
var v1 = _global.FieldItem.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function (nam) {
this.mc = gfx.create_clip(this.up.mc, null);
this.locked = false;
this.type = nam;
this.flags = 0;
this.x = 0;
this.y = 0;
this.vx = 0;
this.vy = 0;
this.score = 0;
this.draw();
};
v1.draw = function (src) {
var v3 = 2.0;
gfx.clear(this.mc);
this.mc2.removeMovieClip();
this.mc2 = null;
switch (this.type) {
break;
case null:
case 'fire':
if (_root._highquality <= 1) {
this.render(this.mc, 0, 0, 100);
} else {
this.render(this.mc, 0, 0, 100);
this.mc2 = gfx.add_clip(this.mc, 'obj_fire', 1);
this.mc2._xscale = 100 * v3;
this.mc2._yscale = 100 * v3;
}
break;
case 'earth':
if (_root._highquality <= 1) {
this.render(this.mc, 0, 0, 100);
} else {
this.render(this.mc, 0, 0, 100);
this.mc2 = gfx.add_clip(this.mc, 'obj_earth', 1);
this.mc2._xscale = 100 * v3;
this.mc2._yscale = 100 * v3;
}
break;
case 'air':
if (_root._highquality <= 1) {
this.render(this.mc, 0, 0, 100);
} else {
this.render(this.mc, 0, 0, 100);
this.mc2 = gfx.add_clip(this.mc, 'obj_air', 1);
this.mc2._xscale = 100 * v3;
this.mc2._yscale = 100 * v3;
}
break;
case 'water':
if (_root._highquality <= 1) {
this.render(this.mc, 0, 0, 100);
} else {
this.render(this.mc, 0, 0, 100);
this.mc2 = gfx.add_clip(this.mc, 'obj_water', 1);
this.mc2._xscale = 100 * v3;
this.mc2._yscale = 100 * v3;
}
break;
case 'ether':
if (_root._highquality <= 1) {
this.render(this.mc, 0, 0, 100);
} else {
this.render(this.mc, 0, 0, 100);
this.mc2 = gfx.add_clip(this.mc, 'obj_meta', 1);
this.mc2._xscale = 100 * v3;
this.mc2._yscale = 100 * v3;
}
}
if (_root._highquality == 2) {
gfx.dropshadow(this.mc, 5, 45, 0, 1, 10, 10, 2, 3);
} else {
this.mc.filters = null;
this.mc.cacheAsBitmap = true;
}
if (src != undefined && src != this) {
this.mc2.gotoAndStop(1);
this.mc2.gotoAndStop(src.mc2._currentframe);
this.mc2._rotation = src.mc2._rotation;
} else {
this.mc2.gotoAndStop(1);
this.mc2.gotoAndStop(this.up.rnd() % 20 + 1);
this.mc2._rotation = this.up.rnd() % 360;
}
};
v1.render = function (_mc, dx, dy, siz) {
if (_root._highquality <= 1) {
switch (this.type) {
break;
case null:
case 'fire':
_mc.style.out = -16777216;
_mc.style.fill = -65536;
gfx.draw_box(_mc, siz * 0.1, dx - siz * 0.4, dy - siz * 0.4, siz * 0.8, siz * 0.8);
break;
case 'earth':
_mc.style.out = -16777216;
_mc.style.fill = -16711936;
gfx.draw_box(_mc, siz * 0.1, dx - siz * 0.4, dy - siz * 0.4, siz * 0.8, siz * 0.8);
break;
case 'air':
_mc.style.out = -16777216;
_mc.style.fill = -256;
gfx.draw_box(_mc, siz * 0.1, dx - siz * 0.4, dy - siz * 0.4, siz * 0.8, siz * 0.8);
break;
case 'water':
_mc.style.out = -16777216;
_mc.style.fill = -16776961;
gfx.draw_box(_mc, siz * 0.1, dx - siz * 0.4, dy - siz * 0.4, siz * 0.8, siz * 0.8);
break;
case 'ether':
_mc.style.out = -16777216;
_mc.style.fill = -1;
gfx.draw_box(_mc, siz * 0.1, dx - siz * 0.4, dy - siz * 0.4, siz * 0.8, siz * 0.8);
}
} else {}
};
v1.setxy = function (setx, sety) {
this._x = setx;
this._y = sety;
if (this.mc) {
this.mc._x = setx;
this.mc._y = sety;
}
};
v1.launch = function (_vx, _vy, pts) {
var v5 = new FieldItem(this.up.over);
v5.setup(this.type);
v5.draw(this);
v5.setxy(this._x, this._y);
v5.vx = _vx;
v5.vy = _vy;
gfx.clear(this.mc);
v5.mc.filters = null;
v5.mc.cacheAsBitmap = true;
v5.mc._xscale = 125;
v5.mc._yscale = 125;
v5.mc2.play();
this.up.launches.push(v5);
if (pts && pts != 0) {
var v6 = {'x': 0, 'y': 0};
v5.mc.localToGlobal(v6);
this.up.up.up.over.mc.globalToLocal(v6);
this.up.up.up.over.add_floater('<b>' + pts + '</b><font size="12">pts</font>', v6.x, v6.y);
_root.wetplay.PlaySFX('sfx_jar', 1);
}
this.up.over.bounces = 0;
return v5;
};
v1.update_launch = function () {
this.vy += 8;
this.setxy(this._x + this.vx, this._y + this.vy);
var v2 = this.up.mc._xmouse - this._x;
if (this.up.up.state == 'menu') {
if (v2 * v2 < 32 * 32) {
if (this._y - this.vy < this.up.mc._ymouse && this._y >= this.up.mc._ymouse) {
if (this.vy > 0) {
this.setxy(this._x, this.up.mc._ymouse);
this.vy = -this.vy;
++this.up.bounces;
_root.wetplay.PlaySFX('sfx_boing', 0);
}
}
}
}
this.mc._rotation += this.vx;
if (this.mc._y > 1200) {
return true;
}
return false;
};
v1.clean = function () {
this.mc2.removeMovieClip();
this.mc.removeMovieClip();
};
v1.update = function () {};
v1.nextframe = function () {
this.mc2.gotoAndStop((this.mc2._currentframe + 0) % 20 + 1);
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20485 __Packages.fbsig {
#initclip
if (!fbsig) {
_global.fbsig = function () {};
var v1 = _global.fbsig.prototype;
_global.fbsig.copy_fb_sigs = function (f, t) {
for (var v4 in f) {
if (v4.substring(0, 6) == 'fb_sig') {
t[v4] = f[v4];
}
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20486 __Packages.PlayField {
#initclip
if (!PlayField) {
_global.PlayField = function (_up) {
this.up = _up;
};
var v1 = _global.PlayField.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.setup = function (nam) {
this.mc_scalar = gfx.create_clip(this.up.mc, null);
this.mc = gfx.create_clip(this.mc_scalar, null);
this.over = new Object();
this.over.up = this.up;
this.over.mc = gfx.create_clip(this.mc_scalar, null);
this.tab_w = 8;
this.tab_h = 8;
this.types = new Array('fire', 'earth', 'air', 'water', 'ether');
var v7 = 0;
goto 1425;
for (;;) {
++v7;
label 1425:
if (v7 >= 5) break;
this.types[this.types[v7]] = v7;
}
this.launches = new Array();
this.tab = new Array();
this.available_moves = new Array(0, 0, 0, 0, 0, 0);
this.build_board();
this.focus = null;
this.state = 'user';
this.freeze_count = 0;
this.ripple_wait = 25 * 10;
this.ripple_idx = 15;
_root.poker.clear_clicks();
};
v1.build_board = function () {
this.chain = 0;
var v5 = 0;
goto 1716;
for (;;) {
++v5;
label 1716:
if (v5 >= this.tab_h) break;
var v4 = 0;
goto 1762;
for (;;) {
++v4;
label 1762:
if (v4 >= this.tab_w) break;
var v2 = this.tab[v5 * this.tab_w + v4];
v2.clean();
this.tab[v5 * this.tab_w + v4] = null;
}
}
v5 = 0;
goto 1893;
for (;;) {
++v5;
label 1893:
if (v5 >= this.tab_h) break;
v4 = 0;
goto 1939;
for (;;) {
++v4;
label 1939:
if (v4 >= this.tab_w) break;
v2 = new FieldItem(this);
v2.setup(this.types[this.up.rnd() % this.types.length]);
v2.x = 50 + 100 * v4;
v2.y = 50 + 100 * v5;
v2.setxy(50 + 100 * v4, 50 + 100 * v5);
v2.mc._xscale = 0;
v2.mc._yscale = 0;
this.tab[v5 * this.tab_w + v4] = v2;
v2.idx = v5 * this.tab_w + v4;
}
}
while (this.check_clears() > 0) {
var v6 = 0;
goto 2281;
for (;;) {
++v6;
label 2281:
if (v6 >= this.tab.length) break;
if (this.tab[v6].flags) {
this.tab[v6].flags = 0;
this.tab[v6].score = 0;
this.tab[v6].type = null;
this.tab[v6].draw();
}
}
this.fill_holes();
}
this.chain = 0;
if (this.up.gamemode == 'puzzle') {
v6 = 0;
goto 2519;
for (;;) {
++v6;
label 2519:
if (v6 >= 8) break;
v4 = this.up.rnd() % 8;
v5 = this.up.rnd() % 8;
v2 = this.tab[v5 * this.tab_w + v4];
v2.locked = true;
gfx.blur(v2.mc, 4, 4, 4);
}
}
this.mcptop = gfx.create_clip(this.mc, null);
this.mcptop_depth = this.mc.newdepth;
this.mctop = gfx.create_clip(this.mc, null);
this.mctop_depth = this.mc.newdepth;
};
v1.fill_holes = function () {
var v3 = 0;
goto 2837;
for (;;) {
++v3;
label 2837:
if (v3 >= this.tab_h) break;
var v2 = 0;
goto 2883;
for (;;) {
++v2;
label 2883:
if (v2 >= this.tab_w) break;
var v4 = this.tab[v3 * this.tab_w + v2];
if (v4.type == null) {
v4.type = this.types[this.up.rnd() % this.types.length];
v4.draw();
}
}
}
};
v1.check_clears = function () {
var v14 = 0;
goto 3070;
for (;;) {
++v14;
label 3070:
if (v14 > 5) break;
this.available_moves[v14] = 0;
}
var v13 = 0;
var v10 = 0;
var v3 = this.tab_h - 1;
goto 3176;
for (;;) {
--v3;
label 3176:
if (v3 < 0) break;
var v2 = this.tab_w - 1;
goto 3232;
for (;;) {
--v2;
label 3232:
if (v2 < 0) break;
var v4 = v3 * this.tab_w + v2;
if (this.tab[v4].type != null) {
++this.available_moves[this.types[this.tab[v4].type]];
var v15 = false;
var v11 = 1;
var v6 = 1;
var v7 = v2;
var v8 = v3 - 1;
goto 3459;
for (;;) {
--v8;
label 3459:
if (v8 < 0) break;
var v9 = v8 * this.tab_w + v7;
if (this.tab[v9].type == this.tab[v4].type && !v15) {
++v11;
++v6;
continue;
}
if (v13 >= 3) {
break;
continue;
}
if (this.tab[v9].type != null) {
++v11;
v15 = true;
} else {
break;
}
}
if (v13 < v11) {
v13 = v11;
}
v15 = false;
var v12 = 1;
var v5 = 1;
v8 = v3;
v7 = v2 - 1;
goto 3785;
for (;;) {
--v7;
label 3785:
if (v7 < 0) break;
v9 = v8 * this.tab_w + v7;
if (this.tab[v9].type == this.tab[v4].type && !v15) {
++v12;
++v5;
continue;
}
if (v13 >= 3) {
break;
continue;
}
if (this.tab[v9].type != null) {
++v12;
v15 = true;
} else {
break;
}
}
if (v13 < v12) {
v13 = v12;
}
var v17 = 0;
if (v6 >= 3) {
v10 += v6;
v7 = v2;
v8 = v3;
goto 4113;
for (;;) {
--v8;
label 4113:
if (v8 <= v3 - v6) break;
v9 = v8 * this.tab_w + v7;
if (!(this.tab[v9].flags & 3)) {
v17 += 100;
}
this.tab[v9].flags |= 1;
var v16 = this.tab[v9];
}
v16.score += v17;
if (this.chain > 0) {
v16.score += 10 * this.chain;
}
if (v6 >= 4) {
v16.score += 10 * (this.chain + 1);
}
}
v17 = 0;
if (v5 >= 3) {
v10 += v5;
v8 = v3;
v7 = v2;
goto 4479;
for (;;) {
--v7;
label 4479:
if (v7 <= v2 - v5) break;
v9 = v8 * this.tab_w + v7;
if (!(this.tab[v9].flags & 3)) {
v17 += 100;
}
this.tab[v9].flags |= 2;
v16 = this.tab[v9];
}
v16.score += v17;
if (this.chain > 0) {
v16.score += 10 * this.chain;
}
if (v5 >= 4) {
v16.score += 10 * (this.chain + 1);
}
}
}
}
}
this.available_moves[5] = v13;
if (v10 > 0) {
++this.chain;
}
return v10;
};
v1.do_clears = function () {
var v3 = 0;
var v2 = 0;
goto 4892;
for (;;) {
++v2;
label 4892:
if (v2 >= this.tab.length) break;
if (this.tab[v2].flags) {
v3 += 1;
var v4 = 1;
if (this.tab[v2].flags == 3) {
v4 = 2;
}
this.up.score(this.tab[v2].score);
this.tab[v2].launch(((this.up.rnd() & 255) - 128) / 4, ((this.up.rnd() & 255) - 512) / 4, this.tab[v2].score);
this.tab[v2].flags = 0;
this.tab[v2].type = null;
this.tab[v2].draw();
this.tab[v2].locked = false;
this.tab[v2].mc.filters = null;
this.tab[v2].score = 0;
}
}
return v3;
};
v1.check_drops = function () {
var v6 = 0;
var v3 = this.tab_h - 2;
goto 5423;
for (;;) {
--v3;
label 5423:
if (v3 < 0) break;
var v2 = this.tab_w - 1;
goto 5479;
for (;;) {
--v2;
label 5479:
if (v2 < 0) break;
var v4 = v3 * this.tab_w + v2;
if (this.tab[v4].type != null && !this.tab[v4].locked) {
var v5 = (v3 + 1) * this.tab_w + v2;
if (this.tab[v5].type == null || this.tab[v5].flags) {
this.tab[v4].flags = 4;
v6 += 1;
}
}
}
}
if (this.up.gamemode == 'endurance') {
v3 = 0;
v2 = this.tab_w - 1;
goto 5797;
for (;;) {
--v2;
label 5797:
if (v2 < 0) break;
v4 = v3 * this.tab_w + v2;
if (this.tab[v4].type == null) {
this.tab[v4].mc._xscale = 0;
this.tab[v4].mc._yscale = 0;
this.tab[v4].type = this.types[this.up.rnd() % this.types.length];
this.tab[v4].draw();
v6 += 1;
}
}
}
return v6;
};
v1.inject_line = function () {
var v3 = 0;
var v2 = this.tab_w - 1;
goto 6113;
for (;;) {
--v2;
label 6113:
if (v2 < 0) break;
var v4 = v3 * this.tab_w + v2;
if (this.tab[v4].type == null) {
this.tab[v4].mc._xscale = 100;
this.tab[v4].mc._yscale = 100;
this.tab[v4].type = this.tab[v4 + this.tab_w * this.tab_h].type;
this.tab[v4].draw();
var v6 = storedv6 + 1;
this.tab[v4 + this.tab_w * this.tab_h].type = this.types[this.up.rnd() % this.types.length];
this.tab[v4 + this.tab_w * this.tab_h].draw();
this.tab[v4 + this.tab_w * this.tab_h].setxy(this.tab[v4 + this.tab_w * this.tab_h].x, this.tab[v4 + this.tab_w * this.tab_h].y);
}
}
return v6;
};
v1.do_drops = function () {
var v5 = 0;
var v2 = this.tab.length - 1;
goto 6654;
for (;;) {
--v2;
label 6654:
if (v2 < 0) break;
var v3 = this.tab[v2];
if (v3.flags) {
v3.nextframe();
v3.nextframe();
v5 += 1;
v3.setxy(v3._x, v3._y + 20);
var v6 = v3._y - v3.y;
if (v6 >= 100 - 20) {
var v4 = this.tab[v2 + this.tab_w];
v4.type = v3.type;
v4.draw(v3);
v3.setxy(v3._x, v3.y);
v3.type = null;
v3.draw();
v3.flags = 0;
}
}
}
return v5;
};
v1.do_swish = function () {
var v5 = Math.sqrt((this.swish_to.x - this.swish_from.x) * (this.swish_to.x - this.swish_from.x) + (this.swish_to.y - this.swish_from.y) * (this.swish_to.y - this.swish_from.y));
v5 = v5 < 200 ? 0.2 : 0.1;
this.swish_t += v5;
var v3 = this.swish_t;
v3 *= 0.5;
var v4 = v3 * v3;
var v2 = (v4 + v4 * 2 - v4 * v3 * 2) * 2;
if (this.swish_t >= 1) {
this.swish_from.setxy(this.swish_from.x, this.swish_from.y);
this.swish_to.setxy(this.swish_to.x, this.swish_to.y);
return 0;
} else {
this.swish_from.nextframe();
this.swish_to.nextframe();
this.swish_from.mc._xscale = 150;
this.swish_from.mc._yscale = 150;
this.swish_to.mc._xscale = 150;
this.swish_to.mc._yscale = 150;
this.swish_from.setxy(this.swish_from.x + (this.swish_to.x - this.swish_from.x) * v2, this.swish_from.y + (this.swish_to.y - this.swish_from.y) * v2);
this.swish_to.setxy(this.swish_to.x + (this.swish_from.x - this.swish_to.x) * v2, this.swish_to.y + (this.swish_from.y - this.swish_to.y) * v2);
return 1;
}
};
v1.clean = function () {
while (this.launches.length) {
this.launches[0].clean();
this.launches.splice(0, 1);
}
this.mc.removeMovieClip();
};
v1.update_user = function () {
if (this.focus.type == null) {
this.focus = null;
}
if (this.focus) {
if (this.focus.locked) {
this.focus = null;
}
}
if (this.focus) {
this.focus.nextframe();
}
if (this.up.turnactive) {
var v10 = 0;
goto 8111;
for (;;) {
++v10;
label 8111:
if (v10 >= _root.poker.clicks.length + 1) break;
var v11 = _root.poker.clicks[v10];
if (v11) {
this.mc.globalToLocal(v11);
var v2 = v11.x;
var v3 = v11.y;
var v4 = v11.click;
} else {
var v4 = 0;
var v2 = this.mc._xmouse;
var v3 = this.mc._ymouse;
}
if (v2 >= 0 && (v2 < 800 && (v3 > 0 && v3 < 800))) {
v2 = Math.floor(v2 / 100);
v3 = Math.floor(v3 / 100);
var v5 = v2 + v3 * this.tab_w;
if (this.tab[v5] != this.focus) {
if (this.tab[v5].type != null && !this.tab[v5].locked) {
this.tab[v5].mc._xscale = 150;
this.tab[v5].mc._yscale = 150;
this.tab[v5].nextframe();
}
}
if (!this.focus) {
this.tab[v5].mc.swapDepths(this.mctop_depth);
} else {
if (this.tab[v5] != this.focus) {
this.tab[v5].mc.swapDepths(this.mcptop_depth);
}
}
if (v4 == 1) {
if (this.tab[v5] != this.focus) {
if (this.tab[v5].type != null && !this.tab[v5].locked) {
if (this.focus == null) {
this.tab[v5].mc._xscale = 150;
this.tab[v5].mc._yscale = 150;
this.focus = this.tab[v5];
}
}
} else {
this.focus = null;
}
}
if (v4 == -1) {
if (this.tab[v5] != this.focus) {
if (this.tab[v5].type != null && !this.tab[v5].locked) {
if (this.focus != null) {
this.swish_from = this.focus;
this.swish_to = this.tab[v5];
this.tab[v5].mc._xscale = 150;
this.tab[v5].mc._yscale = 150;
this.focus = null;
this.swish_t = 0;
this.state = 'swish';
_root.wetplay.PlaySFX('sfx_swish', 3);
this.freeze_count += 1;
this.up.next_turn(this.swish_from.idx + '/' + this.swish_to.idx);
this.up.choose_color(this.swish_from.type);
this.up.choose_color(this.swish_to.type);
this.up.score(-1);
}
}
}
}
}
}
} else {
this.focus = null;
var v12 = this.up.next_turn();
if (v12) {
if (v12 == '-1/-1') {
this.focus = null;
this.up.next_turn(v12);
} else {
if (v12 == '-2/-2') {
this.focus = null;
this.up.next_turn(v12);
} else {
var v13 = v12.split('/');
var v14 = Math.floor(v13[0]);
var v15 = Math.floor(v13[1]);
this.swish_from = this.tab[v14];
this.swish_to = this.tab[v15];
this.tab[v14].mc._xscale = 150;
this.tab[v14].mc._yscale = 150;
this.tab[v15].mc._xscale = 150;
this.tab[v15].mc._yscale = 150;
this.focus = null;
this.swish_t = 0;
this.state = 'swish';
_root.wetplay.PlaySFX('sfx_swish', 3);
this.freeze_count += 1;
this.up.next_turn(v12);
this.up.choose_color(this.swish_from.type);
this.up.choose_color(this.swish_to.type);
this.up.score(-1);
}
}
}
}
_root.poker.clear_clicks();
};
v1.update = function () {
switch (this.state) {
case 'check':
if (this.check_clears() > 0) {
++this.clear_sfx_chan;
}
if (this.do_clears() > 0) {
this.state = 'fall_check';
} else {
this.state = 'user';
this.ripple_wait = 0;
this.ripple_idx = 0;
}
if (this.up.gamemode == 'endurance') {
this.update_user();
}
break;
case 'fall_check':
if (this.check_drops() > 0) {
this.do_drops();
this.state = 'fall';
} else {
this.state = 'check';
}
if (this.up.gamemode == 'endurance') {
this.update_user();
}
break;
case 'fall':
if (this.do_drops() == 0) {
if (this.check_clears() > 0) {
++this.clear_sfx_chan;
}
this.do_clears();
this.state = 'fall_check';
}
if (this.up.gamemode == 'endurance') {
this.update_user();
}
break;
case 'swish':
if (this.do_swish() == 0) {
this.chain = 0;
var v9 = this.swish_from.type;
this.swish_from.type = this.swish_to.type;
this.swish_to.type = v9;
this.swish_to.draw(this.swish_from);
this.swish_from.draw();
if (this.check_clears() > 0) {
++this.clear_sfx_chan;
}
this.do_clears();
this.state = 'fall_check';
}
break;
case 'user':
var v4 = 0;
goto 10847;
for (;;) {
++v4;
label 10847:
if (v4 >= this.freeze_count) break;
if (this.up.gamemode == 'endurance') {
var v6 = this.up.rnd() % 8;
var v7 = this.up.rnd() % 8;
var v5 = this.tab[v7 * this.tab_w + v6];
if (v5.type != null) {
v5.locked = true;
gfx.blur(v5.mc, 4, 4, 4);
}
}
}
this.freeze_count = 0;
this.update_user();
if (this.ripple_wait > 0) {
--this.ripple_wait;
this.ripple_idx = 15;
} else {
if (this.ripple_idx <= 0) {
this.ripple_wait = this.up.rnd() % 30 * 15 + 30 * 5;
} else {
--this.ripple_idx;
v7 = 0;
goto 11271;
for (;;) {
++v7;
label 11271:
if (v7 >= this.tab_h) break;
v6 = 0;
goto 11317;
for (;;) {
++v6;
label 11317:
if (v6 >= this.tab_w) break;
if (v6 + v7 == this.ripple_idx) {
var v8 = v7 * this.tab_w + v6;
if (this.tab[v8].type != null && !this.tab[v8].locked) {
if (this.tab[v8].mc._xscale < 125) {
this.tab[v8].mc._xscale = 125;
this.tab[v8].mc._yscale = 125;
}
}
}
}
}
}
}
}
var v4 = 0;
goto 11587;
for (;;) {
++v4;
label 11587:
if (v4 >= this.tab_w * this.tab_h) break;
if (this.tab[v4].locked) {
if (this.tab[v4].mc._xscale != 50) {
var v10 = Math.ceil((50 + this.tab[v4].mc._xscale) / 2);
this.tab[v4].mc._xscale = v10;
this.tab[v4].mc._yscale = v10;
}
} else {
if (this.tab[v4].mc._xscale != 100) {
if (this.tab[v4] != this.focus) {
var v10 = Math.ceil((100 + this.tab[v4].mc._xscale) / 2);
this.tab[v4].mc._xscale = v10;
this.tab[v4].mc._yscale = v10;
}
}
}
}
v4 = 0;
goto 12030;
for (;;) {
++v4;
label 12030:
if (v4 >= this.launches.length) break;
if (this.launches[v4].update_launch()) {
this.launches[v4].clean();
this.launches.splice(v4, 1);
--v4;
}
}
if (this.launches.length == 0) {
if (this.available_moves[5] < 3 || this.available_moves[0] < 3 && (this.available_moves[1] < 3 && (this.available_moves[2] < 3 && (this.available_moves[3] < 3 && this.available_moves[4] < 3)))) {
this.up.stage_end();
}
}
};
v1.render_all = function () {
var v2 = 0;
goto 12451;
for (;;) {
++v2;
label 12451:
if (v2 >= this.tab_w * this.tab_h) break;
this.tab[v2].render(this.mc, this.tab[v2]._x, this.tab[v2]._y, this.tab[v2].mc._xscale);
}
};
v1.redraw_all = function () {
var v2 = 0;
goto 12630;
for (;;) {
++v2;
label 12630:
if (v2 >= this.tab_w * this.tab_h) break;
this.tab[v2].draw(this.tab[v2]);
}
};
ASSetPropFlags(v1, null, 1);
v1.rnd_num = 0;
v1.clear_sfx_chan = 0;
}
#endinitclip
}
movieClip 20487 __Packages.WetDiamondsPlay {
#initclip
if (!WetDiamondsPlay) {
_global.WetDiamondsPlay = function (_up) {
this.gamemode = 'endurance';
this.gameskill = 'normal';
this.gamecomms = null;
this.up = _up;
};
var v1 = _global.WetDiamondsPlay.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.setup = function () {
this.gameover = false;
this.turn = 0;
this.stage_turn = 0;
this.player = 0;
this.stage = 0;
this.noscore = false;
this.acts = null;
this.turnactive = true;
this.gamecomms = null;
if (this.up.lobby.gamedata) {
this.gamecomms = this.up.lobby.gamedata;
this.up.lobby.gamedata = null;
this.up.game_seed = Math.floor(this.gamecomms.styles.seed);
this.gamemode = 'puzzle';
this.player = this.gamecomms.player_idx - 1;
this.choosen = new Array({'t': '', 'used': false}, {'t': '', 'used': false}, {'t': '', 'used': false}, {'t': '', 'used': false});
}
this.rnd_seed(this.up.game_seed);
_root.signals.signal('diamonds', 'start', this);
this.done_adds = false;
this.mc = gfx.create_clip(this.up.mc, null);
this.won = new PlayWon(this);
this.turnmenu = new PlayTurn(this);
this.hud = new PlayHUD(this);
this.hud.setup();
this.field = new PlayField(this);
this.field.setup();
this.field.mc_scalar._x = 200;
this.field.mc_scalar._y = 100;
this.field.mc_scalar._xscale = 100 * (400 / 800);
this.field.mc_scalar._yscale = this.field.mc_scalar._xscale;
if (!this.skip_high) {
if (!this.gamecomms) {
}
}
this.skip_high = false;
this.thunk();
if (this.player == -1) {
this.gmsgsend({'gcmd': 'acts', 'gnam': this.gamecomms.gamename, 'gtim': 0, 'gtyp': 'watch'});
} else {
this.gmsgsend({'gcmd': 'acts', 'gnam': this.gamecomms.gamename, 'gtim': 0, 'gtyp': 'play'});
}
};
v1.clean = function () {
_root.signals.signal('diamonds', 'end', this);
this.field.clean();
this.mc.removeMovieClip();
_root.poker.ShowFloat(null, 0);
};
v1.thunk = function () {
if (!this.gamecomms) {
return undefined;
}
if (this.acts == null) {
this.hud.turn_str('<p align="center">Please wait for network connection.</p>');
this.turnactive = false;
} else {
if (this.acts[this.turn]) {
this.hud.turn_str('<p align="center"><font color="#ffffff"><b>Please wait whilst the recorded turns are replayed.</font></b></p>');
this.turnactive = false;
this.hud.butt_ids.pass1._visible = false;
this.hud.butt_ids.pass2._visible = false;
} else {
if ((this.turn & 1) == this.player) {
this.hud.turn_str('<p align="center"><font color="#88ff88"><b>You have no chance to survive make your time.</font></b></p>');
this.turnactive = true;
this.hud.butt_ids.pass1._visible = true;
this.hud.butt_ids.pass2._visible = true;
} else {
this.hud.turn_str('<p align="center"><font color="#ff8888"><b>Waiting for the other player.</font></b></p>');
this.turnactive = false;
this.hud.butt_ids.pass1._visible = false;
this.hud.butt_ids.pass2._visible = false;
}
}
}
};
v1.next_turn = function (msg) {
if (!this.gamecomms) {
return null;
}
if (msg == null) {
if (this.acts[this.turn]) {
return this.acts[this.turn];
} else {
return null;
}
} else {
if (!this.acts[this.turn]) {
this.gmsgsend({'gcmd': 'act', 'gnam': this.gamecomms.gamename, 'gtim': this.turn, 'gdat': msg});
}
++this.turn;
++this.stage_turn;
if (this.stage_turn > 1 && (msg == '-1/-1' && this.acts[this.turn - 2] == '-1/-1')) {
this.stage_end();
}
if (this.turn & 1) {
this.hud.mc2._xscale = 200;
this.hud.mc2._yscale = 200;
this.thunk();
return null;
}
this.hud.mc4._xscale = 200;
this.hud.mc4._yscale = 200;
this.thunk();
return null;
}
};
v1.choose_update = function () {
if (this.gamecomms) {
var v2 = 0;
goto 3594;
for (;;) {
++v2;
label 3594:
if (v2 >= 4) break;
if (this.choosen[v2].t != '') {
var v3 = this.field.types[this.choosen[v2].t];
if (this.field.available_moves[v3] == 0) {
if (!this.choosen[v2].used) {
this.choosen[v2].used = true;
if (v2 < 2) {
this.hud.points1 += 1000;
} else {
this.hud.points2 += 1000;
}
var v4 = {'x': 0, 'y': 0};
this.hud.choosen[v2].mc.localToGlobal(v4);
this.up.over.mc.globalToLocal(v4);
this.up.over.add_floater('<b>' + 1000 + '</b><font size="12">pts</font>', v4.x, v4.y);
}
}
}
}
}
};
v1.choose_color = function (t) {
if (this.gamecomms) {
var v3 = 0;
goto 4089;
for (;;) {
++v3;
label 4089:
if (v3 >= 4) break;
if (this.choosen[v3].t == t) {
return undefined;
}
}
if ((this.turn - 1 & 1) == 0) {
if (this.choosen[0].t == '') {
this.choosen[0].t = t;
this.hud.choosen[0].type = t;
this.hud.choosen[0].draw();
this.hud.choosen[0].mc._visible = true;
} else {
if (this.choosen[1].t == '') {
this.choosen[1].t = t;
this.hud.choosen[1].type = t;
this.hud.choosen[1].draw();
this.hud.choosen[1].mc._visible = true;
}
}
} else {
if (this.choosen[2].t == '') {
this.choosen[2].t = t;
this.hud.choosen[2].type = t;
this.hud.choosen[2].draw();
this.hud.choosen[2].mc._visible = true;
} else {
if (this.choosen[3].t == '') {
this.choosen[3].t = t;
this.hud.choosen[3].type = t;
this.hud.choosen[3].draw();
this.hud.choosen[3].mc._visible = true;
}
}
}
}
};
v1.stage_end = function () {
if (!this.gamecomms) {
this.won.setup();
} else {
if (this.stage == 0) {
++this.stage;
this.hud.butt_changed('stage');
this.stage_turn = 0;
this.noscore = true;
this.rnd_seed(this.up.game_seed);
this.field.build_board();
if ((this.turn & 1) == 0 && (this.stage & 1) == 1) {
++this.turn;
++this.stage_turn;
}
this.choosen = new Array({'t': '', 'used': false}, {'t': '', 'used': false}, {'t': '', 'used': false}, {'t': '', 'used': false});
this.hud.choosen[0].mc._visible = false;
this.hud.choosen[1].mc._visible = false;
this.hud.choosen[2].mc._visible = false;
this.hud.choosen[3].mc._visible = false;
this.noscore = false;
} else {
if (this.player != -1) {
this.gmsgsend({'gcmd': 'start', 'gnam': this.gamecomms.gamename, 'garg': this.hud.points1 + ',' + this.hud.points2, 'gtyp': 'finish'});
this.won.setup('ws');
} else {
this.won.setup('ws');
}
}
}
};
v1.update = function () {
if (_root.popup || _root.pause) {
return undefined;
}
if (this.gameover) {
this.do_str('won');
return undefined;
}
_root.signals.signal('diamonds', 'update', this);
this.field.update();
this.choose_update();
this.hud.update();
};
v1.score = function (p) {
if (this.gamecomms) {
if (!this.noscore) {
if ((this.turn - 1 & 1) == 0) {
this.hud.points1 += p;
} else {
this.hud.points2 += p;
}
}
} else {
this.hud.points += p;
}
};
v1.do_str = function (str) {
switch (str) {
case 'won':
if (this.gamecomms) {
this.up.state_next = 'splash';
} else {
this.up.do_str('restart');
}
break;
default:
this.up.do_str(str);
}
};
v1.gmsgsend = function (msg) {
if (_root.sock) {
_root.sock.gmsg(msg, this.delegate(this.gmsgback, msg));
this.lastmsg = msg;
_root.sock.gmsg(null, this.delegate(this.gmsgback, null));
}
};
v1.gmsgback = function (msg, sentmsg) {
if (!sentmsg) {
switch (msg.gcmd) {
case 'act':
this.acts[Math.floor(msg.gtim)] = msg.gdat;
this.thunk();
break;
default:
}
} else {
switch (sentmsg.gcmd) {
case 'acts':
this.acts = new Array();
var v6 = msg.gret.split(';');
var v7 = 0;
goto 6447;
for (;;) {
++v7;
label 6447:
if (v7 >= v6.length) break;
v6[v7] = v6[v7].split(',');
}
if (v6[0][0] == 'OK') {
v6[0].splice(0, 1);
v7 = 0;
goto 6589;
for (;;) {
++v7;
label 6589:
if (v7 >= v6.length) break;
var v9 = 0;
goto 6635;
for (;;) {
++v9;
label 6635:
if (v9 >= v6[v7].length) break;
var v8 = v6[v7][v9].split(':');
if (v8[0] != '') {
this.acts[Math.floor(v8[0])] = v8[1];
}
}
}
} else {}
this.thunk();
break;
default:
}
}
};
ASSetPropFlags(v1, null, 1);
v1.skip_high = false;
v1.rnd_num = 0;
}
#endinitclip
}
movieClip 20488 __Packages.Login {
#initclip
if (!Login) {
_global.Login = function (_up, _str) {
this.up = _up;
_root.login = this;
if (_str == 'join') {
this.joinonly = true;
this.autologin = false;
}
};
var v1 = _global.Login.prototype;
v1.delegate = function (f, d, i) {
return com.dynamicflash.utils.Delegate.create(this, f, d, i);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.setup = function () {
if (_root.skip_wetlogin) {
this.so_load();
_root.Login_Name = 'me';
_root.Login_Done = true;
_root.Login_Session = 0;
this.up.state_next = 'menu';
return undefined;
}
this.user_php = 'http://' + _root.host + '/swf/users.php';
this.viewYdest = 0;
this.viewY = 0;
this.frame = 0;
this.file_name = 'register';
this.file_lines = Login.register_lines;
this.dat.saves_reset_temps();
this.mc.removeMovieClip();
this.mc = gfx.create_clip(this.up.mc, null);
MainStatic.apply_800x600_scale(this.mc);
this.zmc = gfx.create_clip(this.mc, null);
this.omc = gfx.create_clip(this.mc, null, 400, 300);
this.mcs = new Array();
this.parallax = new Array();
var v8 = 0;
var v9 = null;
this.mcs_max = this.file_lines.length - 1;
var v2 = 0;
goto 15664;
for (;;) {
++v2;
label 15664:
if (v2 >= this.mcs_max) break;
var v3 = this.file_lines[v2];
var v4 = v3.split(',');
if (v4[0] == '') {
v4[0] = null;
}
if (v4[1] == '') {
v4[1] = null;
}
if (v4[2] == '') {
v4[2] = null;
}
v9 = this.parallax[v4[1]];
if (v9 == null) {
v9 = gfx.create_clip(this.zmc, null, 400, 300);
v9.zoom = 1;
this.parallax[v4[1]] = v9;
v9.cacheAsBitmap = true;
switch (v4[1]) {
case 'login':
v9._y -= 600;
break;
case 'signup':
v9._y += 600;
}
}
if (v4[0] == 'circ') {
this.mcs[v2] = gfx.create_clip(v9, null);
this.mcs[v2].mc = gfx.add_clip(this.mcs[v2], this.file_name, null);
this.mcs[v2].mc.gotoAndStop(v2 + 1);
this.mcs[v2].cacheAsBitmap = true;
var v5 = this.mcs[v2].mc.getBounds(this.mcs[v2]);
v5.fx = (v5.xMax + v5.xMin) / 2;
v5.fy = (v5.yMax + v5.yMin) / 2;
this.mcs[v2]._x += v5.fx - 400;
this.mcs[v2].mc._x -= v5.fx;
this.mcs[v2]._y += v5.fy - 300;
this.mcs[v2].mc._y -= v5.fy;
} else {
this.mcs[v2] = gfx.add_clip(v9, this.file_name, null);
var v6 = this.mcs[v2];
v6._x = -400;
v6._y = -300;
v6.gotoAndStop(v2 + 1);
v6.cacheAsBitmap = true;
}
v6.active = true;
v6.onPress = this.delegate(this.press, v6);
v6.onRelease = this.delegate(this.click, v6);
v6.onRollOver = this.delegate(this.hover_on, v6);
v6.onRollOut = this.delegate(this.hover_off, v6);
v6.onReleaseOutside = this.delegate(this.hover_off, v6);
v6.tabEnabled = false;
v6.useHandCursor = false;
v6 = this.mcs[v2];
v6.idx = v2;
v6.nam = v4[0];
v6.group = v4[1];
v6.nams = v6.nam.split('_');
v6._visible = true;
switch (v6.nams[0]) {
case 'but':
v6._alpha = 25;
if (v6.nams[1] == 'flag') {
v6._visible = false;
}
v6.useHandCursor = true;
break;
case 'text':
var v5 = v6.getBounds(v9);
v5.w = v5.xMax - v5.xMin;
v5.h = v5.yMax - v5.yMin;
v6.tf = gfx.create_text_html(v9, null, v5.xMin, v5.yMin, v5.w, v5.h);
gfx.set_text_html(v6.tf, 16, 0, v6.nam);
break;
case 'edit':
var v5 = v6.getBounds(v9);
v5.w = v5.xMax - v5.xMin;
v5.h = v5.yMax - v5.yMin;
v6.tf = gfx.create_text_edit(v9, null, v5.xMin, v5.yMin, v5.w, v5.h);
v6.tf.setNewTextFormat(gfx.create_text_format(40, -16777216));
v6.tf.text = 'me';
v6.tf.onKillFocus = this.delegate(this.lostfocus, v6);
}
this.mcs[v6.nam] = v6;
this.topmc = v9;
}
this.mcs.but_skiplogin._visible = false;
this.mcs.edit_pass2.tf.password = true;
this.mcs.edit_pass3.tf.password = true;
this.mcs.edit_pass2.tf.text = '';
this.mcs.edit_pass3.tf.text = '';
this.thunk();
this.update();
if (_root.name != undefined) {
this.name_set(_root.name);
} else {
if (_root.ng_username != undefined) {
this.name_set(_root.ng_username);
} else {
if (_root.kongregate_username != undefined && _root.kongregate_username.toLowerCase() != 'guest') {
this.name_set(_root.kongregate_username);
} else {
if (_root.signals.name) {
this.name_set(_root.signals.name);
} else {
this.reroll();
}
}
}
}
this.info_show('');
this.info_unlock('');
this.so_load();
this.thunk();
};
v1.logindone = function () {
_root.wtf.logindone();
_root.wetplay.logindone();
};
v1.clean = function () {
if (_root.skip_wetlogin) {
this.logindone();
return undefined;
}
if (!_root.swish) {
_root.swish.clean();
_root.swish = (new Swish({'style': 'slide_left', 'mc': this.mc})).setup();
}
this.zmc._x = 0;
this.zmc._y = 0;
this.mc.removeMovieClip();
this.mc = null;
_root.Login_Name = this.name_text;
_root.Login_Done = true;
_root.Login_Session = this.session;
this.so_save();
this.autologin = false;
this.logindone();
};
v1.so_load = function () {
this.so = SharedObject.getLocal('wetlogin');
var v2 = this.so.data;
if (v2.version == this.VERSION) {
if (v2.name) {
this.name_set(v2.name);
}
if (v2.session) {
this.session = v2.session;
}
if (v2.opt_chat) {
this.opt_chat = (v2.opt_chat == 1) ? true : false;
}
if (v2.opt_sound) {
this.opt_sound = (v2.opt_sound == 1) ? true : false;
}
}
if (_root.S) {
this.session = _root.S;
}
if (this.session != null && (this.session != 0 && this.autologin)) {
this.do_session();
}
};
v1.so_save = function () {
var v2 = this.so.data;
v2.version = this.VERSION;
v2.name = this.name_text;
v2.session = this.session;
v2.opt_chat = this.opt_chat ? 1 : 2;
v2.opt_sound = this.opt_sound ? 1 : 2;
this.so.flush();
};
v1.hover_off = function (me) {
if (_root.popup | this.locked) {
return undefined;
}
if (this.over == me) {
this.do_this(me, 'off');
this.over = null;
}
};
v1.hover_on = function (me) {
if (_root.popup | this.locked) {
return undefined;
}
if (this.over != me) {
this.do_this(me, 'on');
this.over = me;
}
};
v1.press = function (me) {
if (_root.popup | this.locked) {
return undefined;
}
this.do_this(me, 'press');
};
v1.click = function (me) {
if (_root.popup | this.locked) {
return undefined;
}
this.do_this(me, 'click');
};
v1.lostfocus = function (nmc, me) {
if (_root.popup | this.locked) {
return undefined;
}
switch (me.nam) {
if (me.nam !== 'edit_name3') {
} else {
case 'edit_name1':
case 'edit_name2':
this.name_set(me.tf.text);
}
}
};
v1.thunk = function () {
if (this.joinonly) {
if (this.viewYdest == 0) {
this.mcs.but_back1._visible = false;
this.mcs.but_back2._visible = false;
}
}
if (this.opt_chat) {
this.mcs.but_chat_on._alpha = 100;
this.mcs.but_chat_off._alpha = 25;
} else {
this.mcs.but_chat_on._alpha = 25;
this.mcs.but_chat_off._alpha = 100;
}
if (this.opt_sound) {
this.mcs.but_sound_on._alpha = 100;
this.mcs.but_sound_off._alpha = 25;
} else {
this.mcs.but_sound_on._alpha = 25;
this.mcs.but_sound_off._alpha = 100;
}
};
v1.update = function () {
if (_root.skip_wetlogin) {
return undefined;
}
if (this.timeout_lv) {
--this.timeout_time;
if (this.timeout_time <= 0) {
this.timeout_lv.err = 'Network TimeOut! Try again or click on the SKIP LOGIN button below.';
this.timeout_func(false, this.timeout_lv);
this.timeout_lv = null;
this.timeout_time = null;
this.timeout_func = null;
this.mcs.but_skiplogin._visible = true;
}
}
if (this.joinonly) {
if (this.viewYdest == 0) {
this.viewYdest = 600;
}
}
if (_root.popup) {
return undefined;
}
++this.frame;
if (this.viewYdest != this.viewY) {
this.viewY += (this.viewYdest - this.viewY) * 1 / 8;
if ((this.viewY - this.viewYdest) * (this.viewY - this.viewYdest) < 0.5) {
this.viewY = this.viewYdest;
}
this.parallax.guest._y = this.viewY + 300;
this.parallax.login._y = this.viewY + 300 + 600;
this.parallax.signup._y = this.viewY + 300 - 600;
this.mcs.circ._rotation = this.viewY * 360 / 600;
}
var v2 = Math.floor(this.frame / 8) % 4;
if (v2 == 3) {
v2 = 1;
}
switch (v2) {
case 0:
this.mcs.anim1a._visible = true;
this.mcs.anim1b._visible = true;
this.mcs.anim2a._visible = false;
this.mcs.anim2b._visible = false;
this.mcs.anim3a._visible = false;
this.mcs.anim3b._visible = false;
break;
case 1:
this.mcs.anim1a._visible = false;
this.mcs.anim1b._visible = false;
this.mcs.anim2a._visible = true;
this.mcs.anim2b._visible = true;
this.mcs.anim3a._visible = false;
this.mcs.anim3b._visible = false;
break;
case 2:
this.mcs.anim1a._visible = false;
this.mcs.anim1b._visible = false;
this.mcs.anim2a._visible = false;
this.mcs.anim2b._visible = false;
this.mcs.anim3a._visible = true;
this.mcs.anim3b._visible = true;
}
};
v1.do_this = function (me, act) {
if (me.nams[0] == 'but') {
if (act == 'on') {
me._alpha = 100;
switch (me.nams[1]) {
case 'login':
this.info_pop('Goto login page.');
break;
case 'signup':
this.info_pop('Goto signup page.');
break;
case 'back1':
case 'back2':
this.info_pop('Back to guest login page.');
break;
case 'no':
this.info_pop('Get a new random name.');
break;
case 'yes':
this.info_pop('Shall we play a game?');
break;
case 'chat':
this.info_pop('In game chat?');
break;
case 'sound':
this.info_pop('In game sound?');
}
} else {
if (act == 'off') {
me._alpha = 25;
this.thunk();
this.info_pop();
} else {
if (act == 'press') {
me._alpha = 75;
} else {
if (act == 'click') {
me._alpha = 100;
switch (me.nams[1]) {
case 'login':
this.viewYdest = -600;
break;
case 'signup':
this.viewYdest = 600;
break;
case 'back1':
case 'back2':
this.viewYdest = 0;
break;
case 'no':
this.reroll();
break;
case 'chat':
if (me.nams[2] == 'on') {
this.opt_chat = true;
} else {
this.opt_chat = false;
}
this.thunk();
break;
case 'sound':
if (me.nams[2] == 'on') {
this.opt_sound = true;
_root.wp_vol = 50;
} else {
this.opt_sound = false;
_root.wp_vol = 0;
}
this.thunk();
break;
case 'yes':
this.do_guest();
break;
case 'dosignup':
this.do_signup();
break;
case 'dologin':
this.do_login();
break;
case 'skiplogin':
this.session = 0;
this.name_set('me');
this.up.state_next = 'menu';
}
}
}
}
}
}
};
v1.reroll = function () {
var v2 = new Date();
v2 = Math.floor(v2.getTime() / 1);
this.rnd_seed(v2);
var v3 = v2 % (Login.txt_adjectives.length - 1);
var v4 = this.rnd() % (Login.txt_nouns.length - 1);
this.name_set(Login.txt_adjectives[v3] + '_' + Login.txt_nouns[v4]);
};
v1.name_set = function (nam) {
this.mcs.edit_name1.tf.text = nam;
this.mcs.edit_name2.tf.text = nam;
this.mcs.edit_name3.tf.text = nam;
this.name_text = nam;
};
v1.info_lock = function () {
this.locked = true;
};
v1.info_unlock = function () {
this.locked = false;
};
v1.info_show = function (s) {
this.info_text = s;
this.info_pop(s);
};
v1.info_pop = function (s) {
if (!s) {
s = this.info_text;
}
gfx.set_text_html(this.mcs.text_tip.tf, 16, 0, s);
if (s == '') {
this.mcs.back_tooltip._visible = false;
} else {
this.mcs.back_tooltip._visible = true;
}
};
v1.do_guest = function () {
if (this.timeout_lv) {
return undefined;
}
var v2 = new LoadVars();
v2.name = this.name_text;
fbsig.copy_fb_sigs(_root, v2);
v2.sendAndLoad(this.user_php + '?cmd=guest', v2, 'POST');
v2.onLoad = this.delegate(this.do_guest_post, v2);
this.info_lock();
this.info_show('Trying ' + v2.name + ' guest account on ' + _root.host);
this.timeout_lv = v2;
this.timeout_time = 25 * 10;
this.timeout_func = this.delegate(this.do_guest_post, null);
};
v1.do_guest_post = function (success, lv) {
if (this.timeout_lv != lv) {
return undefined;
}
this.timeout_lv = null;
this.name_set(lv.name);
this.session = 0;
if (lv.err == 'OK') {
_root.Login_Img = lv.img;
this.up.state_next = 'menu';
} else {
this.mcs.but_skiplogin._visible = true;
this.session = null;
this.info_show(lv.err ? lv.err : 'ERROR');
this.info_unlock();
if (!this.joinonly) {
this.session = 0;
this.name_set('me');
this.up.state_next = 'menu';
}
}
};
v1.do_signup = function () {
if (this.timeout_lv) {
return undefined;
}
var v2 = new LoadVars();
v2.name = this.name_text;
v2.pass = this.mcs.edit_pass3.tf.text;
v2.email = this.mcs.edit_email3.tf.text;
v2.refer = _root.refer;
fbsig.copy_fb_sigs(_root, v2);
v2.sendAndLoad(this.user_php + '?cmd=create', v2, 'POST');
v2.onLoad = this.delegate(this.do_signup_post, v2);
this.info_lock();
this.info_show('Creating new account on ' + _root.host);
this.timeout_lv = v2;
this.timeout_time = 25 * 10;
this.timeout_func = this.delegate(this.do_signup_post, null);
};
v1.do_signup_post = function (success, lv) {
if (this.timeout_lv != lv) {
return undefined;
}
this.timeout_lv = null;
this.name_set(lv.name);
this.session = lv.S;
if (lv.err == 'OK') {
_root.Login_Img = lv.img;
this.up.state_next = 'menu';
} else {
this.mcs.but_skiplogin._visible = true;
this.session = null;
this.info_show(lv.err ? lv.err : 'ERROR');
this.info_unlock();
}
};
v1.do_login = function () {
if (this.timeout_lv) {
return undefined;
}
var v2 = new LoadVars();
v2.name = this.name_text;
v2.pass = this.mcs.edit_pass2.tf.text;
fbsig.copy_fb_sigs(_root, v2);
v2.sendAndLoad(this.user_php + '?cmd=login', v2, 'POST');
v2.onLoad = this.delegate(this.do_login_post, v2);
this.info_lock();
this.info_show('Logging on as ' + v2.name + ' at ' + _root.host);
this.timeout_lv = v2;
this.timeout_time = 25 * 10;
this.timeout_func = this.delegate(this.do_login_post, null);
};
v1.do_login_post = function (success, lv) {
if (this.timeout_lv != lv) {
return undefined;
}
this.timeout_lv = null;
this.name_set(lv.name);
this.session = lv.S;
if (lv.err == 'OK') {
_root.Login_Img = lv.img;
this.up.state_next = 'menu';
} else {
this.mcs.but_skiplogin._visible = true;
this.session = null;
this.info_show(lv.err ? lv.err : 'ERROR');
this.info_unlock();
}
};
v1.do_session = function () {
if (this.timeout_lv) {
return undefined;
}
var v2 = new LoadVars();
v2.session = this.session;
fbsig.copy_fb_sigs(_root, v2);
v2.sendAndLoad(this.user_php + '?cmd=session', v2, 'POST');
v2.onLoad = this.delegate(this.do_session_post, v2);
this.info_lock();
this.info_show('attempting to auto log in to ' + _root.host);
this.timeout_lv = v2;
this.timeout_time = 25 * 10;
this.timeout_func = this.delegate(this.do_session_post, null);
};
v1.do_session_post = function (success, lv) {
if (this.timeout_lv != lv) {
return undefined;
}
this.timeout_lv = null;
this.name_set(lv.name);
this.session = lv.S;
if (lv.err == 'OK') {
_root.Login_Img = lv.img;
this.up.state_next = 'menu';
} else {
this.mcs.but_skiplogin._visible = true;
this.session = null;
this.info_show(lv.err ? lv.err : 'ERROR');
this.info_unlock();
}
};
ASSetPropFlags(v1, null, 1);
v1.name_text = 'me';
v1.session = 0;
v1.locked = false;
v1.saves = null;
v1.opt_chat = true;
v1.opt_sound = true;
v1.rnd_num = 0;
v1.autologin = true;
v1.joinonly = false;
v1.so = null;
v1.VERSION = 17;
v1.info_text = '';
_global.Login.register_lines = ['back,base', 'back,guest', 'back,guest', 'edit_name1,guest', 'but_yes,guest', 'but_no,guest', 'back,login', 'anim1a,login', 'anim2a,login', 'anim3a,login', 'back,login', 'edit_name2,login', 'back,login', 'edit_pass2,login', 'but_forgot,login', 'but_dologin,login', 'but_back1,login', 'back,signup', 'anim1b,signup', 'anim2b,signup', 'anim3b,signup', 'back,signup', 'edit_name3,signup', 'back,signup', 'edit_pass3,signup', 'back,signup', 'edit_email3,signup', 'but_dosignup,signup', 'but_back2,signup', 'but_login,fore', 'but_signup,fore', 'but_chat_on,fore', 'but_chat_off,fore', 'but_sound_on,fore', 'but_sound_off,fore', 'but_flag_uk,fore', 'but_flag_us,fore', 'but_flag_es,fore', 'but_flag_de,fore', 'but_flag_nl,fore', 'but_flag_fr,fore', 'but_flag_gr,fore', 'but_flag_it,fore', 'but_flag_pt,fore', 'but_flag_ru,fore', 'circ,fore', 'back_tooltip,fore', 'text_tip,fore', 'but_skiplogin,fore', ''];
_global.Login.txt_adjectives = ['ravishing', 'mimic', 'famous', 'cheerful', 'livid', 'obstinate', 'exhausted', 'graceful', 'outrageous', 'radical', 'childish', 'snobbish', 'miserly', 'amiable', 'disgusting', 'awful', 'humorous', 'fanciful', 'pathetic', 'windy', 'dusty', 'bashful', 'freaky', 'chilly', 'stormy', 'humid', 'bountiful', 'jubilant', 'irritated', 'patient', 'dizzy', 'skeptical', 'puzzled', 'perplexed', 'jovial', 'hyper', 'squirrely', 'jittery', 'elegant', 'gleeful', 'dreary', 'impish', 'sneaky', 'horrid', 'monsterous', 'able', 'abnormal', 'absent', 'absolute', 'accurate', 'acidic', 'acoustic', 'active', 'adequate', 'airborne', 'airy', 'all', 'alone', 'american', 'amphibious', 'angry', 'annual', 'another', 'any', 'apparent', 'artificial', 'atomic', 'audible', 'automatic', 'auxiliary', 'available', 'bad', 'ballistic', 'bare', 'basic', 'beautiful', 'beneficial', 'best', 'better', 'big', 'biggest', 'binary', 'bipolar', 'bitter', 'black', 'blind', 'blue', 'both', 'brief', 'bright', 'broad', 'brown', 'busy', 'capable', 'careful', 'careless', 'carnal', 'cautious', 'celestial', 'celsius', 'central', 'ceramic', 'certain', 'cheap', 'cheaper', 'civil', 'clean', 'clear', 'closer', 'coarse', 'cold', 'common', 'compact', 'complete', 'complex', 'compound', 'compulsory', 'concrete', 'conscious', 'constant', 'continuous', 'convenient', 'cool', 'correct', 'corrosive', 'critical', 'cruel', 'cubic', 'culpable', 'current', 'daily', 'dangerous', 'dark', 'darker', 'darkest', 'dead', 'deaf', 'dear', 'dearer', 'dearest', 'decimal', 'deep', 'deeper', 'deepest', 'defective', 'definite', 'delicate', 'dental', 'dependent', 'destructive', 'diagonal', 'different', 'difficult', 'digital', 'dim', 'diseased', 'distinct', 'ditty', 'dormant', 'double', 'drafty', 'drier', 'driest', 'drowsy', 'dry', 'dual', 'due', 'dull', 'dumb', 'dynamic', 'each', 'easy', 'eighth', 'either', 'elastic', 'electric', 'eligible', 'else', 'empty', 'enough', 'entire', 'equal', 'erect', 'erratic', 'essential', 'eventual', 'every', 'everyday', 'evident', 'exact', 'excellent', 'excessive', 'exclusive', 'explosive', 'extensive', 'external', 'extra', 'extreme', 'extrinsic', 'faint', 'fair', 'false', 'familiar', 'fast', 'fat', 'fatal', 'fattest', 'faulty', 'feasible', 'federal', 'feeble', 'fertile', 'few', 'fifth', 'final', 'fine', 'firm', 'first', 'fiscal', 'fit', 'flammable', 'flat', 'flexible', 'foggy', 'foolish', 'foreign', 'formal', 'former', 'fourth', 'free', 'frequent', 'fresh', 'full', 'gamma', 'general', 'gentle', 'good', 'gradual', 'grand', 'graphic', 'grave', 'gray', 'great', 'green', 'grievous', 'grocery', 'happy', 'hard', 'harmful', 'hazardous', 'healthy', 'heavy', 'helpful', 'high', 'hilly', 'hind', 'hollow', 'hot', 'huge', 'icy', 'identical', 'idle', 'ill', 'imminent', 'important', 'improper', 'inboard', 'inner', 'instant', 'intense', 'internal', 'intrinsic', 'iterative', 'jet', 'julian', 'junior', 'keen', 'kelvin', 'kind', 'knobbed', 'large', 'last', 'late', 'lawful', 'lazy', 'leaky', 'lean', 'least', 'legal', 'less', 'lethal', 'level', 'likely', 'linear', 'liquid', 'literal', 'little', 'lively', 'local', 'lone', 'long', 'loose', 'loud', 'low', 'magnetic', 'main', 'many', 'maple', 'marine', 'martial', 'mean', 'medical', 'mental', 'mere', 'metallic', 'middle', 'minor', 'minus', 'misty', 'mnemonic', 'mobile', 'modern', 'modular', 'molten', 'moral', 'more', 'most', 'movable', 'muddy', 'multiple', 'mutual', 'naked', 'narcotic', 'narrow', 'national', 'natural', 'nautical', 'naval', 'neat', 'necessary', 'negative', 'nervous', 'neutral', 'new', 'next', 'nice', 'noisy', 'nominal', 'normal', 'nuclear', 'numeric', 'numerical', 'numerous', 'obsolete', 'obvious', 'odd', 'offline', 'okay', 'old', 'online', 'open', 'optimum', 'optional', 'oral', 'ordinary', 'original', 'other', 'outboard', 'outer', 'outside', 'outward', 'overhead', 'oversize', 'own', 'pale', 'paler', 'palest', 'parallel', 'partial', 'passive', 'past', 'peculiar', 'periodic', 'permanent', 'personal', 'petty', 'phonetic', 'physical', 'plain', 'planar', 'plenty', 'poisonous', 'polite', 'political', 'poor', 'portable', 'positive', 'possible', 'potential', 'powerful', 'practical', 'precise', 'pretty', 'previous', 'primary', 'prior', 'private', 'probable', 'prompt', 'proper', 'protective', 'proximate', 'punitive', 'pure', 'purple', 'quick', 'quiet', 'random', 'rapid', 'raw', 'ready', 'real', 'red', 'regional', 'regular', 'relative', 'reliable', 'remote', 'removable', 'responsible', 'retail', 'reusable', 'rich', 'richer', 'richest', 'right', 'rigid', 'ripe', 'rough', 'sad', 'sadder', 'saddest', 'safe', 'safer', 'safest', 'same', 'secondary', 'secure', 'senior', 'sensitive', 'separate', 'serious', 'seventh', 'several', 'severe', 'shady', 'shallow', 'sharp', 'shy', 'shiny', 'short', 'sick', 'silent', 'similar', 'simple', 'single', 'sixth', 'slack', 'slight', 'slippery', 'slower', 'slowest', 'small', 'smart', 'smooth', 'snug', 'social', 'soft', 'solar', 'solid', 'some', 'sour', 'special', 'specific', 'stable', 'static', 'steady', 'steep', 'sterile', 'sticky', 'stiff', 'still', 'straight', 'strange', 'strict', 'strong', 'such', 'sudden', 'suitable', 'sunny', 'superior', 'sure', 'sweet', 'swift', 'swollen', 'symbolic', 'synthetic', 'tactical', 'tall', 'taut', 'technical', 'temporary', 'tentative', 'terminal', 'thermal', 'thick', 'thin', 'third', 'thirsty', 'tight', 'tiny', 'toxic', 'tropical', 'true', 'turbulent', 'typical', 'unique', 'upper', 'urgent', 'useable', 'useful', 'usual', 'valid', 'valuable', 'various', 'vertical', 'viable', 'violent', 'virtual', 'visible', 'visual', 'vital', 'void', 'volatile', 'wanton', 'warm', 'weak', 'weary', 'wet', 'white', 'whole', 'wide', 'wise', 'wooden', 'woolen', 'worse', 'worst', 'wrong', 'yellow', 'young', 'harmless', 'inactive', 'incorrect', 'indirect', 'invalid', 'unable', 'unknown', 'unmated', 'unsafe', 'unsigned', 'unused', 'unusual', 'unwanted', 'useless', 'aged', 'etched', 'finished', 'given', 'left', 'lost', 'mistaken', 'proven', ''];
_global.Login.txt_nouns = ['abrasive', 'abuser', 'accident', 'acid', 'acre', 'acronym', 'act', 'address', 'admiral', 'adverb', 'adviser', 'affair', 'agent', 'aid', 'aim', 'air', 'airplane', 'airport', 'airship', 'alarm', 'alcoholic', 'algebra', 'alias', 'alibi', 'alley', 'alloy', 'analog', 'analyst', 'anchor', 'angle', 'animal', 'anthem', 'apple', 'april', 'apron', 'arc', 'arch', 'area', 'arm', 'army', 'array', 'arrest', 'arrow', 'atom', 'attack', 'ax', 'axis', 'baby', 'back', 'bag', 'ball', 'balloon', 'band', 'bang', 'bar', 'barge', 'barrel', 'base', 'basin', 'basket', 'bat', 'batch', 'bath', 'bather', 'battery', 'bay', 'beach', 'beacon', 'bead', 'beam', 'bean', 'bear', 'beat', 'bed', 'being', 'bend', 'berry', 'bigamy', 'blade', 'blank', 'blanket', 'blast', 'blasts', 'block', 'blood', 'blot', 'blow', 'blower', 'boat', 'body', 'boil', 'bolt', 'bone', 'book', 'boot', 'bore', 'bottle', 'bottom', 'box', 'boy', 'brain', 'bread', 'breast', 'brick', 'broom', 'bubble', 'bucket', 'builder', 'bullet', 'bump', 'bus', 'bush', 'butt', 'butter', 'button', 'byte', 'cab', 'cake', 'camp', 'cannon', 'cap', 'captain', 'carpet', 'cause', 'cave', 'cell', 'cellar', 'chair', 'chalk', 'cheat', 'cheek', 'cheese', 'chief', 'child', 'chimney', 'church', 'circle', 'citizen', 'civilian', 'clamp', 'claw', 'clerk', 'clock', 'cloud', 'club', 'clump', 'coal', 'coat', 'coder', 'colon', 'comb', 'comma', 'computer', 'cone', 'console', 'control', 'copy', 'cord', 'core', 'cork', 'corner', 'cough', 'count', 'crack', 'cradle', 'craft', 'cramp', 'crash', 'crawl', 'crust', 'cube', 'cup', 'cure', 'curl', 'dam', 'data', 'date', 'dealer', 'death', 'debris', 'debt', 'decay', 'december', 'deck', 'decoder', 'default', 'defect', 'delight', 'dent', 'desert', 'desire', 'desk', 'device', 'diode', 'dirt', 'disease', 'disgust', 'dish', 'disk', 'ditch', 'ditches', 'diver', 'divider', 'dolly', 'dope', 'dose', 'drag', 'dress', 'drug', 'dump', 'ear', 'edge', 'egg', 'elbow', 'electron', 'eleven', 'end', 'enemy', 'error', 'exit', 'expert', 'face', 'factory', 'fake', 'fall', 'family', 'fan', 'farm', 'father', 'fear', 'feather', 'feeder', 'feet', 'field', 'fighter', 'file', 'filter', 'finger', 'fish', 'fist', 'flake', 'flap', 'flash', 'flood', 'floor', 'flush', 'foam', 'fog', 'fold', 'food', 'foot', 'force', 'forest', 'fork', 'form', 'fort', 'friction', 'friday', 'friend', 'front', 'frost', 'fruit', 'fur', 'game', 'gang', 'gap', 'garage', 'garden', 'gas', 'gate', 'gear', 'gene', 'giant', 'girl', 'gland', 'glass', 'glaze', 'gleam', 'glide', 'glove', 'glow', 'glue', 'goal', 'grade', 'graph', 'grass', 'grease', 'grid', 'grip', 'groan', 'gross', 'growth', 'guard', 'guest', 'guide', 'gum', 'gun', 'guy', 'habit', 'hail', 'hair', 'half', 'hall', 'hammer', 'hand', 'handle', 'hangar', 'harbor', 'hardware', 'harm', 'harpoon', 'haste', 'hat', 'hatch', 'hate', 'hazard', 'head', 'heap', 'heart', 'heat', 'heater', 'heel', 'heels', 'height', 'hello', 'helm', 'helmet', 'help', 'hem', 'here', 'hertz', 'hill', 'hint', 'hip', 'hiss', 'hold', 'hole', 'home', 'honk', 'hood', 'hoof', 'hook', 'hoop', 'horn', 'hose', 'hotel', 'hour', 'house', 'howl', 'hub', 'hug', 'hull', 'hum', 'human', 'humor', 'hump', 'hundred', 'hunk', 'hunt', 'hush', 'hut', 'ice', 'icing', 'idea', 'ideal', 'image', 'impact', 'impulse', 'inch', 'injury', 'ink', 'inlet', 'inlets', 'input', 'inquiry', 'insanity', 'insignia', 'intake', 'intakes', 'integer', 'integrity', 'intent', 'intents', 'intercom', 'interest', 'interface', 'interior', 'interval', 'interview', 'invention', 'invoice', 'iron', 'island', 'issue', 'item', 'ivory', 'jack', 'jail', 'jam', 'jar', 'jaw', 'jelly', 'jewel', 'jig', 'job', 'joint', 'judge', 'jug', 'july', 'jump', 'june', 'junk', 'jury', 'justice', 'keel', 'kettle', 'key', 'keyboard', 'keyword', 'kick', 'kill', 'kiss', 'kit', 'kite', 'knee', 'knife', 'knob', 'knock', 'knot', 'label', 'labor', 'lace', 'lack', 'ladder', 'lake', 'lamp', 'land', 'lane', 'lantern', 'lap', 'lapse', 'lard', 'laser', 'lash', 'latch', 'laugh', 'launch', 'laundry', 'law', 'layer', 'lead', 'leader', 'leaf', 'leak', 'leakage', 'leap', 'leaper', 'leather', 'leave', 'leg', 'legend', 'length', 'lesson', 'letter', 'liberty', 'library', 'lick', 'lid', 'life', 'lift', 'light', 'limb', 'lime', 'limit', 'limp', 'line', 'linen', 'link', 'lint', 'lip', 'liquor', 'list', 'liter', 'litre', 'liver', 'load', 'loaf', 'loan', 'lock', 'locker', 'log', 'logic', 'look', 'loop', 'loss', 'lot', 'love', 'lumber', 'lump', 'lung', 'machine', 'magnet', 'mail', 'major', 'make', 'male', 'man', 'map', 'marble', 'march', 'margin', 'mark', 'market', 'mask', 'mass', 'mast', 'master', 'mat', 'match', 'mate', 'material', 'math', 'meal', 'meat', 'medal', 'medium', 'meet', 'member', 'memory', 'men', 'mention', 'mentions', 'menu', 'menus', 'mess', 'metal', 'meter', 'method', 'mile', 'milk', 'mill', 'mind', 'mine', 'mint', 'mirror', 'misfit', 'miss', 'mission', 'mist', 'mitt', 'mitten', 'mix', 'mode', 'model', 'modem', 'module', 'moment', 'monday', 'money', 'monitor', 'moon', 'moonlight', 'mop', 'moss', 'motel', 'mother', 'motion', 'motor', 'mount', 'mouth', 'move', 'mover', 'much', 'mud', 'mug', 'mule', 'muscle', 'music', 'mustard', 'nail', 'name', 'nation', 'nature', 'nausea', 'navy', 'neck', 'need', 'needle', 'neglect', 'nerve', 'nest', 'net', 'neutron', 'nickel', 'night', 'nod', 'noise', 'noon', 'north', 'nose', 'notation', 'note', 'notice', 'noun', 'nozzle', 'null', 'number', 'numeral', 'nurse', 'nut', 'nylon', 'oak', 'oar', 'object', 'ocean', 'odor', 'odors', 'offer', 'officer', 'ohm', 'oil', 'operand', 'opinion', 'option', 'orange', 'order', 'ore', 'organ', 'orifice', 'origin', 'ornament', 'ounce', 'ounces', 'outfit', 'outing', 'outlet', 'outline', 'output', 'oven', 'owner', 'oxide', 'oxygen', 'pace', 'pack', 'pad', 'page', 'pail', 'pain', 'paint', 'pair', 'pan', 'pane', 'panel', 'paper', 'parcel', 'parity', 'park', 'part', 'partner', 'party', 'pascal', 'pass', 'passage', 'paste', 'pat', 'patch', 'path', 'patient', 'patrol', 'paw', 'paws', 'pay', 'pea', 'peace', 'peak', 'pear', 'peck', 'pedal', 'peg', 'pen', 'pencil', 'people', 'percent', 'perfect', 'period', 'permit', 'person', 'phase', 'photo', 'pick', 'picture', 'piece', 'pier', 'pile', 'pilot', 'pin', 'pink', 'pipe', 'pistol', 'piston', 'pit', 'place', 'plan', 'plane', 'plant', 'plastic', 'plate', 'play', 'plead', 'pleasure', 'plot', 'plow', 'plug', 'pocket', 'point', 'poison', 'poke', 'pole', 'police', 'polish', 'poll', 'pond', 'pool', 'pop', 'port', 'portion', 'post', 'pot', 'potato', 'pound', 'powder', 'power', 'prefix', 'presence', 'present', 'president', 'press', 'price', 'prime', 'print', 'prism', 'prison', 'probe', 'problem', 'produce', 'product', 'profile', 'profit', 'program', 'progress', 'project', 'pronoun', 'proof', 'prop', 'protest', 'public', 'puddle', 'puff', 'pull', 'pulse', 'pump', 'punch', 'pupil', 'purchase', 'purge', 'purpose', 'push', 'pyramid', 'quart', 'quarter', 'question', 'quiet', 'quota', 'race', 'rack', 'radar', 'radian', 'radio', 'rag', 'rail', 'rain', 'rainbow', 'raincoat', 'raise', 'rake', 'ram', 'ramp', 'range', 'rank', 'rap', 'rate', 'ratio', 'ratios', 'rattle', 'ray', 'reach', 'reader', 'ream', 'rear', 'reason', 'rebound', 'receipt', 'recess', 'record', 'recovery', 'recruit', 'reel', 'refund', 'refuse', 'region', 'regret', 'relay', 'release', 'relief', 'remedy', 'removal', 'repair', 'report', 'request', 'rescue', 'reserve', 'resident', 'residue', 'resource', 'respect', 'rest', 'result', 'return', 'reverse', 'review', 'reward', 'rheostat', 'rhythm', 'rib', 'ribbon', 'rice', 'riddle', 'ride', 'rifle', 'rig', 'rim', 'rinse', 'river', 'road', 'roar', 'rock', 'rocket', 'rod', 'roll', 'roof', 'room', 'root', 'rope', 'rose', 'round', 'route', 'rower', 'rubber', 'rudder', 'rug', 'rule', 'rumble', 'run', 'runner', 'rush', 'rust', 'sack', 'saddle', 'safety', 'sail', 'sailor', 'sale', 'salt', 'salute', 'sample', 'sand', 'sap', 'sash', 'scab', 'scale', 'scene', 'school', 'science', 'scope', 'score', 'scrap', 'scratch', 'scream', 'screen', 'screw', 'sea', 'seal', 'seam', 'search', 'season', 'seat', 'second', 'secret', 'sector', 'seed', 'self', 'sense', 'sentry', 'serial', 'series', 'servant', 'session', 'setup', 'sewage', 'sewer', 'sex', 'shade', 'shadow', 'shaft', 'shame', 'shape', 'share', 'shave', 'sheet', 'shelf', 'shell', 'shelter', 'shield', 'shift', 'ship', 'shirt', 'shock', 'shoe', 'shop', 'shore', 'shoulder', 'shout', 'shovel', 'show', 'shower', 'side', 'sight', 'sign', 'silence', 'silk', 'sill', 'silver', 'sink', 'sip', 'sir', 'siren', 'sister', 'site', 'size', 'skew', 'skill', 'skin', 'skip', 'skirt', 'sky', 'slap', 'slash', 'slate', 'slave', 'sled', 'sleep', 'sleeve', 'slice', 'slide', 'slope', 'slot', 'smash', 'smell', 'smile', 'smoke', 'snap', 'sneeze', 'snow', 'soap', 'society', 'sock', 'socket', 'sod', 'software', 'soil', 'soldier', 'sole', 'son', 'sonar', 'song', 'sort', 'sound', 'soup', 'source', 'south', 'space', 'spacer', 'spade', 'span', 'spar', 'spare', 'spark', 'speaker', 'spear', 'speech', 'speed', 'speeder', 'spike', 'spill', 'spiral', 'splash', 'splice', 'splint', 'spoke', 'sponge', 'sponsor', 'sponsors', 'spool', 'spoon', 'sport', 'spot', 'spray', 'spring', 'square', 'squeak', 'stack', 'staff', 'stage', 'stair', 'stake', 'stall', 'stamp', 'stand', 'staple', 'star', 'stare', 'start', 'state', 'status', 'steam', 'steamer', 'steel', 'stem', 'step', 'stern', 'stick', 'sting', 'stitch', 'stock', 'stomach', 'stone', 'stool', 'stop', 'store', 'storm', 'story', 'stove', 'strain', 'strand', 'strap', 'straw', 'streak', 'stream', 'street', 'stress', 'strike', 'string', 'strip', 'stripe', 'strobe', 'stroke', 'strut', 'stub', 'student', 'study', 'stuff', 'stump', 'submarine', 'success', 'sugar', 'suit', 'sum', 'sun', 'sunday', 'sunlight', 'sunrise', 'sunset', 'sunshine', 'surface', 'surge', 'surprise', 'swab', 'swallow', 'swamp', 'swap', 'sweep', 'swell', 'swim', 'swimmer', 'swing', 'switch', 'swivel', 'sword', 'symbol', 'system', 'tab', 'table', 'tablet', 'tack', 'tactic', 'tag', 'tail', 'tailor', 'talk', 'tan', 'tank', 'tap', 'tape', 'tar', 'target', 'task', 'taste', 'tax', 'taxi', 'team', 'tear', 'teeth', 'teller', 'temper', 'tender', 'tens', 'tension', 'tent', 'tenth', 'term', 'terrain', 'test', 'tests', 'text', 'theory', 'thin', 'thing', 'thirty', 'thread', 'threat', 'throat', 'thumb', 'thunder', 'tick', 'tide', 'tie', 'till', 'time', 'timer', 'timers', 'times', 'tin', 'tip', 'tips', 'tire', 'tissue', 'title', 'today', 'toe', 'ton', 'tongue', 'tool', 'tools', 'tooth', 'top', 'topic', 'toss', 'total', 'touch', 'tour', 'towel', 'tower', 'town', 'trace', 'track', 'tracker', 'tractor', 'trade', 'traffic', 'trail', 'trailer', 'train', 'transfer', 'transit', 'trap', 'trash', 'tray', 'tree', 'trial', 'trick', 'trigger', 'trim', 'trip', 'troop', 'trouble', 'truck', 'trunk', 'truth', 'try', 'tub', 'tug', 'tune', 'tunnel', 'turn', 'twig', 'twin', 'twine', 'twirl', 'twist', 'type', 'typist', 'umbrella', 'uniform', 'unit', 'update', 'upside', 'usage', 'use', 'user', 'vacuum', 'value', 'valve', 'vapor', 'vector', 'vehicle', 'vendor', 'vent', 'verb', 'version', 'vessel', 'veteran', 'vice', 'victim', 'video', 'view', 'village', 'vine', 'violet', 'visit', 'voice', 'volt', 'vomit', 'wafer', 'wage', 'wagon', 'waist', 'wait', 'wake', 'walk', 'wall', 'want', 'war', 'wash', 'waste', 'watch', 'water', 'watt', 'wave', 'wax', 'way', 'web', 'weed', 'week', 'weight', 'weld', 'west', 'wheel', 'whip', 'whirl', 'width', 'wiggle', 'win', 'winch', 'wind', 'wine', 'wing', 'winter', 'wire', 'wish', 'woman', 'wonder', 'wood', 'wool', 'word', 'work', 'world', 'worm', 'worry', 'worth', 'wrap', 'wreck', 'wrench', 'wrist', 'writer', 'yard', 'yarn', 'year', 'yell', 'yield', 'yolk', 'zero', 'zip', 'zone', 'can', 'may', 'coupling', 'damping', 'ending', 'rigging', 'ring', 'sizing', 'sling', 'nothing', 'cast', 'cost', 'cut', 'drunk', 'felt', 'ground', 'hit', 'lent', 'offset', 'set', 'shed', 'shot', 'slit', 'thought', 'wound', ''];
}
#endinitclip
}
movieClip 20489 __Packages.BetaSignals {
#initclip
if (!BetaSignals) {
_global.BetaSignals = function (_up) {
this.up = _up;
if (_root.nonoba$apicodeas2) {
NonobaAPI.GetUsername(this.delegate(this.noob_name));
}
};
var v1 = _global.BetaSignals.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function () {};
v1.clean = function () {};
v1.set_score_check = function (new_score, new_replay, new_moves) {
if (new_score > this.score) {
this.score = new_score;
if (new_replay) {
this.replay_str = new_replay;
}
if (new_moves) {
this.moves = new_moves;
}
}
};
v1.mochi_score_sent = function () {};
v1.send_start = function () {
if (_root.audit) {
return undefined;
}
if (_root.sock) {
var v2 = {'gcmd': 'signal', 'stype': 'start', 'sgame': this.game, 'sseed': this.seed};
_root.sock.gmsg(v2, undefined);
}
if ((_root._url.toLowerCase()).indexOf('gamegarage') >= 0 && (_root.game_id && _root.user_id)) {
var v3 = new LoadVars();
v3.game_id = _root.game_id;
v3.user_id = _root.user_id;
v3.sendAndLoad('http://www.gamegarage.co.uk/scripts/tracking.php', v3, 'POST');
}
};
v1.send_final = function (nam, num) {
if (_root.audit) {
return undefined;
}
if (_root.sock) {
var v4 = {'gcmd': 'signal', 'stype': 'final', 'sgame': this.game, 'sseed': this.seed, 'snam': nam, 'snum': num};
_root.sock.gmsg(v4, undefined);
}
if ((_root._url.toLowerCase()).indexOf('gamegarage') >= 0 && (_root.game_id && _root.user_id)) {
var v5 = new LoadVars();
v5.game_id = _root.game_id;
v5.user_id = _root.user_id;
v5.score = num;
v5.alg = _root.game_id + _root.user_id + num + 'a83l9xj';
v5.sendAndLoad('http://www.gamegarage.co.uk/scripts/score.php', v5, 'POST');
}
if (_root.com_mindjolt_api) {
var v6 = new LocalConnection();
v6.send(_root.com_mindjolt_api, 'submitScore', num);
}
if (_root.kongregateServices != undefined) {
if (this.game != 'wetdike') {
_root.kongregateScores.setMode(nam);
}
_root.kongregateScores.submit(num);
}
if (_root.nonoba$apicodeas2) {
NonobaAPI.SubmitScore(nam, num, this.delegate(this.noob_score));
}
};
v1.send_spesh = function (nam, num) {
if (_root.audit) {
return undefined;
}
if (_root.sock) {
var v4 = {'gcmd': 'signal', 'stype': 'score', 'sgame': this.game, 'sseed': this.seed, 'snam': nam, 'snum': num};
_root.sock.gmsg(v4, undefined);
}
if (_root.kongregateServices != undefined) {
if (this.game != 'wetdike') {
_root.kongregateScores.setMode(nam);
}
_root.kongregateScores.submit(num);
}
if (_root.HPScoreService != undefined) {
_root.HPScoreService.postScore(num, nam);
}
if (_root.pepere != undefined) {
var v6 = new Date();
var v5 = new LoadVars();
v5.params = _root.pepere;
v5.score = this.score;
v5.sendAndLoad('record.php', v5, 'POST');
}
if (_root.nonoba$apicodeas2) {
NonobaAPI.SubmitScore(nam, num, this.delegate(this.noob_score));
}
};
v1.send_score = function () {
var v2 = new Date();
this.score_last = this.score;
this.sent_stamp = v2.getTime();
this.send_spesh(this.score_name, this.score);
};
v1.send_score_check = function () {
if (this.score > this.score_last) {
this.send_score();
}
};
v1.send_score_wait_and_check = function () {
var v2 = new Date();
if (v2.getTime() - this.sent_stamp > 1000 * 60) {
this.send_score_check();
}
};
v1.noob_name = function (state, username) {
if (username) {
this.name = username;
}
};
v1.noob_score = function (state) {};
v1.submit_award = function (nam, num) {
if (_root.audit) {
return undefined;
}
if (_root.nonoba$apicodeas2) {
var v4 = (nam.split('_')).join('');
NonobaAPI.AwardAchievement(v4, this.delegate(this.noob_award));
}
};
v1.noob_award = function (state) {};
v1.submit_rank = function (nam, num) {
if (_root.audit) {
return undefined;
}
if (_root.nonoba$apicodeas2) {
var v4 = (nam.split('_')).join('');
NonobaAPI.SubmitScore(v4, Math.floor(num), this.delegate(this.noob_rank));
}
};
v1.noob_rank = function (state) {};
v1.signal = function (_base, event, t, num) {
this.base = _base;
switch (this.base) {
case 'diamonds':
if (this.up.play.gamecomms) {
} else {
switch (event) {
case 'start':
this.state = 'start';
var v6 = new Date();
this.seed = this.up.game_seed;
this.game = 'diamonds.puz.3';
this.score_name = 'Puzzle';
this.ranksys = 'add';
if (this.up.play.gamemode == 'endurance') {
this.game = 'diamonds.end.3';
this.score_name = 'Endurance';
this.ranksys = 'max';
}
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.hud.points);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.play.hud.points);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.play.hud.points);
this.moves = 0;
_root.comms.send_score();
this.send_score();
break;
case 'end':
if (this.state == 'won') {
this.state = 'end';
this.set_score_check(this.up.play.hud.points);
this.moves = 0;
this.send_final('high', this.score);
} else {
this.state = 'end';
this.set_score_check(this.up.play.hud.points);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
if (this.score > 50000) {
this.submit_award('bronze');
}
if (this.score > 100000) {
this.submit_award('silver');
}
if (this.score > 200000) {
this.submit_award('gold');
}
}
break;
case 'adventisland':
switch (event) {
case 'start':
this.state = 'start';
var v6 = new Date();
this.seed = this.up.game_seed;
this.game = 'adventisland';
this.score_name = 'Advent';
this.ranksys = 'max';
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.isplay.advent.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.isplay.advent.score);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.isplay.advent.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
break;
case 'end':
if (this.state == 'won') {
this.state = 'end';
this.set_score_check(this.up.isplay.advent.score);
this.moves = 0;
this.send_final('high', this.score);
} else {
this.state = 'end';
this.set_score_check(this.up.isplay.advent.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
}
break;
case 'batwsball':
switch (event) {
case 'start':
this.state = 'start';
var v6 = new Date();
this.seed = this.up.game_seed;
this.game = 'batwsball';
this.score_name = 'Endurance';
this.ranksys = 'max';
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.score = Math.floor((this.up.play.tims + this.up.play.timf / 25) * 100);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'end':
this.state = 'end';
this.score = Math.floor((this.up.play.tims + this.up.play.timf / 25) * 100);
this.moves = 0;
_root.comms.send_score();
this.send_score();
if (this.score > 400) {
this.send_final('high', this.score);
if (this.score > 6000) {
this.submit_award('bronze');
}
if (this.score > 12000) {
this.submit_award('silver');
}
if (this.score > 18000) {
this.submit_award('gold');
}
}
}
break;
case 'gojirama':
switch (event) {
case 'set':
this.game = 'gojirama';
this.score_name = 'Endurance';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
var v6 = new Date();
this.seed = this.up.game_seed;
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'romzom':
switch (event) {
case 'start':
this.state = 'start';
var v6 = new Date();
this.seed = this.up.game_seed;
this.game = 'romzom';
this.score_name = 'RomZom';
this.ranksys = 'max';
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'ASUE1':
switch (event) {
case 'set':
this.game = 'ASUE1';
this.score_name = 'ASUE1';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
this.seed = this.up.game_seed;
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'EsTension':
case 'estension':
switch (event) {
case 'set':
this.game = 'estension';
this.score_name = 'EsTension';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
this.seed = this.up.game_seed;
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'update';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'BowWow':
case 'bowwow':
switch (event) {
case 'set':
this.game = 'bowwow';
this.score_name = 'BowWow';
this.ranksys = 'add';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
this.seed = this.up.game_seed;
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
++this.time;
this.state = 'update';
this.set_score_check(this.up.play.score, this.up.play.get_replay_str(), this.up.play.get_replay_moves());
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'update';
this.set_score_check(this.up.play.score, this.up.play.get_replay_str(), this.up.play.get_replay_moves());
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.play.score, this.up.play.get_replay_str(), this.up.play.get_replay_moves());
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
break;
case 'end':
if (this.state != 'won') {
this.state = 'end';
this.set_score_check(this.up.play.score, this.up.play.get_replay_str(), this.up.play.get_replay_moves());
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
}
break;
case 'WetBasement':
case 'WetBaseMent':
switch (event) {
case 'set':
if (this.up.play.gameskill == 'hard') {
this.game = 'basement.4';
} else {
this.game = 'basement.2';
}
this.score_name = 'Race';
this.ranksys = 'add';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.play.score);
this.moves = 0;
this.total = this.up.play.get_rank_score(this.score);
_root.comms.send_score();
this.send_score();
if (this.up.play.gameskill == 'hard') {
this.send_final('TotalHard', this.total);
} else {
this.send_final('Total', this.total);
}
break;
case 'end':
if (this.state != 'won') {
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
if (this.up.play.gameskill == 'hard') {
this.send_final('TotalHard', this.total);
} else {
this.send_final('Total', this.total);
}
}
}
break;
case 'Mute':
case 'mute':
switch (event) {
case 'set':
this.game = 'mute';
this.score_name = 'Smash';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
break;
case 'end':
if (this.state != 'won') {
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
} else {
this.send_final('high', this.score);
}
}
break;
case 'WetDike':
case 'wetdike':
switch (event) {
case 'set':
this.game = 'wetdike';
this.score_name = 'Puzzle';
this.ranksys = 'add';
this.seed = this.up.dikeplay.seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
this.time = Math.floor(this.up.dikeplay.game_time / 1000);
this.set_score_check(this.up.dikeplay.table.score, this.up.dikeplay.table.create_playback_str());
this.moves = this.up.dikeplay.table.moves;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.dikeplay.table.score, this.up.dikeplay.table.create_playback_str());
this.moves = this.up.dikeplay.table.moves;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.dikeplay.table.score, this.up.dikeplay.table.create_playback_str());
this.moves = this.up.dikeplay.table.moves;
_root.comms.send_score();
this.send_score();
break;
case 'end':
if (this.state != 'won') {
this.state = 'end';
this.set_score_check(this.up.dikeplay.table.score, this.up.dikeplay.table.create_playback_str());
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
} else {
this.send_final('high', this.score);
}
}
break;
case 'WetCell':
case 'wetcell':
switch (event) {
case 'set':
this.game = 'wetcell';
this.score_name = 'Puzzle';
this.ranksys = 'add';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
this.time = Math.floor(this.up.play.game_time / 1000);
this.set_score_check(this.up.play.table.score, this.up.play.table.create_playback_str());
this.moves = this.up.play.table.moves;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.play.table.score, this.up.play.table.create_playback_str());
this.moves = this.up.play.table.moves;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'won':
this.state = 'won';
this.set_score_check(this.up.play.table.score, this.up.play.table.create_playback_str());
this.moves = this.up.play.table.moves;
_root.comms.send_score();
this.send_score();
break;
case 'end':
if (this.state != 'won') {
this.state = 'end';
this.set_score_check(this.up.play.table.score, this.up.play.table.create_playback_str());
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
} else {
this.send_final('high', this.score);
}
}
break;
case 'ASUE2':
case 'asue2':
switch (event) {
case 'set':
this.game = 'ASUE2';
this.score_name = 'ASUE2';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
this.seed = this.up.game_seed;
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'Take1':
case 'take1':
switch (event) {
case 'set':
this.game = 'take1';
this.score_name = 'take1';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
this.seed = this.up.game_seed;
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'PixlCoop':
case 'pixlcoop':
switch (event) {
case 'set':
this.game = 'pixlcoop';
this.score_name = 'pixlcoop';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
break;
case 'start':
this.state = 'start';
this.seed = this.up.game_seed;
var v6 = new Date();
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
break;
case 'update':
this.state = 'update';
++this.time;
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
}
break;
case 'rgbtd0':
switch (event) {
case 'start':
this.state = 'start';
var v6 = new Date();
this.seed = this.up.game_seed;
this.game = 'rgbtd0';
this.score_name = 'rgbtd0';
this.ranksys = 'add';
this.start_time = v6.getTime();
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
_root.comms.datas = this;
_root.comms.send_score();
this.send_score();
this.send_start();
break;
case 'update':
this.state = 'update';
++this.time;
this.set_score_check(this.up.play.score, this.up.play.replay);
this.moves = 0;
_root.comms.send_score_wait_and_check();
this.send_score_wait_and_check();
break;
case 'high':
this.state = 'high';
this.set_score_check(this.up.play.score, this.up.play.replay);
this.moves = 0;
_root.comms.send_score_check();
this.send_score_check();
break;
case 'final':
this.send_final('high', this.up.play.score_total);
break;
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score, this.up.play.replay);
this.moves = 0;
_root.comms.send_score();
this.send_score();
break;
case 'award-bronze':
this.submit_award('bronze');
break;
case 'award-silver':
this.submit_award('silver');
break;
case 'award-gold':
this.submit_award('gold');
}
break;
case 'pief':
switch (event) {
case 'set':
this.game = 'pief';
this.score_name = 'pief';
this.ranksys = 'max';
this.seed = this.up.game_seed;
_root.comms.datas = this;
this.time = 0;
this.score = 0;
this.moves = 0;
this.replay_str = '';
break;
case 'won':
case 'end':
this.state = 'end';
this.set_score_check(this.up.play.score);
this.moves = 0;
_root.comms.send_score();
this.send_score();
this.send_final('high', this.score);
if (this.score == 100) {
this.submit_award('moonstar');
}
}
}
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20490 __Packages.GizmoList {
#initclip
if (!GizmoList) {
_global.GizmoList = function (_up) {
this.up = _up;
this.setup();
};
var v1 = _global.GizmoList.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 778;
for (;;) {
++v2;
label 778:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 973;
for (;;) {
++v2;
label 973:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.GizmoList.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = GizmoList.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1345;
for (;;) {
++v3;
label 1345:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.setup = function () {
this.setup_base();
this.tf_fmt = gfx.create_text_format(16, 16777215);
this.lp = 0;
this.lh = 20;
this.xp = 0;
this.yp = 0;
this.base_alpha = 50;
this.selected = -1;
this.items = new Array();
this.lines = new Array();
};
v1.clean = function () {
this.clean_base();
};
v1.update = function () {
this.lc = Math.floor((this.h + this.lh - 1) / this.lh) + 1;
if (this.lc != this.lines.length) {
var v2 = 0;
goto 2073;
for (;;) {
++v2;
label 2073:
if (v2 >= this.lc) break;
var v3 = this.child(new GizmoLine(this));
v3.base_alpha = this.base_alpha;
v3.set_area(0, v2 * this.lh, this.w, this.lh);
v3.str = '';
v3.tf_fmt.size = this.tf_fmt.size;
v3.tf_fmt.color = this.tf_fmt.color;
this.lines[v2] = v3;
}
this.draw_mask(0, 0);
}
var v6 = this.items.length * this.lh - this.h;
if (this.vgizmo) {
if (v6 > 0) {
this.yp = Math.floor(this.vgizmo.y_knob * v6);
} else {
this.yp = 0;
}
}
this.lp = Math.floor(this.yp / this.lh);
v2 = this.lp;
goto 2481;
for (;;) {
++v2;
label 2481:
if (v2 >= this.lp + this.lc) break;
var v4 = this.lines[v2 - this.lp];
if (v2 < 0 || v2 >= this.items.length) {
v4.str = '';
v4.item = -1;
v4.state = '';
} else {
var v5 = this.items[v2];
v4.str = v5.str;
v4.item = v2;
v4.state = '';
if (v2 == this.selected) {
v4.state = 'selected';
}
}
v4.set_area(0, v2 * this.lh - this.yp, this.w, this.lh);
}
this.update_base();
};
v1.input = function (snapshot) {
this.input_base(snapshot);
return this.top.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20491 __Packages.alt.Sprintf {
#initclip
if (!alt.Sprintf) {
if (!alt) {
_global.alt = new Object();
}
_global.alt.Sprintf = function () {};
var v1 = _global.alt.Sprintf.prototype;
_global.alt.Sprintf.trace = function () {
alt.Sprintf.trace(alt.Sprintf.format.apply(null, arguments));
};
_global.alt.Sprintf.format = function (format) {
if (super == null) {
return '';
}
var v3 = '';
var v4 = 0;
var v5 = 0;
while (v5 < super.length) {
var v6 = super.indexOf('%', v5);
if (v6 == -1) {
v3 += super.substr(v5);
v5 = super.length;
} else {
v3 += super.substring(v5, v6);
var v14 = '** sprintf: invalid format at ' + v4 + ' **';
var v13 = false;
var v12 = 0;
var v11 = v12;
var v9 = v11;
var v10 = -1;
v5 = v6 + 1;
var v8 = arguments[++v4];
for (;;) {
if (!(v13 != true && v5 < super.length)) break;
var v7 = super.charAt(v5++);
switch (v7) {
case '#':
if (v12 == 0) {
v11 |= alt.Sprintf.kALT_FORM;
} else {
v14 = '** sprintf: "#" came too late **';
}
break;
case '-':
if (v12 == 0) {
v11 |= alt.Sprintf.kLEFT_ALIGN;
} else {
v14 = '** sprintf: "-" came too late **';
}
break;
case '+':
if (v12 == 0) {
v11 |= alt.Sprintf.kSHOW_SIGN;
} else {
v14 = '** sprintf: "+" came too late **';
}
break;
case ' ':
if (v12 == 0) {
v11 |= alt.Sprintf.kPAD_POS;
} else {
v14 = '** sprintf: " " came too late **';
}
break;
case '.':
if (v12 < 2) {
v12 = 2;
v10 = 0;
} else {
v14 = '** sprintf: "." came too late **';
}
break;
case '0':
if (v12 == 0) {
v11 |= alt.Sprintf.kPAD_ZEROES;
} else {
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
if (v12 == 3) {
v14 = '** sprintf: shouldn\'t have a digit after h,l,L **';
} else {
if (v12 < 2) {
v12 = 1;
v9 = v9 * 10 + Number(v7);
} else {
v10 = v10 * 10 + Number(v7);
}
}
break;
case 'd':
case 'i':
v13 = true;
v3 += alt.Sprintf.formatD(Number(v8), v11, v9, v10);
break;
case 'o':
v13 = true;
v3 += alt.Sprintf.formatO(Number(v8), v11, v9, v10);
break;
case 'x':
case 'X':
v13 = true;
v3 += alt.Sprintf.formatX(Number(v8), v11, v9, v10, v7 == 'X');
break;
case 'e':
case 'E':
v13 = true;
v3 += alt.Sprintf.formatE(Number(v8), v11, v9, v10, v7 == 'E');
break;
case 'f':
v13 = true;
v3 += alt.Sprintf.formatF(Number(v8), v11, v9, v10);
break;
case 'g':
case 'G':
v13 = true;
v3 += alt.Sprintf.formatG(Number(v8), v11, v9, v10, v7 == 'G');
break;
case 'c':
case 'C':
v10 = 1;
case 's':
case 'S':
v13 = true;
v3 += alt.Sprintf.formatS(String(v8), v11, v9, v10);
break;
case '%':
v13 = true;
v3 += '%';
--v4;
break;
default:
v14 = '** sprintf: ' + v7 + ' not supported **';
continue;
}
}
}
if (v13 != true) {
if (alt.Sprintf.DEBUG) {
v3 += v14;
}
if (alt.Sprintf.TRACE) {
alt.Sprintf.trace(v14);
}
}
}
}
return v3;
};
_global.alt.Sprintf.finish = function (output, value, properties, length, precision, prefix) {
if (prefix == null) {
prefix = '';
}
if (value < 0) {
prefix = '-' + prefix;
} else {
if (properties & alt.Sprintf.kSHOW_SIGN) {
prefix = '+' + prefix;
} else {
if (properties & alt.Sprintf.kPAD_POS) {
prefix = ' ' + prefix;
}
}
}
if (length == 0 && precision > -1) {
length = precision;
properties |= alt.Sprintf.kPAD_ZEROES;
}
while (output.length + prefix.length < length) {
if (properties & alt.Sprintf.kLEFT_ALIGN) {
output += ' ';
} else {
if (properties & alt.Sprintf.kPAD_ZEROES) {
output = '0' + output;
} else {
prefix = ' ' + prefix;
}
}
}
return prefix + output;
};
_global.alt.Sprintf.formatD = function (value, properties, length, precision) {
var v6 = '';
if (precision != 0 || value != 0) {
v6 = String(Math.floor(Math.abs(value)));
}
while (v6.length < precision) {
v6 = '0' + v6;
}
return alt.Sprintf.finish(v6, value, properties, length, precision);
};
_global.alt.Sprintf.formatO = function (value, properties, length, precision) {
var v6 = '';
var v7 = '';
if (precision != 0 && value != 0) {
v6 = value.toString(8);
}
if (properties & alt.Sprintf.kALT_FORM) {
v7 = '0';
}
while (v6.length < precision) {
v6 = '0' + v6;
}
return alt.Sprintf.finish(v6, value, properties, length, precision, v7);
};
_global.alt.Sprintf.formatX = function (value, properties, length, precision, upper) {
var v7 = '';
var v8 = '';
if (precision != 0 && value != 0) {
v7 = value.toString(16);
}
if (properties & alt.Sprintf.kALT_FORM) {
v8 = '0x';
}
while (v7.length < precision) {
v7 = '0' + v7;
}
if (upper) {
v8 = v8.toUpperCase();
v7 = v7.toUpperCase();
return alt.Sprintf.finish(v7, value, properties, length, precision, v8);
}
v7 = v7.toLowerCase();
return alt.Sprintf.finish(v7, value, properties, length, precision, v8);
};
_global.alt.Sprintf.formatE = function (value, properties, length, precision, upper) {
var v7 = '';
var v8 = 0;
if (Math.abs(value) > 1) {
while (Math.abs(value) > 10) {
value /= 10;
++v8;
}
} else {
while (Math.abs(value) < 1) {
value *= 10;
--v8;
}
}
var v9 = alt.Sprintf.format('%c%+.2d', upper ? 'E' : 'e', v8);
if (properties & alt.Sprintf.kLEFT_ALIGN) {
v7 = alt.Sprintf.formatF(value, properties, 1, precision) + v9;
while (v7.length < length) {
v7 += ' ';
}
return v7;
}
v7 = alt.Sprintf.formatF(value, properties, Math.max(length - v9.length, 0), precision) + v9;
return v7;
};
_global.alt.Sprintf.formatF = function (value, properties, length, precision) {
var v6 = '';
var v7 = '';
var v8 = '';
if (precision == -1) {
precision = 6;
}
var v9 = new String(value.toString());
if (v9.indexOf('.') == -1) {
v7 = (Math.abs(Number(v9))).toString();
v8 = '0';
} else {
v7 = (Math.abs(Number(v9.substring(0, v9.indexOf('.'))))).toString();
v8 = v9.substr(v9.indexOf('.') + 1);
}
if (Number(v8) == 0) {
v8 = new String();
while (v8.length < precision) {
v8 += '0';
}
} else {
if (v8.length > precision) {
var v10 = Math.round(Math.pow(10, precision) * Number('0.' + v8));
if ((String(v10)).length > precision && v10 != 0) {
v8 = '0';
v7 = ((Math.abs(Number(v7)) + 1) * (Number(v7) >= 0 ? 1 : -1)).toString();
} else {
v8 = new String(v10.toString());
}
}
if (v8.length < precision) {
v8 = new String(v8);
while (v8.length < precision) {
v8 += '0';
}
}
}
if (precision == 0) {
v6 = v7;
if (properties & alt.Sprintf.kALT_FORM) {
v6 += '.';
}
return alt.Sprintf.finish(v6, value, properties, length, precision, '');
}
v6 = v7 + '.' + v8;
return alt.Sprintf.finish(v6, value, properties, length, precision, '');
};
_global.alt.Sprintf.formatG = function (value, properties, length, precision, upper) {
var v7 = alt.Sprintf.formatE(value, properties, 1, precision, upper);
var v8 = alt.Sprintf.formatF(value, properties, 1, precision);
if (v7.length < v8.length) {
return alt.Sprintf.formatE(value, properties, length, precision, upper);
} else {
return alt.Sprintf.formatF(value, properties, length, precision);
}
};
_global.alt.Sprintf.formatS = function (value, properties, length, precision) {
var v6 = new String(value);
if (precision > 0 && precision < v6.length) {
v6 = v6.substring(0, precision);
}
properties &= (alt.Sprintf.kPAD_ZEROES | alt.Sprintf.kSHOW_SIGN | alt.Sprintf.kPAD_POS | alt.Sprintf.kALT_FORM) ^ -1;
return alt.Sprintf.finish(v6, value, properties, length, precision, '');
};
ASSetPropFlags(v1, null, 1);
_global.alt.Sprintf.kPAD_ZEROES = 1;
_global.alt.Sprintf.kLEFT_ALIGN = 2;
_global.alt.Sprintf.kSHOW_SIGN = 4;
_global.alt.Sprintf.kPAD_POS = 8;
_global.alt.Sprintf.kALT_FORM = 16;
_global.alt.Sprintf.kLONG_VALUE = 32;
_global.alt.Sprintf.kUSE_SEPARATOR = 64;
_global.alt.Sprintf.DEBUG = false;
_global.alt.Sprintf.TRACE = false;
}
#endinitclip
}
movieClip 20492 __Packages.GizmoLine {
#initclip
if (!GizmoLine) {
_global.GizmoLine = function (_up) {
this.up = _up;
this.setup();
this.str = '';
this.str_disp = '';
this.state = '';
this.state_disp = '';
this.xp = 0;
this.yp = 0;
this.xs = 0;
this.ys = 0;
this.base_alpha = 100;
};
var v1 = _global.GizmoLine.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 981;
for (;;) {
++v2;
label 981:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 1176;
for (;;) {
++v2;
label 1176:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.GizmoLine.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = GizmoLine.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1548;
for (;;) {
++v3;
label 1548:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.setup = function () {
this.setup_base();
this.mc.cacheAsBitmap = true;
this.tf = gfx.create_text_html(this.mc, null, 0, 0, 0, 0);
this.tf.multiline = false;
this.tf_fmt = gfx.create_text_format(16, 16777215);
this.tf.setNewTextFormat(this.tf_fmt);
};
v1.clean = function () {
this.clean_base();
};
v1.update = function () {
if (this.str != this.str_disp || this.state != this.state_disp) {
if (this.state == 'selected') {
this.tf_fmt.bold = true;
} else {
this.tf_fmt.bold = false;
}
var v2 = this.tf_fmt.getTextExtent(this.str);
this.xs = v2.width;
this.ys = v2.height;
this.tf._width = this.xs + 100;
this.tf._height = this.ys + 8;
this.tf.setNewTextFormat(this.tf_fmt);
this.tf.text = this.str;
this.str_disp = this.str;
this.state_disp = this.state;
}
if (this.tf.textWidth + 4 > this.w) {
} else {}
this.tf._y = this.yp;
this.mc._alpha -= 5;
if (this.mc._alpha < this.base_alpha) {
this.mc._alpha = this.base_alpha;
}
this.update_base();
};
v1.input = function (snapshot) {
if (this.top.focus == null && (snapshot.x > 0 && (snapshot.y > 0 && (snapshot.x < this.w && snapshot.y < this.h)))) {
this.mc._alpha = 100;
this.up.hover = this;
if (snapshot.key_on & 1) {
if (this.onClick) {
this.onClick(this);
this.input_base(snapshot);
return this.top.focus;
}
if (this.up.onClick) {
this.up.onClick(this);
}
}
}
this.input_base(snapshot);
return this.top.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20493 __Packages.Scalar {
#initclip
if (!Scalar) {
_global.Scalar = function (_ox, _oy, _fake, _chatshrink) {
this.fake = _fake;
this.chatshrink = _chatshrink;
this.ox = _ox;
this.oy = _oy;
this.mc = gfx.create_clip(_root, null);
this.mc.onEnterFrame = this.delegate(this.update);
this.tf_stats = gfx.create_text_html(this.mc, null, 0, 0, this.ox, 32);
gfx.dropshadow(this.tf_stats, 2, 45, 0, 1, 4, 4, 2, 3);
this.scale = 1;
if (this.scale > _root.maxs) {
this.scale = _root.maxs;
}
this.update();
Key.addListener(this);
this.t_old = getTimer();
this.t_new = this.t_old;
this.t_ms = 0;
this.t_samples = 0;
if (this.fake) {
this.dx = 0;
this.dy = 0;
this.sx = this.ox;
this.sy = this.oy;
this.rot = 0;
this.ox = this.bx;
this.oy = this.by;
return undefined;
}
};
var v1 = _global.Scalar.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.update = function () {
if (this.fake) {
return undefined;
}
Stage.scaleMode = 'noScale';
Stage.align = 'TL';
this.rot = 0;
if (_root.scale == 'fixed') {
var v2 = 1;
} else {
var v2 = Stage.width / this.ox;
if (_root.maxw) {
if (v2 * this.ox > _root.maxw) {
v2 = _root.maxw / this.ox;
}
}
if (_root.maxh) {
if (v2 * this.oy > _root.maxh) {
v2 = _root.maxh / this.oy;
}
}
if (v2 * this.oy > Stage.height) {
v2 = Stage.height / this.oy;
}
}
v2 *= this.scale;
this.dx = Math.floor((Stage.width - v2 * this.ox) / 2);
this.dy = Math.floor((Stage.height - v2 * this.oy) / 2);
this.need_chat_pop = false;
if (this.dx < 0) {
this.dx = 0;
this.need_chat_pop = true;
}
if (this.dy < 0) {
this.dy = 0;
}
this.vx = Math.floor(this.ox * v2);
this.vy = Math.floor(this.oy * v2);
this.sx = v2 * 100;
this.sy = v2 * 100;
++this.t_samples;
if (this.t_samples >= 20) {
this.t_old = this.t_new;
this.t_new = getTimer();
this.t_ms = (this.t_new - this.t_old) / this.t_samples;
this.t_fps = Math.floor(1000 / this.t_ms);
if (this.dy >= 16) {
var v3 = ' ' + Math.floor(this.t_ms) + 'ms : ' + Math.floor(1000 / this.t_ms) + 'fps' + ' : ' + Math.floor(_root.code_time / this.t_samples) + 'ms';
gfx.set_text_html(this.tf_stats, 13, 16777215, v3);
}
this.t_samples = 0;
_root.code_time = 0;
}
if (this.dy >= 16) {
this.tf_stats._visible = true;
} else {
this.tf_stats._visible = false;
}
};
v1.apply = function (tomc, half) {
if (_root.scale == 'no') {
tomc._rotation = this.rot;
tomc._x = 0;
tomc._y = 0;
tomc._xscale = 100;
tomc._yscale = 100;
return undefined;
}
if (half) {
tomc._rotation = this.rot;
tomc._x = Math.floor(this.dx / 2);
tomc._y = Math.floor(this.dy / 2 + Stage.height / 4);
tomc._xscale = Math.floor(this.sx / 2);
tomc._yscale = Math.floor(this.sy / 2);
} else {
tomc._rotation = this.rot;
tomc._x = this.dx;
tomc._y = this.dy;
tomc._xscale = this.sx;
tomc._yscale = this.sy;
}
};
v1.onKeyDown = function () {};
v1.onKeyUp = function () {
var v3 = Key.getCode();
var v2 = String.fromCharCode(Key.getAscii());
if (Selection.getCaretIndex() == -1) {
if (v2 == '+' || v2 == '=') {
this.scale *= 1.1;
if (this.scale > 1) {
this.scale = 1;
}
} else {
if (v2 == '_' || v2 == '-') {
this.scale /= 1.1;
if (this.scale < 0.1) {
this.scale = 0.1;
}
}
}
}
if (this.scale > _root.maxs) {
this.scale = _root.maxs;
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20494 __Packages.GizmoText {
#initclip
if (!GizmoText) {
_global.GizmoText = function (_up) {
this.up = _up;
this.setup();
};
var v1 = _global.GizmoText.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 829;
for (;;) {
++v2;
label 829:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 1024;
for (;;) {
++v2;
label 1024:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.GizmoText.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = GizmoText.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1396;
for (;;) {
++v3;
label 1396:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.setup = function () {
this.setup_base();
this.mc.cacheAsBitmap = true;
this.fntsiz = 16;
this.fntcol = 16777215;
this.tf_fmt = gfx.create_text_format(this.fntsiz, this.fntcol);
this.tf = null;
};
v1.clean = function () {
this.clean_base();
};
v1.clear_tf = function () {
this.tf.removeTextField();
this.tf = null;
this.tf.cachestr = '';
};
v1.update = function () {
if (this.tf == null) {
this.tf = gfx.create_text_html(this.mc, null, 0, 0, this.w, this.h);
this.tf.setNewTextFormat(this.tf_fmt);
}
if (this.tf.cachestr != this.str) {
this.tf.cachestr = this.str;
gfx.set_text_html(this.tf, this.fntsiz, this.fntcol, this.str);
}
if (this.vgizmo) {
var v2 = Math.floor(this.tf.maxscroll * this.vgizmo.y_knob);
if (v2 < 1) {
v2 = 1;
}
if (v2 != this.tf.scroll) {
this.tf.scroll = v2;
}
}
this.update_base();
};
v1.input = function (snapshot) {
this.input_base(snapshot);
return this.top.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20495 __Packages.WetPlayMP3 {
#initclip
if (!WetPlayMP3) {
_global.WetPlayMP3 = function (_up) {
this.rnd_seed((new Date()).getTime());
this.up = _up;
this.mc = gfx.create_clip(this.up.mc, null);
this.setmenu(this.mc);
this.sfxs = new Array();
var v3 = 0;
goto 3997;
for (;;) {
++v3;
label 3997:
if (v3 >= 4) break;
this.sfxs[v3] = gfx.create_clip(this.up.mc, null);
this.sfxs[v3].sfx = new Sound(this.sfxs[v3]);
this.sfxs[v3].sfx.onSoundComplete = this.delegate(this.onSoundComplete, v3);
this.sfxs[v3].sfx.complete = true;
}
this.sfxidx = 0;
this.mc_back = gfx.create_clip(this.mc, null);
if (_root.wp_jpg != undefined && _root.wp_jpg != '') {
this.load_back_image(_root.wp_jpg);
} else {
this.mc_back_image = gfx.add_clip(this.mc, 'WetPlayBack', null);
}
this.mc_back_colour = gfx.create_clip(this.mc, null);
this.mc_back_image.onRelease = this.delegate(this.catchclicks);
this.mc_back_colour.onRelease = this.delegate(this.catchclicks);
if (_root.wp_w != undefined && _root.wp_w != '') {
this.w = int(_root.wp_w);
} else {
this.w = 380;
}
if (_root.wp_h != undefined && _root.wp_h != '') {
this.h = int(_root.wp_h);
} else {
this.h = 200;
}
if (_root.wp_x != undefined && _root.wp_x != '') {
this.mc._x = int(_root.wp_x);
} else {
this.mc._x = 10;
}
if (_root.wp_y != undefined && _root.wp_y != '') {
this.mc._y = int(_root.wp_y);
} else {
this.mc._y = 10;
}
if (_root.wp_s != undefined && _root.wp_s != '') {
this.row_size = int(_root.wp_s);
} else {
this.row_size = 20;
}
this.x = this.mc._x;
this.y = this.mc._y;
this.mc_back_image._x = -this.mc._x;
this.mc_back_image._y = -this.mc._y;
if (_root.wp_fore != undefined && _root.wp_fore != '') {
this.foreground = int(_root.wp_fore) & 16777215;
} else {
this.foreground = 16777215;
}
if (_root.wp_jpg == undefined) {
if (_root.wp_back == undefined || _root.wp_back == '') {
_root.wp_back = 1073741952;
}
}
if (_root.wp_back_alpha != undefined && _root.wp_back_alpha != '') {
_root.wp_back = (_root.wp_back_alpha * 255 / 100 & 255) << 24 | _root.wp_back & 16777215;
}
this.do_tint();
this.xspf = new XML();
this.xspf.ignoreWhite = true;
this.xspf.onLoad = null;
this.mcs1 = gfx.create_clip(this.mc, null);
this.sfx = new Sound(this.mcs1);
this.mcs2 = gfx.create_clip(this.mc, null);
this.sfx_next = new Sound(this.mcs2);
this.sfx_master = new Sound();
};
var v1 = _global.WetPlayMP3.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.CheckSFX = function (nam, chan) {
var v4 = this.sfxs[chan % 4].sfx;
if (nam) {
if (v4.nam != nam) {
return true;
}
}
return v4.complete;
};
v1.PlaySFX = function (nam, chan, loops, vol) {
if (this.sfx_on == 0) {
return undefined;
}
if (chan != undefined && chan != null) {
var v6 = this.sfxs[chan % 4].sfx;
} else {
var v6 = this.sfxs[this.sfxidx].sfx;
this.sfxidx = (this.sfxidx + 1) % 4;
}
if (nam == null) {
if (vol == undefined) {
v6.stop();
v6.complete = true;
} else {
v6.setVolume(vol * 100);
}
return v6;
}
v6.nam = nam;
v6.stop();
v6.attachSound(nam);
if (loops) {
v6.start(0, loops);
v6.complete = false;
} else {
v6.start();
v6.complete = false;
}
if (vol == undefined) {
v6.setVolume(100);
return v6;
}
v6.setVolume(vol * 100);
return v6;
};
v1.catchclicks = function () {};
v1.onSoundComplete = function (i) {
this.sfxs[i].sfx.complete = true;
};
v1.setup = function () {
var v2 = _root.cacheAsBitmap;
this.so_load();
_root.cacheAsBitmap = false;
var v7 = this.row_size;
var v8 = Math.floor(this.w / v7);
var v9 = Math.floor(this.h / v7);
if (v9 >= 2) {
var v10 = 1;
} else {
var v10 = 0;
}
this.sfx_load_stall_counter = 0;
this.image_url = '';
this.mc_image = gfx.create_clip(this.mc, null);
gfx.clear(this.mc_image);
this.mc_image._alpha = 25;
this.gizmo = new GizmoMaster(this);
this.gizmo.top = this.gizmo;
var v4 = this.gizmo;
v4.set_area(0, 0, this.w, this.h);
var v5 = this.gizmo;
var v11 = 0;
if (v8 >= 4) {
v4 = v5.child(new GizmoButt(v5));
v4.set_area(v7 * v11, v7 * v10, v7, v7);
var v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_backward(v6, 0, 0, v7, v7);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_backward(v6, 0, 0, v7, v7);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_backward(v6, v7 * 0.1, v7 * 0.1, v7 * 0.8, v7 * 0.8);
v4.mc_down = v6;
v4.id = 'backward';
v4.onClick = this.delegate(this.onClick, v4);
this.gizmo_backward = v4;
++v11;
}
v4 = v5.child(new GizmoButt(v5));
v4.set_area(v7 * v11, v7 * v10, v7, v7);
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_play(v6, 0, 0, v7, v7);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_play(v6, 0, 0, v7, v7);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_play(v6, v7 * 0.1, v7 * 0.1, v7 * 0.8, v7 * 0.8);
v4.mc_down = v6;
v4.id = 'play';
v4.onClick = this.delegate(this.onClick, v4);
this.gizmo_play = v4;
v4 = v5.child(new GizmoButt(v5));
v4.set_area(v7 * v11, v7 * v10, v7, v7);
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_pause(v6, 0, 0, v7, v7);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_pause(v6, 0, 0, v7, v7);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_pause(v6, v7 * 0.1, v7 * 0.1, v7 * 0.8, v7 * 0.8);
v4.mc_down = v6;
v4.id = 'pause';
v4.onClick = this.delegate(this.onClick, v4);
this.gizmo_pause = v4;
++v11;
if (v8 >= 3) {
v5 = this.gizmo;
v4 = v5.child(new GizmoButt(v5));
v4.set_area(v7 * v11, v7 * v10, v7, v7);
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_forward(v6, 0, 0, v7, v7);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_forward(v6, 0, 0, v7, v7);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_forward(v6, v7 * 0.1, v7 * 0.1, v7 * 0.8, v7 * 0.8);
v4.mc_down = v6;
v4.id = 'forward';
v4.onClick = this.delegate(this.onClick, v4);
this.gizmo_forward = v4;
++v11;
}
if (v8 >= 5) {
v5 = this.gizmo;
v4 = v5.child(new Gizmo(v5));
v4.set_area(v7 * v11, v7 * v10, this.w - v7 * (v11 + 1), v7);
v4.mc.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_boxen(v4.mc, 0, 0, this.w - v7 * 4, v7);
this.gizmo_position = v4;
v5 = v4;
v4 = v5.child(new GizmoKnob(v5));
if (v8 > 5) {
v4.set_area(0, 0, v7, v7);
} else {
v4.set_area(0, 0, v7 / 2, v7);
}
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_puck(v6, 0, 0, v4.w, v7);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_puck(v6, 0, 0, v4.w, v7);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_puck(v6, 0, 0, v4.w, v7);
v4.mc_down = v6;
v4.id = 'position_knob';
v4.onClick = this.delegate(this.onClick, v4);
this.gizmo_position_knob = v4;
}
v5 = this.gizmo;
v4 = v5.child(new Gizmo(v5));
if (v9 >= 2) {
v4.set_area(this.w - v7 * 1, 0, v7, v7 * 2);
} else {
v4.set_area(this.w - v7 * 1, 0, v7, v7 * 1);
}
v4.mc.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
gfx.draw_box(v4.mc, undefined, v7 * 7 / 16, v7 * 1 / 16, v7 * 2 / 16, v4.h - v7 * 2 / 16);
this.gizmo_volume = v4;
v5 = v4;
v4 = v5.child(new GizmoKnob(v5));
v4.set_area(0, 0, v7, v7 * 10 / 16);
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
gfx.draw_box(v6, undefined, v7 * 3 / 16, v7 * 3 / 16, v7 * 10 / 16, v4.h - v7 * 6 / 16);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
gfx.draw_box(v6, undefined, v7 * 3 / 16, v7 * 3 / 16, v7 * 10 / 16, v4.h - v7 * 6 / 16);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
gfx.draw_box(v6, undefined, v7 * 3 / 16, v7 * 3 / 16, v7 * 10 / 16, v4.h - v7 * 6 / 16);
v4.mc_down = v6;
this.gizmo_volume_knob = v4;
if (v8 == 1) {
this.gizmo_volume.active = false;
}
if (v9 > 2) {
v5 = this.gizmo;
v4 = v5.child(new Gizmo(v5));
v4.set_area(this.w - v7 * 1, v7 * 2, v7, this.h - v7 * 2);
v4.mc.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_boxen(v4.mc, 0, 0, v4.w, v4.h);
this.gizmo_scroll = v4;
v5 = v4;
v4 = v5.child(new GizmoKnob(v5));
v4.set_area(0, 0, v7, v7);
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_puck(v6, 0, 0, v7, v7);
v4.mc_base = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_puck(v6, 0, 0, v7, v7);
v4.mc_over = v6;
v6 = gfx.create_clip(v4.mc, null, 0, 0, 100, 100);
v6.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_puck(v6, 0, 0, v7, v7);
v4.mc_down = v6;
this.gizmo_scroll_knob = v4;
}
if (v9 >= 2) {
v5 = this.gizmo;
v4 = v5.child(new GizmoLine(v5));
v4.set_area(v7 * 0, v7 * 0, this.w - v7, v7);
v4.tf_fmt.size = v7 - 4;
v4.tf_fmt.color = -16777216 + this.foreground;
v4.str = '';
v4.draw_mask();
this.gizmo_title = v4;
}
if (v9 > 2) {
v5 = this.gizmo;
v4 = v5.child(new GizmoList(v5));
v4.set_area(v7 * 0, v7 * 2, this.w - v7, this.h - v7 * 2);
v5 = v4;
v4 = v5.child(new GizmoList(v5));
v4.set_area(0, 0, v5.w - v7, v5.h);
v4.lh = v7;
v4.tf_fmt.size = v7 - 6;
v4.tf_fmt.color = -16777216 + this.foreground;
v4.base_alpha = 50;
v4.vgizmo = this.gizmo_scroll_knob;
this.gizmo_list1 = v4;
v4 = v5.child(new GizmoList(v5));
v4.set_area(v5.w - v7, 0, v7, v5.h);
v4.lh = v7;
v4.tf_fmt.size = v7 - 6;
v4.tf_fmt.color = -16777216 + this.foreground;
v4.base_alpha = 30;
v4.vgizmo = this.gizmo_scroll_knob;
this.gizmo_list2 = v4;
}
this.gizmo_play.active = true;
this.gizmo_pause.active = false;
this.xspfs = new Array();
if (_root.wp_mp3 != undefined && _root.wp_mp3 != '') {
this.xspfs[0] = {'url': 'MP3', 'str': _root.wp_mp3};
} else {
if (_root.wp_xspf != undefined && _root.wp_xspf != '') {
this.xspfs[0] = {'url': _root.wp_xspf, 'str': _root.wp_xspf};
}
}
if (!_root.kidsafe) {
this.xspfs.push({'url': 'http://swf.wetgenes.com/swf/WetDike.xspf', 'str': 'WetDike ProjectOpus Playlist'});
this.xspfs.push({'url': 'http://swf.wetgenes.com/swf/hourofslack.php', 'str': 'Listen to a recent hour of slack.'});
}
var v3 = 0;
goto 13464;
for (;;) {
++v3;
label 13464:
if (v3 >= this.xspfs.length) break;
var v12 = this.xspfs[v3].str.split('/');
if (v12.length > 1) {
if (v12[v12.length - 1] == '') {
this.xspfs[v3].str = v12[v12.length - 2];
} else {
this.xspfs[v3].str = v12[v12.length - 1];
}
}
}
this.xspfs[this.xspfs.length] = {'url': '', 'str': 'Options'};
this.force = 0;
if (_root.wp_force != undefined && _root.wp_force != '') {
this.force = int(_root.wp_force) ? 1 : 0;
}
this.auto = 0;
if (this.so.data.auto != undefined && !this.force) {
this.auto = int(this.so.data.auto) ? 1 : 0;
} else {
if (_root.wp_auto != undefined && _root.wp_auto != '') {
this.auto = int(_root.wp_auto) ? 1 : 0;
}
}
this.shuffle = 0;
if (_root.wp_shuffle != undefined && _root.wp_shuffle != '') {
this.shuffle = int(_root.wp_shuffle) ? 1 : 0;
}
this.loop = 1;
if (_root.wp_loop != undefined && _root.wp_loop != '') {
this.loop = int(_root.wp_loop) ? 1 : 0;
}
this.sfx_on = 1;
if (_root.wp_sfx != undefined && _root.wp_sfx != '') {
this.sfx_on = int(_root.wp_loop) ? 1 : 0;
}
this.show_xspfs();
this.got_creator = 1;
this.track_id = -1;
this.xspf_id = -1;
this.gizmo_title.str = 'Select a playlist to play.';
if (this.so.data.vol != undefined && !this.force) {
var v13 = this.so.data.vol / 100;
if (v13 <= 0) {
v13 = 0;
this.auto = 0;
}
if (v13 > 1) {
v13 = 1;
}
this.gizmo_volume_knob.set_knob(0, 1.0 - v13);
} else {
if (_root.wp_vol != undefined) {
var v14 = _root.wp_vol / 100;
if (v14 <= 0) {
v14 = 0;
this.auto = 0;
}
if (v14 > 1) {
v14 = 1;
}
this.gizmo_volume_knob.set_knob(0, 1.0 - v14);
} else {
this.gizmo_volume_knob.set_knob(0, 1.0 - 0.5);
}
}
if (this.auto) {
this.xspf_id = 0;
this.load_xml(this.xspfs[0].url);
this.state = 'pause';
} else {
if (this.xspfs.length == 2) {
this.xspf_id = 0;
this.load_xml(this.xspfs[0].url);
this.state = 'pause';
}
}
this.options = new Array();
var v15 = this.options;
v15.push({'str': '.. (click to go back)'});
v15.push({'str': 'This is WetPlay 1.11 : www.WetGenes.com', 'url': 'http://www.WetGenes.com'});
v15.push({'str': '(c) Kriss Daniels 2007 : XIXs.com', 'url': 'http://XIXs.com'});
v15.push({'str': 'Powered by project opus / XSPF : ProjectOpus.com', 'url': 'http://www.projectopus.com'});
v15.push({'opt': 'shuffle'});
v15.push({'opt': 'autoplay'});
v15.push({'opt': 'repeat'});
v15.push({'opt': 'sfx'});
_root.cacheAsBitmap = v2;
this.throbe = 0;
};
v1.premenu = function (obj, cm) {
var v4 = true;
var v5 = this.gizmo_list1.hover;
if (v5.item > 0) {
v5 = this.tracks[v5.item];
} else {
v5 = null;
}
if (this.view == 'tracks' && v5) {
v4 = true;
} else {
v4 = false;
}
if (v4 == false) {
cm.customItems[0].enabled = false;
cm.customItems[0].caption = 'Download MP3';
cm.customItems[1].enabled = false;
cm.customItems[1].caption = 'Remember MP3';
} else {
this.menu_mp3_name = '' + v5.title;
this.menu_mp3_link = '' + v5.location;
cm.customItems[0].enabled = true;
cm.customItems[0].caption = 'Download ' + this.menu_mp3_name;
cm.customItems[1].enabled = false;
cm.customItems[1].caption = 'Remember ' + this.menu_mp3_name;
}
};
v1.setmenu = function (mc) {
var v3 = new ContextMenu(this.delegate(this.premenu));
v3.hideBuiltInItems();
var v5 = this.delegate(this.menu_download);
var v4 = new ContextMenuItem('Download this MP3', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_remember);
v4 = new ContextMenuItem('Remember this MP3', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_do, 'pp');
v4 = new ContextMenuItem('Play / Pause', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_do, 'forward');
v4 = new ContextMenuItem('Next Track', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_do, 'backward');
v4 = new ContextMenuItem('Previous Track / Rewind', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_vol, 100);
v4 = new ContextMenuItem('Set Volume to 100%', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_vol, 75);
v4 = new ContextMenuItem('Set Volume to 75%', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_vol, 50);
v4 = new ContextMenuItem('Set Volume to 50%', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_vol, 25);
v4 = new ContextMenuItem('Set Volume to 25%', v5);
v3.customItems.push(v4);
v5 = this.delegate(this.menu_vol, 0);
v4 = new ContextMenuItem('Set Volume to 0%', v5);
v3.customItems.push(v4);
mc.menu = v3;
};
v1.menu_download = function () {
getURL(this.menu_mp3_link, '_blank');
};
v1.menu_remember = function () {};
v1.menu_vol = function (a, b, c) {
this.gizmo_volume_knob.set_knob(0, 1.0 - c / 100);
};
v1.set_vol = function (v) {
this.gizmo_volume_knob.set_knob(0, 1.0 - v / 100);
};
v1.set_vol_start = function (v, g) {
this.gizmo_volume_knob.set_knob(0, 1.0 - v / 100);
if (g) {
if (this.state == 'pause') {
this.onClick_id('play');
}
this.auto = 1;
} else {
if (this.state == 'play') {
this.onClick_id('pause');
}
this.auto = 0;
}
};
v1.menu_do = function (a, b, c) {
if (c == 'pp') {
if (this.state == 'play') {
this.onClick_id('pause');
} else {
this.onClick_id('play');
}
} else {
this.onClick_id(c);
}
};
v1.split_list_view = function () {
var v2 = this.gizmo_list1.up.w;
if (this.view == 'xspfs' || (this.got_creator < this.tracks.length / 2 || this.view == 'options')) {
this.gizmo_list1.w = v2;
this.gizmo_list2.w = 0;
} else {
if (this.got_creator) {
this.gizmo_list1.w = v2 - this.row_size;
this.gizmo_list2.x = this.gizmo_list1.w;
this.gizmo_list2.w = this.row_size;
}
}
this.gizmo_list1.draw_mask();
this.gizmo_list2.draw_mask();
};
v1.show_options = function () {
this.view = 'options';
var v2 = 0;
goto 17365;
for (;;) {
++v2;
label 17365:
if (v2 >= this.options.length) break;
var v3 = this.options[v2];
if (v3.opt) {
v3.str = this.get_option_str(v3.opt);
}
}
this.gizmo_list1.items = this.options;
this.gizmo_list1.onClick = this.delegate(this.select_option);
this.gizmo_list2.items = [];
this.gizmo_list2.onClick = null;
this.split_list_view();
};
v1.get_option_str = function (s) {
switch (s) {
return '';
case 'shuffle':
return 'Shuffle is ' + (this.shuffle ? 'ON' : 'OFF');
return '';
case 'autoplay':
return 'Autoplay is ' + (this.auto ? 'ON' : 'OFF');
return '';
case 'repeat':
return 'Repeat is ' + (this.loop ? 'ON' : 'OFF');
return '';
case 'sfx':
return 'Sound effects are ' + (this.sfx_on ? 'ON' : 'OFF');
return '';
}
return '';
};
v1.toggle_option = function (s) {
switch (s) {
case 'shuffle':
this.shuffle = this.shuffle ? 0 : 1;
break;
case 'autoplay':
this.auto = this.auto ? 0 : 1;
break;
case 'repeat':
this.loop = this.loop ? 0 : 1;
break;
case 'sfx':
this.sfx_on = this.sfx_on ? 0 : 1;
}
this.show_options();
};
v1.show_xspfs = function () {
this.view = 'xspfs';
this.gizmo_list1.items = this.xspfs;
this.gizmo_list1.onClick = this.delegate(this.select_xspf);
this.gizmo_list2.items = [];
this.gizmo_list2.onClick = null;
this.split_list_view();
};
v1.show_tracks = function () {
this.view = 'tracks';
this.gizmo_list1.items = this.tracks1;
this.gizmo_list2.items = this.tracks2;
this.gizmo_list1.onClick = this.delegate(this.select_mp3);
this.gizmo_list2.onClick = this.delegate(this.select_mp3_artist);
this.split_list_view();
};
v1.select_option = function (ln) {
var v3 = ln.item;
if (v3 == 0) {
this.show_xspfs();
return undefined;
}
var v4 = this.options[v3];
if (v4.url) {
getURL(v4.url, 'BOT');
} else {
if (v4.opt) {
this.toggle_option(v4.opt);
}
}
};
v1.select_xspf = function (ln) {
var v3 = ln.item;
if (v3 >= this.xspfs.length - 1 || v3 < 0) {
this.show_options();
} else {
this.xspf_id = v3;
this.load_xml(this.xspfs[v3].url);
this.state = 'pause';
}
};
v1.select_mp3 = function (ln) {
this.select_mp3_id(ln.item);
};
v1.select_mp3_id = function (id) {
if (id == 0) {
this.show_xspfs();
} else {
this.track_id = id;
this.play_mp3(this.tracks[this.track_id]);
this.gizmo_play.active = false;
this.gizmo_pause.active = true;
this.state = 'play';
}
};
v1.select_mp3_artist = function (ln) {
var v3 = ln.item;
this.show_artist(this.tracks[v3]);
};
v1.play_mp3 = function (t) {
if (t == undefined) {
return undefined;
}
this.load_image(t.image);
if (t.creator == '') {
this.set_title(t.title);
} else {
this.set_title(t.title + ' (by) ' + t.creator);
}
this.disp_title = t.title;
this.disp_creator = t.creator;
this.disp_info = t.info;
this.sfx.stop();
this.sfx.start(0);
this.sfx.stop();
this.sfx.loadSound(t.location, true);
this.gizmo_position_knob.set_knob(0, 0);
this.sfx_load_stall_counter = 0;
};
v1.stop_mp3 = function () {
this.sfx.stop();
this.sfx_next.stop();
this.gizmo_position_knob.set_knob(0, 0);
this.gizmo_play.active = true;
this.gizmo_pause.active = false;
this.state = 'pause';
};
v1.show_artist = function (t) {
getURL(t.info, 'BOT');
};
v1.set_title = function (str) {
this.gizmo_title.str = str;
};
v1.load_back_image = function (url) {
this.mc_back_image.removeMovieClip();
this.mc_back_image = gfx.create_clip(this.mc_back);
this.mc_back_image._lockroot = true;
this.mc_back_image.loadMovie(url);
};
v1.do_tint = function () {
if (_root.wp_back != undefined && _root.wp_back != '') {
gfx.clear(this.mc_back_colour);
this.mc_back_colour.style.fill = int(_root.wp_back);
gfx.draw_box(this.mc_back_colour, undefined, -this.x, -this.y, this.w + this.x * 2, this.h + this.y * 2);
}
};
v1.load_image = function (url) {
if (this.image_url == url) {
return undefined;
}
if (this.image_url == '') {
return undefined;
}
if (this.image_url == 'undefined') {
return undefined;
}
if (this.image_url == undefined) {
return undefined;
}
this.image_url = url;
this.mc_image3 = gfx.create_clip(this.mc_image);
this.mc_image3._lockroot = true;
this.mc_image3.loadMovie(url);
this.mc_image.onEnterFrame = this.delegate(this.load_image_check);
this.mc_image2.removeMovieClip();
this.mc_image2 = this.mc_image3;
this.mc_image3 = null;
};
v1.load_image_check = function () {
var v2 = this.mc_image2.getBytesTotal();
var v3 = this.mc_image2.getBytesLoaded();
if (v2 == -1) {
this.mc_image.onEnterFrame = null;
return undefined;
}
if (v3 != v2 || (v2 == 0 || (this.mc_image2._width == 0 || this.mc_image2._height == 0))) {
return undefined;
}
this.mc_image.onEnterFrame = null;
var v4 = 100 * this.w / this.mc_image2._width;
var v5 = 100 * this.h / this.mc_image2._height;
var v6 = v4;
if (v5 < v6) {
v6 = v5;
}
var v7 = v6 * this.mc_image2._width / 100;
var v8 = v6 * this.mc_image2._height / 100;
v7 = (this.w - v7) / 2;
v8 = (this.h - v8) / 2;
this.mc_image2._xscale = v6;
this.mc_image2._yscale = v6;
this.mc_image2._x = v7;
this.mc_image2._y = v8;
};
v1.clean = function () {};
v1.onClick = function (g) {
this.onClick_id(g.id);
};
v1.onClick_id = function (g_id) {
switch (g_id) {
case 'forward':
this.gizmo_play.active = false;
this.gizmo_pause.active = true;
this.click_forward();
this.state = 'play';
break;
case 'backward':
this.gizmo_play.active = false;
this.gizmo_pause.active = true;
this.click_backward();
this.state = 'play';
break;
case 'play':
if (this.state != 'play') {
this.gizmo_play.active = false;
this.gizmo_pause.active = true;
this.sfx.start((this.sfx.played_frac / this.sfx.loaded_frac) * this.sfx.duration / 1000);
this.state = 'play';
}
break;
case 'pause':
if (this.state != 'pause') {
this.gizmo_play.active = true;
this.gizmo_pause.active = false;
this.sfx.stop();
this.state = 'pause';
}
break;
case 'position_knob':
this.gizmo_play.active = false;
this.gizmo_pause.active = true;
this.sfx.stop();
var v3 = (this.gizmo_position_knob.x_knob / this.sfx.loaded_frac) * this.sfx.duration;
if (v3 > this.sfx.duration - 500) {
v3 = this.sfx.duration - 500;
}
if (v3 < 0) {
v3 = 0;
}
this.sfx.start(v3 / 1000);
this.state = 'play';
}
};
v1.update = function () {
var v2 = this.sfx.getBytesTotal() > 0 ? this.sfx.getBytesLoaded() / this.sfx.getBytesTotal() : 0;
var v3 = this.sfx.duration > 0 ? (this.sfx.position / this.sfx.duration) * this.sfx.loaded_frac : 0;
if (this.mc._visible) {
var v4 = this.row_size;
if (this.view == 'tracks') {
this.gizmo_list1.selected = this.track_id;
this.gizmo_list2.selected = this.track_id;
} else {
if (this.view == 'xspfs') {
this.gizmo_list1.selected = this.xspf_id;
this.gizmo_list2.selected = this.xspf_id;
}
}
var v6 = _root.poker.snapshot();
_root.localToGlobal(v6);
this.gizmo.mc.globalToLocal(v6);
this.gizmo.focus = this.gizmo.input(v6);
this.gizmo.update();
this.sfx.played_frac_last = this.sfx.played_frac;
this.sfx.loaded_frac_last = this.sfx.loaded_frac;
this.sfx.loaded_frac = v2;
this.sfx.played_frac = v3;
if (this.sfx.played_frac != this.sfx.played_frac_last) {
this.gizmo_position_knob.set_knob(this.sfx.played_frac, 0);
}
if (this.sfx.loaded_frac != this.sfx.loaded_frac_last) {
var v5 = this.gizmo_position;
v5.mc.clear();
v5.mc.style = {'fill': 536870912 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
gfx.draw_box(v5.mc, undefined, v4 * 1 / 16, v4 * 1 / 16, (v5.w - v4 * 2 / 16) * this.sfx.loaded_frac, v5.h - v4 * 2 / 16);
v5.mc.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.up.wetplayGFX.draw_boxen(v5.mc, 0, 0, v5.w, v5.h);
this.sfx_load_stall_counter = 0;
} else {
if (this.sfx.loaded_frac != 1 && this.sfx.played_frac == this.sfx.played_frac_last) {
++this.sfx_load_stall_counter;
} else {
this.sfx_load_stall_counter = 0;
}
}
}
if (this.state == 'play') {
this.throbe *= 1.0 - 0.05 * (1.0 - this.gizmo_volume_knob.y_knob);
if (this.throbe <= 0.05) {
this.throbe = 1.0 - this.gizmo_volume_knob.y_knob;
}
if (v2 == 1 && this.sfx.getBytesTotal() != undefined && this.sfx.position >= this.sfx.duration - 1 || this.sfx_load_stall_counter > 31 * 5) {
if (this.gizmo_volume_knob.y_knob != 1.0) {
this.sfx_load_stall_counter = 0;
this.play_next_track();
} else {
this.throbe = 0;
}
}
} else {
this.throbe = 0;
}
var v7 = (1.0 - this.gizmo_volume_knob.y_knob) * 2;
v7 = v7 * v7 * v7;
v7 /= 2;
this.sfx_master.setVolume(v7 * 100);
if (!this.gizmo.focus) {
this.so_save();
}
};
v1.click_forward = function () {
this.play_next_track();
};
v1.play_next_track = function () {
if (this.tracks.length == 0) {
return undefined;
}
++this.track_id;
if (this.track_id >= this.tracks.length) {
this.track_id = 1;
if (this.shuffle) {
this.shuffle_tracks();
}
if (!this.loop) {
this.play_mp3(this.tracks[this.track_id]);
this.stop_mp3();
return undefined;
}
} else {
if (this.track_id <= 0) {
this.track_id = 1;
if (this.shuffle) {
this.shuffle_tracks();
}
}
}
this.play_mp3(this.tracks[this.track_id]);
};
v1.click_backward = function () {
if (this.sfx.position < 2000) {
this.play_prev_track();
} else {
this.sfx.start(0);
}
};
v1.play_prev_track = function () {
--this.track_id;
if (this.track_id <= 0 || this.track_id >= this.tracks.length) {
this.track_id = this.tracks.length - 1;
if (this.shuffle) {
this.shuffle_tracks();
}
}
this.play_mp3(this.tracks[this.track_id]);
this.state = 'play';
};
v1.do_str = function (str) {
this.up.do_str(str);
str;
};
v1.load_xml = function (s) {
if (this.xspf.onLoad) {
return undefined;
}
if (this.tracks_url == s) {
this.show_tracks();
return undefined;
}
this.tracks_url = s;
var v4 = this.tracks_url.split('/');
var v5 = v4[v4.length - 1].split('.');
if (s == 'MP3') {
var v6 = '<?xml version="1.0" encoding="UTF-8" ?>\n<playlist version="1" xmlns="http://xspf.org/ns/0/">\n<trackList>\n<track>\n<title>' + _root.wp_mp3 + '</title>\n<location>' + _root.wp_mp3 + '</location>\n</track>\n</trackList>\n<playlist>\n';
this.xspf.parseXML(v6);
this.loaded_xml();
} else {
if (v5[v5.length - 1].toLowerCase() == 'mp3') {
var v7 = '<?xml version="1.0" encoding="UTF-8" ?>\n<playlist version="1" xmlns="http://xspf.org/ns/0/">\n<trackList>\n<track>\n<title>' + s + '</title>\n<location>' + s + '</location>\n</track>\n</trackList>\n<playlist>\n';
this.xspf.parseXML(v7);
this.loaded_xml();
} else {
if (v4[2] == 'www.last.fm') {
var v3 = s.split('%20');
s = v3.join('+');
v3 = s.split(' ');
s = v3.join('+');
this.xspf.noData = this.xspf.onData;
this.xspf.onData = this.delegate(this.loaded_html);
this.xspf.onLoad = this.delegate(this.loaded_html);
this.xspf.load(s);
this.set_title('scraping html');
} else {
if (s == 'grabb.it') {
this.xspf.onData = this.delegate(this.loaded_grabbit);
this.xspf.load('http://grabb.it/sessions.js');
this.set_title('Getting username');
} else {
this.xspf.onLoad = this.delegate(this.loaded_xml);
this.xspf.load(s);
this.set_title('Loading Playlist');
}
}
}
}
};
v1.loaded_html = function (txt) {
this.track_preload();
var v9 = null;
this.xspf.onData = this.xspf.noData;
this.xspf.onLoad = null;
var v3 = txt.split('.mp3');
var v7 = 0;
goto 24715;
for (;;) {
++v7;
label 24715:
if (v7 >= v3.length) break;
var v4 = v3[v7].split('http:');
var v6 = v4[v4.length - 1];
if (v6.substring(0, 2) == '//') {
var v5 = v6.split('/');
if (v5[3] == 'download') {
var v10 = 'http:' + v6 + '.mp3';
if (v9 != v10) {
v9 = v10;
var v11 = new Object();
v11.location = v10;
v11.creator = ' on Last.FM';
this.add_tr(v11);
v11.info = 'http://www.last.fm/music/?m=tracks&q=' + v11.titleurl;
}
}
}
}
this.track_postload();
};
v1.track_preload = function () {
this.tracks = new Array();
this.tracks1 = new Array();
this.tracks2 = new Array();
this.tracks[0] = {'str': '.. (click to go back)'};
this.tracks1[0] = {'str': '.. (click to go back)'};
this.tracks2[0] = {'str': ''};
this.got_creator = 0;
};
v1.track_postload = function () {
this.show_tracks();
this.stop_mp3();
this.set_title('Loaded ' + (this.tracks.length - 1) + ' tracks.');
this.show_tracks();
this.track_id = -1;
if (this.shuffle) {
this.shuffle_tracks();
}
if (this.auto) {
this.select_mp3_id(1);
}
};
v1.loaded_grabbit = function (src) {
var v3 = (src.split('"'))[3];
this.xspf = new XML();
this.xspf.ignoreWhite = true;
this.xspf.onLoad = this.delegate(this.loaded_xml);
if (v3) {
this.xspf.load('http://grabb.it/users/' + v3 + '.xspf');
} else {
this.xspf.load('http://grabb.it/charts/activity.xspf');
}
this.set_title('Loading Playlist');
};
v1.loaded_xml = function () {
this.xspf.onLoad = null;
this.track_preload();
this.parse_xml(this.xspf);
this.track_postload();
};
v1.parse_xml = function (n) {
if (n.nodeName == 'track') {
this.add_track_from_xml(n);
} else {
var v4 = n.childNodes;
var v3 = 0;
goto 25763;
for (;;) {
++v3;
label 25763:
if (v3 >= v4.length) break;
this.parse_xml(v4[v3]);
}
}
};
v1.add_tr = function (tr) {
var v7 = tr.location;
var v10 = v7.split('/');
if (v10.length > 1) {
if (v10[v10.length - 1] == '') {
v7 = v10[v10.length - 2];
} else {
v7 = v10[v10.length - 1];
}
}
v7 = _global.unescape(v7);
v10 = v7.split('+');
v7 = v10.join(' ');
v10 = v7.split('%');
var v4 = 1;
goto 26093;
for (;;) {
++v4;
label 26093:
if (v4 >= v10.length) break;
v10[v4] = v10[v4].substr(2);
}
v7 = v10.join(' ');
v10 = v7.split('.mp3');
v7 = v10.join(' ');
v10 = v7.split(' ');
var v3 = 1;
goto 26260;
for (;;) {
++v3;
label 26260:
if (v3 >= v10.length) break;
if (v10[v3] == '' && v10[v3 - 1] == '') {
v10.splice(v3, 1);
--v3;
}
}
v7 = v10.join(' ');
tr.titleurl = v7;
if (tr.title == undefined) {
tr.title = tr.annotation;
}
if (tr.title == undefined) {
tr.title = tr.titleurl;
}
v7 = tr.title;
v10 = v7.split('\n');
v7 = v10.join(' ');
v10 = v7.split(' ');
v3 = 1;
goto 26568;
for (;;) {
++v3;
label 26568:
if (v3 >= v10.length) break;
if (v10[v3] == '' && v10[v3 - 1] == '') {
v10.splice(v3, 1);
--v3;
}
}
v7 = v10.join(' ');
tr.title = v7;
if (tr.creator == undefined) {
tr.creator = '';
if (tr.info) {
tr.creator = '?';
++this.got_creator;
}
} else {
++this.got_creator;
}
var v8 = '' + tr.title;
var v9 = '' + tr.creator;
this.tracks[this.tracks.length] = tr;
this.tracks1[this.tracks1.length] = {'str': v8};
this.tracks2[this.tracks2.length] = {'str': v9};
};
v1.add_track_from_xml = function (n) {
var v5 = new Object();
var v4 = n.childNodes;
var v3 = 0;
goto 27005;
for (;;) {
++v3;
label 27005:
if (v3 >= v4.length) break;
var v6 = v4[v3];
if (v6.nodeName && v6.firstChild.nodeValue) {
v5[v6.nodeName] = v6.firstChild.nodeValue;
}
}
this.add_tr(v5);
};
v1.shuffle_tracks = function () {
var v4 = this.tracks.length - 1;
var v2 = 0;
goto 27201;
for (;;) {
++v2;
label 27201:
if (v2 >= v4) break;
var v3 = this.rnd() % v4;
this.tracks.splice(1, 0, this.tracks[v3 + 1]);
this.tracks.splice(v3 + 2, 1);
this.tracks1.splice(1, 0, this.tracks1[v3 + 1]);
this.tracks1.splice(v3 + 2, 1);
this.tracks2.splice(1, 0, this.tracks2[v3 + 1]);
this.tracks2.splice(v3 + 2, 1);
}
};
v1.so_load = function () {
this.so = SharedObject.getLocal('www.wetgenes.com/WetPlay');
var v2 = this.so.data;
this.so_loaded = false;
if (v2.sfx != undefined) {
this.sfx_on = v2.sfx;
this.so_loaded = true;
}
};
v1.so_save = function () {
var v2 = false;
var v3 = this.so.data;
var v4 = Math.floor((1.0 - this.gizmo_volume_knob.y_knob) * 100);
if (v3.vol != v4) {
v2 = true;
v3.vol = v4;
}
if (v3.sfx != this.sfx_on) {
v2 = true;
v3.sfx = this.sfx_on;
}
if (v3.auto != this.auto) {
v2 = true;
v3.auto = this.auto;
}
if (v2) {
this.so.flush();
}
};
ASSetPropFlags(v1, null, 1);
v1.disp_title = '';
v1.disp_creator = '';
v1.disp_info = '';
v1.throbe = 0;
v1.rnd_num = 0;
v1.so_loaded = false;
}
#endinitclip
}
movieClip 20496 __Packages.NonobaAPI {
#initclip
if (!NonobaAPI) {
_global.NonobaAPI = function () {
throw new Error('ERROR!: You cannot create an instance of the NonobaAPI class!');
};
var v1 = _global.NonobaAPI.prototype;
_global.NonobaAPI.GetShopItemKeys = function (callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR, null);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.ShowShop) {
NonobaAPI.api.GetShopItemKeys(callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.GetShopItemKeys(callback);
});
}
};
_global.NonobaAPI.HasShopItem = function (item, callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR, false, null);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.ShowShop) {
NonobaAPI.api.HasShopItem(item, callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.HasShopItem(item, callback);
});
}
};
_global.NonobaAPI.ShowShop = function (item, callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.ShowShop) {
NonobaAPI.api.ShowShop(item, callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.ShowShop(item, callback);
});
}
};
_global.NonobaAPI.Login = function (callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.Login) {
NonobaAPI.api.Login(callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.Login(callback);
});
}
};
_global.NonobaAPI.SubmitScore = function (key, score, callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.SubmitScore) {
NonobaAPI.api.SubmitScore(key, score, callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.SubmitScore(key, score, callback);
});
}
};
_global.NonobaAPI.AwardAchievement = function (key, callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR, 0);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.AwardAchievement) {
NonobaAPI.api.AwardAchievement(key, callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.AwardAchievement(key, callback);
});
}
};
_global.NonobaAPI.SetUserData = function (key, value, callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR);
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.SetUserData) {
NonobaAPI.api.SetUserData(key, value, callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.SetUserData(key, value, callback);
});
}
};
_global.NonobaAPI.GetUserData = function (key, callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR, '');
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.GetUserData) {
NonobaAPI.api.GetUserData(key, callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.GetUserData(key, callback);
});
}
};
_global.NonobaAPI.GetUsername = function (callback) {
if (!NonobaAPI.isInited) {
NonobaAPI.Init();
}
if (NonobaAPI.failed) {
if (callback) {
callback(NonobaAPI.ERROR, '');
}
return undefined;
}
if (NonobaAPI.api && NonobaAPI.api.GetUsername) {
NonobaAPI.api.GetUsername(callback);
} else {
NonobaAPI.cachedRequests.push(function () {
NonobaAPI.GetUsername(callback);
});
}
};
_global.NonobaAPI.emptyCache = function () {
var v2 = 0;
goto 3307;
for (;;) {
++v2;
label 3307:
if (v2 >= NonobaAPI.cachedRequests.length) break;
NonobaAPI.cachedRequests[v2]();
}
NonobaAPI.cachedRequests = [];
};
_global.NonobaAPI.Init = function (container) {
if (NonobaAPI.isInited) {
throw new Error('NonobaAPI can not be re-initialized!');
}
NonobaAPI.isInited = true;
var v3 = _root.nonoba$apicodeas2;
if (!v3) {
NonobaAPI.failed = true;
NonobaAPI.emptyCache();
}
System.security.allowDomain('*');
container = container || _root;
NonobaAPI.api = container.createEmptyMovieClip('___NonobaAPI__loader', container.getNextHighestDepth());
var v4 = new MovieClipLoader();
v4.addListener({'onLoadComplete': function () {
this.loadTimer = _global.setInterval(com.dynamicflash.utils.Delegate.create(NonobaAPI, function () {
if (NonobaAPI.api.SubmitScore !== undefined) {
_global.clearInterval(NonobaAPI.loadTimer);
NonobaAPI.emptyCache();
}
}), 500);
}, 'onLoadError': com.dynamicflash.utils.Delegate.create(NonobaAPI, function () {
NonobaAPI.failed = true;
NonobaAPI.emptyCache();
})});
v4.loadClip(v3, NonobaAPI.api);
};
ASSetPropFlags(v1, null, 1);
_global.NonobaAPI.SUCCESS = 'SUCCESS';
_global.NonobaAPI.NOT_LOGGED_IN = 'user not logged in';
_global.NonobaAPI.ERROR = 'error';
_global.NonobaAPI.isInited = false;
_global.NonobaAPI.loading = false;
_global.NonobaAPI.cachedRequests = [];
_global.NonobaAPI.failed = false;
}
#endinitclip
}
movieClip 20497 __Packages.WetPlayGFX {
#initclip
if (!WetPlayGFX) {
_global.WetPlayGFX = function () {};
var v1 = _global.WetPlayGFX.prototype;
v1.WetPlayMP3 = function (_up) {
this.up = _up;
};
v1.draw_play = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.moveTo(x + v7 * 5, y + v9 * 3);
mc.lineTo(x + v7 * 5, y + h - v9 * 3);
mc.lineTo(x + v7 * 11, y + v8 * 8);
mc.endFill();
};
v1.draw_back = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.moveTo(x + v7 * 11, y + v9 * 3);
mc.lineTo(x + v7 * 11, y + h - v9 * 3);
mc.lineTo(x + v7 * 5, y + v8 * 8);
mc.endFill();
};
v1.draw_stop = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.moveTo(x + v7 * 12, y + v8 * 4);
mc.lineTo(x + v7 * 12, y + v8 * 12);
mc.lineTo(x + v7 * 4, y + v8 * 12);
mc.lineTo(x + v7 * 4, y + v8 * 4);
mc.endFill();
};
v1.draw_pause = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.moveTo(x + v7 * 4, y + v9 * 3);
mc.lineTo(x + v7 * 4, y + v9 * 13);
mc.lineTo(x + v7 * 7, y + v9 * 13);
mc.lineTo(x + v7 * 7, y + v9 * 3);
mc.moveTo(x + v7 * 9, y + v9 * 3);
mc.lineTo(x + v7 * 9, y + v9 * 13);
mc.lineTo(x + v7 * 12, y + v9 * 13);
mc.lineTo(x + v7 * 12, y + v9 * 3);
mc.endFill();
};
v1.draw_forward = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.moveTo(x + v7 * 3, y + v9 * 3);
mc.lineTo(x + v7 * 3, y + h - v9 * 3);
mc.lineTo(x + v7 * 8, y + v8 * 8);
mc.moveTo(x + v7 * 8, y + v9 * 3);
mc.lineTo(x + v7 * 8, y + h - v9 * 3);
mc.lineTo(x + v7 * 13, y + v8 * 8);
mc.endFill();
};
v1.draw_backward = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.moveTo(x + v7 * 8, y + v9 * 3);
mc.lineTo(x + v7 * 8, y + h - v9 * 3);
mc.lineTo(x + v7 * 3, y + v8 * 8);
mc.moveTo(x + v7 * 13, y + v9 * 3);
mc.lineTo(x + v7 * 13, y + h - v9 * 3);
mc.lineTo(x + v7 * 8, y + v8 * 8);
mc.endFill();
};
v1.draw_boxen = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.endFill();
};
v1.draw_puck = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9 * 3, y + v9 * 3);
mc.lineTo(x + w - v9 * 3, y + v9 * 3);
mc.lineTo(x + w - v9 * 3, y + h - v9 * 3);
mc.lineTo(x + v9 * 3, y + h - v9 * 3);
mc.lineTo(x + v9 * 3, y + v9 * 3);
mc.endFill();
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20498 __Packages.Loading {
#initclip
if (!Loading) {
_global.Loading = function (_showloading) {
this.showloading = _showloading;
this.setup();
};
var v1 = _global.Loading.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function () {
var v3 = function (a, b) {
if (_root[a] == undefined) {
_root[a] = b;
}
};
this.server = 'www';
if (_root._url.indexOf('http://www.wetgenes.local/') == 0 || (_root._url.indexOf('http://wetgenes.local/') == 0 || (_root._url.indexOf('http://swf.wetgenes.local/') == 0 || (_root._url.indexOf('http://www.host.local/') == 0 || (_root._url.indexOf('http://host.local/') == 0 || (_root._url.indexOf('http://www.local.host/') == 0 || (_root._url.indexOf('http://local.host/') == 0 || _root._url.indexOf('file:') == 0))))))) {
this.server = 'local';
v3('host', 'swf.wetgenes.local');
} else {
v3('host', 'swf.wetgenes.com');
}
this.defuck = _root._highquality;
this.done = false;
this.mcb = gfx.create_clip(_root.mc_popup, null);
if (_root.scalar.oy == 600) {
this.mc = this.mcb;
} else {
this.mcb._xscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mcb._yscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mc = gfx.create_clip(this.mcb, null);
}
if (!this.showloading) {
this.mc._visible = false;
}
gfx.clear(this.mc);
this.mc.style.fill = -16777216;
gfx.draw_box(this.mc, 0, 0, 0, 800, 600);
this.mc.dna = gfx.create_clip(this.mc, null);
this.mc.dna._y = 100;
this.mc.dna._xscale = 100 * 800 / 256;
this.mc.dna._yscale = this.mc.dna._xscale;
this.dna = new wetDNA2(this.mc.dna, 'dna', 0, 255, 256, 128);
this.mcanim = gfx.create_clip(this.mc, null);
this.tf2 = gfx.create_text_html(this.mcanim, null, 25, 25, 750, 200);
this.tf3 = gfx.create_text_html(this.mcanim, null, 200, 250, 400, 300);
this.tf4 = gfx.create_text_html(this.mcanim, null, 25, 450, 750, 200);
var v2 = '';
v2 += '<p align="center">';
v2 += 'This game is creator owned by real people who have worked very hard to provide the best gaming experience they can.<br><br>';
v2 += 'You can always find the latest version at<br>http://WetDiamonds.WetGenes.com/';
v2 += '</p>';
gfx.set_text_html(this.tf2, 23, 16777215, v2);
v2 = '';
v2 += '<p align=\'center\'>WetDiamonds 2.12 (c) Kriss+Shi Daniels Feb 23 2010</p>';
v2 += '<p align=\'center\'>Distributed under the CC Attribution-NoDerivs 2.5 Licence.</p>';
v2 += '<p align=\'center\'>http://creativecommons.org/licenses/by-nd/2.5/</p>';
gfx.set_text_html(this.tf4, 16, 16777215, v2);
this.mcmochi = gfx.create_clip(this.mc, null, (800 - 600 * 800 / 640) / 2, (600 - 440 * 600 / 480) / 2, 100 * 800 / 640, 100 * 600 / 480);
this.mcmochi.click = gfx.create_clip(this.mcmochi, null);
this.waitfordisplay = true;
this.mcmochi.dispad = gfx.create_clip(this.mcmochi, null);
this.mc.onEnterFrame = this.delegate(this.update, null);
this.mc.onEnterFrame();
this.my_server = false;
if (_root._url.indexOf('http://wetdike.wetgenes.com') == 0 || (_root._url.indexOf('http://www.wetgenes.com') == 0 || _root._url.indexOf('http://wetgenes.com') == 0)) {
this.my_server = true;
}
_root.kidsafe = false;
if (this.server != 'local') {
_root.skip_wetimport = false;
_root.skip_wetlogin = false;
_root.skip_wetscore = false;
}
var v4 = _root._url.split('/');
v4 = v4[2].split('.');
v4[0] = v4[0].toLowerCase();
v4[1] = v4[1].toLowerCase();
v4[2] = v4[2].toLowerCase();
var v5 = '';
if (!v4[3] && v4[2]) {
v5 = v4[1];
} else {
if (!v4[2] && v4[1]) {
v5 = v4[0];
}
}
_root.hosted_domain_test = v5;
switch (v5) {
case 'auntlee':
_root.kidsafe = true;
_root.skip_wetimport = true;
_root.wethidemochiads = true;
break;
case 'mindjolt':
_root.skip_wetimport = true;
_root.skip_wetlogin = true;
_root.skip_wetscore = true;
break;
case 'ungrounded':
this.splash = 'splash_ng';
this.splash_link = 'http://www.newgrounds.com/';
break;
case 'armorgames':
this.splash = 'splash_ag';
this.splash_link = 'http://armorgames.com/';
break;
case 'kongregate':
this.splash = 'splash_kg';
this.splash_link = 'http://www.kongregate.com/';
}
if (!_root.wethidemochiads && !_root.wethideloadingmochiads) {
this.mochi = true;
}
if (this.brandead_link != '') {
this.splash = this.brandead_image;
this.splash_link = this.brandead_link;
}
if (this.splash) {
this.mcsplash = gfx.create_clip(this.mc, null, 400, 300, 220, 220);
this.mcsplash.splash = gfx.add_clip(this.mcsplash, this.splash, null, -300 / 2, -250 / 2);
this.mcsplash.onRelease = this.delegate(this.splashclick);
this.splash_count = 0;
} else {
if (!_root.wethidemochiads && !_root.wethideloadingmochiads) {
this.mochi_show();
}
}
};
v1.splashclick = function () {
if (this.splash_link) {
getURL(this.splash_link, '_blank');
}
};
v1.update = function () {
_root.stop();
if (this.splash) {
if (this.splash_count == 25 * 5) {
++this.splash_count;
this.mcsplash._visible = false;
this.splash = null;
if (!_root.wethidemochiads && !_root.wethideloadingmochiads) {
this.mochi_show();
}
} else {
if (this.splash_count > 25 * 4.5) {
++this.splash_count;
this.mcsplash._xscale *= 0.75;
this.mcsplash._yscale *= 0.75;
this.mcsplash._alpha *= 0.75;
} else {
if (this.splash_count < 25 * 5) {
++this.splash_count;
}
}
}
} else {
++this.frame;
}
this.loaded_percent = Math.floor(_root.getBytesLoaded() * 100 / _root.getBytesTotal());
if (!_root.wethidemochiads && !_root.wethideloadingmochiads) {
this.mcmochi._visible = true;
} else {
this.mcmochi._visible = false;
}
gfx.set_text_html(this.tf3, 100, 16777215, '<p align="center"><b>' + Math.floor(this.loaded_percent) + '%</b></p>');
this.dna.tint = Math.floor(256 * this.loaded_percent / 100);
if (this.loaded_percent >= 100 && (!this.splash && (!this.intro && !this.mochi))) {
this.clean();
}
};
v1.clean = function () {
delete this.dna;
if (this.showloading) {
_root.swish.clean();
_root.swish = (new Swish({'style': 'sqr_plode', 'mc': this.mc})).setup();
}
this.mc.removeMovieClip();
this.mc = null;
this.mcb.removeMovieClip();
this.mcb = null;
Stage.removeListener(this);
_root.gotoAndStop(2);
this.done = true;
_root._highquality = this.defuck;
};
v1.mochi_started = function () {
this.mochi = true;
this.waitfordisplay = false;
};
v1.mochi_finished = function () {
this.mochi = false;
};
v1.mochi_show = function () {
MochiAd.showInterLevelAd({'id': '7cf11a23d99c1aef', 'res': '600x440', 'clip': this.mcmochi.dispad, 'ad_started': this.delegate(this.mochi_started), 'ad_finished': this.delegate(this.mochi_finished)});
};
v1.intro_show = function () {};
v1.intro_hide = function () {};
v1.click = function (s) {
if (s !== 'text') {
} else {}
};
ASSetPropFlags(v1, null, 1);
v1.brandead_link = '';
v1.brandead_image = 'splash_brandead';
v1.done = false;
v1.loaded_percent = 0;
v1.frame = 0;
v1.mochi = false;
}
#endinitclip
}
movieClip 20499 __Packages.PlayAbout {
#initclip
if (!PlayAbout) {
_global.PlayAbout = function (_up) {
this.up = _up;
};
var v1 = _global.PlayAbout.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setbutt = function (m, n) {
m.onRollOver = this.delegate(this.over, n);
m.onRollOut = this.delegate(this.notover, n);
m.onReleaseOutside = this.delegate(this.notover, n);
m.onRelease = this.delegate(this.click, n);
};
v1.setup = function () {
_root.popup = this;
this.mcs = new Array();
this.tfs = new Array();
this.mcb = gfx.create_clip(_root.mc_popup, null);
if (_root.scalar.oy == 600) {
this.mc = this.mcb;
} else {
this.mcb._xscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mcb._yscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mc = gfx.create_clip(this.mcb, null);
}
this.mcb.cacheAsBitmap = true;
gfx.dropshadow(this.mc, 5, 45, 0, 1, 20, 20, 2, 3);
this.mc._y = 0;
this.mc.dx = 0;
this.mc._x = -800;
this.done = false;
this.steady = false;
gfx.clear(this.mc);
this.mc.style.out = -16777216;
this.mc.style.fill = -2147483648;
gfx.draw_box(this.mc, 0, 100 + 16, +16, 600 - 32, 600 - 32);
this.tfs[0] = gfx.create_text_html(this.mc, null, 150, 50, 500, 500);
var v5 = '';
v5 += '<p align=\'center\'><b>WetDiamonds</b> <font size=\'13\'>generic</font> v2.12 <font size=\'13\'>(c) Kriss+Shi Daniels Feb 23 2010<br>';
v5 += '<a target=\'BOT\' href=\'http://creativecommons.org/licenses/by-nd/2.5/\'>Distributed under the CC Attribution-NoDerivs 2.5 Licence.</a>';
v5 += '</font></p>';
v5 += '<br>';
v5 += '<p><a target=\'_blank\' href=\'http://www.WetGenes.com\'>Click here to visit <b>www.WetGenes.com</b> and play more free online games.</a></p>';
this.tfs[0].multiline = true;
this.tfs[0].wordWrap = true;
this.tfs[0].html = true;
this.tfs[0].selectable = false;
gfx.set_text_html(this.tfs[0], 22, 16777215, v5);
this.mcs[0] = gfx.create_clip(this.mc, null, 0, 570 - 220 * 800 / 640, 100 * 800 / 640, 100 * 800 / 640);
this.setbutt(this.mcs[0], 'wetcoma');
this.mcs[2] = gfx.add_clip(this.mc, 'auth_kriss', null, 300, 570 - 220 * 800 / 640 - 100, 100, 100);
this.setbutt(this.mcs[2], 'kriss');
this.mcs[3] = gfx.add_clip(this.mc, 'auth_shi', null, 400, 570 - 220 * 800 / 640 - 100, 100, 100);
this.setbutt(this.mcs[3], 'shi');
_root.bmc.clear_loading();
_root.bmc.remember('wetcoma', bmcache.create_url, {'url': 'http://swf.wetgenes.com/wavys/wetcoma.png', 'bmpw': 640, 'bmph': 220, 'bmpt': false, 'hx': 0, 'hy': 0});
this.mcs[1] = null;
this.show_loaded();
this.thunk();
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
_root.poker.clear_clicks();
};
v1.clean = function () {
if (_root.popup != this) {
return undefined;
}
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
this.mcb.removeMovieClip();
this.mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
_root.poker.clear_clicks();
};
v1.show_loaded = function () {
if (this.mcs[1] == null) {
if (_root.bmc.isloaded('wetcoma')) {
this.mcs[1] = _root.bmc.create(this.mcs[0], 'wetcoma', null);
}
}
};
v1.thunk = function () {};
v1.over = function (s) {
switch (s) {
case 'wetcoma':
_root.poker.ShowFloat('Read this whitarded comic and less of the same at <b>4lfa.com</b> : <font size=\'13\'>Helping to make tomorrow seem more like yesterday.</font>', 25 * 10);
break;
case 'kriss':
_root.poker.ShowFloat('Kriss made teh top secret codes.<br>Click to see his site.', 25 * 10);
break;
case 'shi':
_root.poker.ShowFloat('Shi hates you.<br>Click here to see why.', 25 * 10);
}
};
v1.notover = function (s) {
_root.poker.ShowFloat(null, 0);
};
v1.click = function (s) {
switch (s) {
case 'wetcoma':
getURL('http://4lfa.com', '_blank');
break;
case 'kriss':
getURL('http://XIXs.com', '_blank');
break;
case 'shi':
getURL('http://esyou.com', '_blank');
}
};
v1.update = function () {
this.show_loaded();
if (_root.popup == this && _root.poker.anykey) {
if (this.steady) {
this.done = true;
this.mc.dx = _root.scalar.ox;
}
}
if (_root.popup != this || _root.pause) {
return undefined;
}
this.mc._x += (this.mc.dx - this.mc._x) / 4;
if ((this.mc._x - this.mc.dx) * (this.mc._x - this.mc.dx) < 16 * 16) {
this.steady = true;
if (this.done) {
this.clean();
}
} else {
this.steady = false;
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20500 __Packages.MochiAd {
#initclip
if (!MochiAd) {
_global.MochiAd = function () {};
var v1 = _global.MochiAd.prototype;
_global.MochiAd.getVersion = function () {
return '2.5';
};
_global.MochiAd.showPreGameAd = function (options) {
var v2 = {'clip': _root, 'ad_timeout': 3000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showPreloaderAd', 'color': 16747008, 'background': 16777161, 'outline': 13994812, 'no_progress_bar': false, 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}, 'ad_progress': function (percent) {}};
options = MochiAd._parseOptions(options, v2);
if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') {
options.ad_started();
options.ad_finished();
return undefined;
}
var clip = options.clip;
var v3 = 11000;
var v4 = options.ad_timeout;
delete options.ad_timeout;
var v5 = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v6 = MochiAd._getRes(options);
var v7 = v6[0];
var v8 = v6[1];
mc._x = v7 * 0.5;
mc._y = v8 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk._x = v7 * -0.5;
chk._y = v8 * -0.5;
var v9 = chk.createEmptyMovieClip('_mochiad_bar', 4);
if (options.no_progress_bar) {
v9._visible = false;
delete options.no_progress_bar;
} else {
v9._x = 10;
v9._y = v8 - 20;
}
var v10 = options.color;
delete options.color;
var v11 = options.background;
delete options.background;
var v12 = options.outline;
delete options.outline;
var v13 = v9.createEmptyMovieClip('_outline', 1);
v13.beginFill(v11);
v13.moveTo(0, 0);
v13.lineTo(v7 - 20, 0);
v13.lineTo(v7 - 20, 10);
v13.lineTo(0, 10);
v13.lineTo(0, 0);
v13.endFill();
var v14 = v9.createEmptyMovieClip('_inside', 2);
v14.beginFill(v10);
v14.moveTo(0, 0);
v14.lineTo(v7 - 20, 0);
v14.lineTo(v7 - 20, 10);
v14.lineTo(0, 10);
v14.lineTo(0, 0);
v14.endFill();
v14._xscale = 0;
var v15 = v9.createEmptyMovieClip('_outline', 3);
v15.lineStyle(0, v12, 100);
v15.moveTo(0, 0);
v15.lineTo(v7 - 20, 0);
v15.lineTo(v7 - 20, 10);
v15.lineTo(0, 10);
v15.lineTo(0, 0);
chk.ad_msec = v3;
chk.ad_timeout = v4;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = v5;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v3 = this.mc._mochiad_wait;
v3.server_control = true;
v3.started = getTimer();
v3.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v2 = this._parent._parent;
var v3 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v5 = false;
var v6 = v2.getBytesTotal();
var v7 = v2.getBytesLoaded();
var v8 = 100.0 * v7 / v6;
var v9 = 100.0 * v4 / chk.ad_msec;
var v10 = this._mochiad_bar._inside;
var v11 = Math.min(100.0, Math.min(v8 || 0, v9));
v11 = Math.max(this.last_pcnt, v11);
this.last_pcnt = v11;
v10._xscale = v11;
options.ad_progress(v11);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, 'notify', {'id': 'hostLoadPcnt', 'pcnt': v8});
if (v8 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var v12 = v3.getBytesTotal();
if (v12 > 0 || typeof v12 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout && v8 == 100) {
options.ad_failed();
v5 = true;
}
}
}
if (v4 > chk.ad_msec) {
v5 = true;
}
if (v6 > 0 && (v7 >= v6 && v5)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
};
_global.MochiAd.showClickAwayAd = function (options) {
var v2 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showClickAwayAd', 'res': '300x250', 'no_bg': true, 'ad_started': function () {}, 'ad_finished': function () {}, 'ad_loaded': function (width, height) {}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_skipped': function () {}};
options = MochiAd._parseOptions(options, v2);
var clip = options.clip;
var v3 = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v4 = MochiAd._getRes(options);
var v5 = v4[0];
var v6 = v4[1];
mc._x = v5 * 0.5;
mc._y = v6 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_timeout = v3;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
var v7 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var v2 = this._parent._mochiad_ctr;
var v3 = getTimer() - this.started;
var v4 = false;
if (!chk.showing) {
var v5 = v2.getBytesTotal();
if (v5 > 0 || typeof v5 == 'undefined') {
v4 = true;
chk.showing = true;
chk.started = getTimer();
} else {
if (v3 > chk.ad_timeout) {
options.ad_failed();
v4 = true;
}
}
}
if (v4) {
delete this.onEnterFrame;
}
};
};
_global.MochiAd.showInterLevelAd = function (options) {
var v2 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showTimedAd', 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}};
options = MochiAd._parseOptions(options, v2);
var clip = options.clip;
var v3 = 11000;
var v4 = options.ad_timeout;
delete options.ad_timeout;
var v5 = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var v6 = clip._mochiad;
v6.onUnload = function () {
options.ad_finished();
};
var v7 = MochiAd._getRes(options);
var v8 = v7[0];
var v9 = v7[1];
v6._x = v8 * 0.5;
v6._y = v9 * 0.5;
var chk = v6.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_msec = v3;
chk.ad_timeout = v4;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = v5;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
v6.lc.adLoaded = options.ad_loaded;
v6.lc.adSkipped = options.ad_skipped;
v6.lc.adjustProgress = function (msec) {
var v3 = this.mc._mochiad_wait;
v3.server_control = true;
v3.started = getTimer();
v3.ad_msec = msec - 250;
};
v6.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
v6.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v2 = this._parent._mochiad_ctr;
var v3 = getTimer() - this.started;
var v4 = false;
if (!chk.showing) {
var v5 = v2.getBytesTotal();
if (v5 > 0 || typeof v5 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v3 > chk.ad_timeout) {
options.ad_failed();
v4 = true;
}
}
}
if (v3 > chk.ad_msec) {
v4 = true;
}
if (v4) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
};
_global.MochiAd.showPreloaderAd = function (options) {
trace('[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0');
MochiAd.showPreGameAd(options);
};
_global.MochiAd.showTimedAd = function (options) {
trace('[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0');
MochiAd.showInterLevelAd(options);
};
_global.MochiAd._allowDomains = function (server) {
var v3 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v3);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v3);
}
}
return v3;
};
_global.MochiAd.load = function (options) {
var v3 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'};
options = MochiAd._parseOptions(options, v3);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var v4 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return null;
}
if (v4._mochiad_loaded) {
return null;
}
var v5 = options.depth;
delete options.depth;
var v6 = v4.createEmptyMovieClip('_mochiad', v5);
var v7 = MochiAd._getRes(options);
options.res = v7[0] + 'x' + v7[1];
options.server += options.id;
delete options.id;
v4._mochiad_loaded = true;
var v8 = v6.createEmptyMovieClip('_mochiad_ctr', 1);
for (var k in options) {
v8[k] = options[k];
}
var v9 = v8.server;
delete v8.server;
var v10 = MochiAd._allowDomains(v9);
v6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var v11 = new LocalConnection();
var v12 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_');
v11.mc = v6;
v11.name = v12;
v11.hostname = v10;
v11.allowDomain = function (d) {
return true;
};
v11.allowInsecureDomain = v11.allowDomain;
v11.connect(v12);
v6.lc = v11;
v8.lc = v12;
v8.st = getTimer();
v8.loadMovie(v9 + '.swf', 'POST');
return v6;
};
_global.MochiAd.unload = function (clip) {
if (typeof clip == 'undefined') {
clip = _root;
}
if (clip.clip && clip.clip._mochiad) {
clip = clip.clip;
}
if (!clip._mochiad) {
return false;
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, 'notify', {'id': 'unload'});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return true;
};
_global.MochiAd._isNetworkAvailable = function () {
if (System.security) {
var v2 = System.security;
if (v2.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
_global.MochiAd._getRes = function (options) {
var v3 = options.clip.getBounds();
var v4 = 0;
var v5 = 0;
if (typeof options.res != 'undefined') {
var v6 = options.res.split('x');
v4 = _global.parseFloat(v6[0]);
v5 = _global.parseFloat(v6[1]);
} else {
v4 = v3.xMax - v3.xMin;
v5 = v3.yMax - v3.yMin;
}
if (v4 == 0 || v5 == 0) {
v4 = Stage.width;
v5 = Stage.height;
}
return [v4, v5];
};
_global.MochiAd._parseOptions = function (options, defaults) {
var v4 = {};
for (var k in defaults) {
v4[k] = defaults[k];
}
if (options) {
for (var k in options) {
v4[k] = options[k];
}
}
if (_root.mochiad_options) {
var v5 = _root.mochiad_options.split('&');
var v6 = 0;
goto 9390;
for (;;) {
++v6;
label 9390:
if (v6 >= v5.length) break;
var v7 = v5[v6].split('=');
v4[_global.unescape(v7[0])] = _global.unescape(v7[1]);
}
}
if (v4.id == 'test') {
trace('[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!');
}
return v4;
};
_global.MochiAd.rpc = function (clip, callbackID, arg) {
switch (arg.id) {
case 'setValue':
MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case 'getValue':
var v5 = MochiAd.getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, 'rpcResult', callbackID, v5);
break;
case 'runMethod':
var v6 = MochiAd.runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, 'rpcResult', callbackID, v6);
break;
default:
trace('[mochiads rpc] unknown rpc id: ' + arg.id);
}
};
_global.MochiAd.setValue = function (base, objectName, value) {
var v5 = objectName.split('.');
var v6 = 0;
goto 9945;
for (;;) {
++v6;
label 9945:
if (v6 >= v5.length - 1) break;
if (base[v5[v6]] == undefined || base[v5[v6]] == null) {
return undefined;
}
base = base[v5[v6]];
}
base[v5[v6]] = value;
};
_global.MochiAd.getValue = function (base, objectName) {
var v4 = objectName.split('.');
var v5 = 0;
goto 10144;
for (;;) {
++v5;
label 10144:
if (v5 >= v4.length - 1) break;
if (base[v4[v5]] == undefined || base[v4[v5]] == null) {
return undefined;
}
base = base[v4[v5]];
}
return base[v4[v5]];
};
_global.MochiAd.runMethod = function (base, methodName, argsArray) {
var v5 = methodName.split('.');
var v6 = 0;
goto 10350;
for (;;) {
++v6;
label 10350:
if (v6 >= v5.length - 1) break;
if (base[v5[v6]] == undefined || base[v5[v6]] == null) {
return undefined;
}
base = base[v5[v6]];
}
if (typeof base[v5[v6]] == 'function') {
return base[v5[v6]].apply(base, argsArray);
} else {
return undefined;
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20501 __Packages.WTF {
#initclip
if (!WTF) {
_global.WTF = function (stropts) {
this.show_nowplaying = false;
this.scale_800x600 = false;
if (stropts) {
var v5 = stropts.split(',');
var v3 = 0;
goto 1132;
for (;;) {
++v3;
label 1132:
if (v3 >= v5.length) break;
switch (v5[v3]) {
break;
case 'show_nowplaying':
case 'scale_800x600':
this.scale_800x600 = true;
continue;
}
}
}
this.v = [];
this.v.name = 'WetDiamonds';
this.v.site = 'generic';
this.v.number = '2.12';
this.v.stamp = 'Feb 23 2010';
this.v.stamp_number = '20100223';
this.v.root = 'diamonds';
System.security.allowDomain(_root._url);
System.security.allowDomain((_root._url.split('/'))[2]);
System.security.allowDomain('data.wetgenes.com');
System.security.allowDomain('s3.wetgenes.com');
System.security.allowDomain('www.wetgenes.com');
System.security.allowDomain('swf.wetgenes.com');
System.security.allowDomain('www.wetgenes.local');
System.security.allowDomain('swf.wetgenes.local');
System.security.allowDomain('*');
System.security.loadPolicyFile('http://swf.wetgenes.com/crossdomain.xml');
System.security.loadPolicyFile('http://data.wetgenes.com/crossdomain.xml');
this.mc_import = gfx.create_clip(_root, 16384 + 32 - 18);
if (_root.host == 'swf.wetgenes.local') {
this.import_swf_name = 'http://swf.wetgenes.local/swf/WTF_import.swf?hash=' + _global.escape(_root.hash);
} else {
this.import_swf_name = 'http://swf.wetgenes.com/swf/WTF_import.swf?hash=' + _global.escape(_root.hash);
}
this.__com_mochibot__('81a1e704', _root, 10301);
};
var v1 = _global.WTF.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.get_width = function () {
if (this.scale_800x600) {
return 800;
} else {
return Stage.width;
}
};
v1.get_height = function () {
if (this.scale_800x600) {
return 600;
} else {
return Stage.height;
}
};
v1.logindone = function () {
if (!this.donelogindone) {
if (!_root.skip_wetimport) {
if (_root.login.opt_chat) {
this.mc_import.loadMovie(this.import_swf_name);
this.loaded_import = true;
}
}
this.donelogindone = true;
} else {
if (!_root.skip_wetimport) {
if (_root.login.opt_chat) {
if (!this.loaded_import) {
this.mc_import.loadMovie(this.import_swf_name);
this.loaded_import = true;
}
} else {}
}
}
};
v1.__com_mochibot__ = function (swfid, mc, lv) {
var v12 = '__mochibot__';
var v13 = 'mochibot.com';
var v6 = _global ? _global : _level0._root;
if (v6[v12 + swfid]) {
return v6[v12 + swfid];
}
var v7 = System.security;
var v5 = mc._root.getSWFVersion;
var v8 = v5 ? mc.getSWFVersion() : (_global ? 6 : 5);
if (!v7) {
v7 = {};
}
var v9 = v7.sandboxType;
if (v9 == 'localWithFile') {
return null;
}
v5 = v7.allowDomain;
if (v5) {
v7.allowDomain(v13);
}
v5 = v7.allowInsecureDomain;
if (v5) {
v7.allowInsecureDomain(v13);
}
var v10 = 'http://' + v13 + '/my/core.swf?mv=5&fv=' + v8 + '&v=' + _global.escape(/:$version) + '&swfid=' + _global.escape(swfid) + '&l=' + lv + '&f=' + mc + (v9 ? '&sb=' + v9 : '');
if (v8 <= 6) {
lv = v6[v12 + 'level'] ? v6[v12 + 'level'] + 1 : lv;
v6[v12 + 'level'] = lv;
var v11 = mc.createEmptyMovieClip(v12 + swfid, lv);
v11.loadMovie(v10);
return v11;
}
lv = mc.getNextHighestDepth();
v6[v12 + 'level'] = lv;
var v11 = mc.createEmptyMovieClip(v12 + swfid, lv);
v11.loadMovie(v10);
return v11;
};
ASSetPropFlags(v1, null, 1);
v1.corner = 'BR';
v1.ontarget = false;
v1.donelogindone = false;
v1.loaded_import = false;
}
#endinitclip
}
movieClip 20502 __Packages.wetDNA2 {
#initclip
if (!wetDNA2) {
_global.wetDNA2 = function (master, name, level, color) {
var v7 = this;
v7.mc2 = master.createEmptyMovieClip(name, level);
v7.mc = v7.mc2.createEmptyMovieClip('dna', 0);
v7.mc._x = 128;
v7.mc._y = 64;
gfx.blurglow(v7.mc, 2, 2, 1, 255, 0.5, 8, 8, 2, 3);
v7.mc2.t = this;
v7.color = 255;
v7.thunked = false;
v7.frame = 0;
v7.xyz = new Array(32 * 2 * 64 * 2);
v7.removeMC = this.removeMC;
v7.update = this.update;
v7.draw = this.draw;
v7.thunk = this.thunk;
v7.mc2.onEnterFrame = this.onEnterFrame;
this.bmps = [];
this.tinted = [];
var v6 = 0;
goto 820;
for (;;) {
++v6;
label 820:
if (v6 >= 32) break;
v7.mc.clear();
v7.thunk();
v7.draw();
v7.update();
var v8 = new flash.display.BitmapData(256, 128, true, 0);
v8.draw(v7.mc2);
this.bmps[v6] = v8;
this.tinted[v6] = 0;
}
v7.mc.removeMovieClip();
};
var v1 = _global.wetDNA2.prototype;
v1.thunk = function () {
var v2 = this;
if (!v2.thunked) {
var v4 = 2 * 64 * 2 * v2.frame;
var v3 = 0;
var v9 = 0;
goto 1175;
for (;;) {
v9 += Math.PI;
label 1175:
if (v9 > Math.PI) break;
var v10 = 0;
goto 1226;
for (;;) {
++v10;
label 1226:
if (v10 > 63) break;
var v5 = v9 + Math.PI * (v10 + v2.frame) / 32;
var v6 = -256 + 4 + v10 * 8;
var v7 = Math.sin(-v5) * 128;
var v8 = 1 - (Math.cos(-v5) * 128 + 128) / 1536;
v2.xyz[v4 + v3 + v10 * 2 + 0] = v6 * v8 * 0.46;
v2.xyz[v4 + v3 + v10 * 2 + 1] = v7 * v8 * 0.3;
}
v3 = 64 * 2;
}
if (v2.frame == 31) {
v2.thunked = true;
}
}
};
v1.draw = function () {
var v2 = this;
var v3 = 2 * 64 * 2 * v2.frame;
v2.mc.lineStyle(8, v2.color, 50);
v2.mc.moveTo(v2.xyz[v3 + 0], v2.xyz[v3 + 1]);
var v4 = 2;
goto 1802;
for (;;) {
v4 += 2;
label 1802:
if (v4 > 128 - 2) break;
v2.mc.lineTo(v2.xyz[v3 + v4 + 0], v2.xyz[v3 + v4 + 1]);
}
v2.mc.moveTo(v2.xyz[v3 + 128 + 0], v2.xyz[v3 + 128 + 1]);
var v5 = 128 + 2;
goto 2021;
for (;;) {
v5 += 2;
label 2021:
if (v5 > 256 - 2) break;
v2.mc.lineTo(v2.xyz[v3 + v5 + 0], v2.xyz[v3 + v5 + 1]);
}
v2.mc.lineStyle(4, v2.color, 100);
v2.mc.moveTo(v2.xyz[v3 + 0], v2.xyz[v3 + 1]);
var v6 = 2;
goto 2254;
for (;;) {
v6 += 2;
label 2254:
if (v6 > 128 - 2) break;
v2.mc.lineTo(v2.xyz[v3 + v6 + 0], v2.xyz[v3 + v6 + 1]);
}
v2.mc.moveTo(v2.xyz[v3 + 128 + 0], v2.xyz[v3 + 128 + 1]);
var v7 = 128 + 2;
goto 2473;
for (;;) {
v7 += 2;
label 2473:
if (v7 > 256 - 2) break;
v2.mc.lineTo(v2.xyz[v3 + v7 + 0], v2.xyz[v3 + v7 + 1]);
}
v2.mc.lineStyle(8, v2.color, 50);
var v8 = 4;
goto 2646;
for (;;) {
v8 += 8;
label 2646:
if (v8 >= 128 - 4) break;
v2.mc.moveTo(v2.xyz[v3 + v8 + 0], v2.xyz[v3 + v8 + 1]);
v2.mc.lineTo(v2.xyz[v3 + 128 + v8 + 0], v2.xyz[v3 + 128 + v8 + 1]);
}
v2.mc.lineStyle(4, v2.color, 100);
var v9 = 4;
goto 2908;
for (;;) {
v9 += 8;
label 2908:
if (v9 > 128 - 4) break;
v2.mc.moveTo(v2.xyz[v3 + v9 + 0], v2.xyz[v3 + v9 + 1]);
v2.mc.lineTo(v2.xyz[v3 + 128 + v9 + 0], v2.xyz[v3 + 128 + v9 + 1]);
}
};
v1.update = function () {
var v2 = this;
v2.frame += 1;
if (v2.frame == 32) {
v2.frame = 0;
}
};
v1.removeMC = function () {
var v2 = this;
v2.mc.removeMovieClip();
};
v1.do_tint = function () {
var v2 = new flash.geom.Rectangle(this.tinted[this.frame], 0, this.tint - this.tinted[this.frame], 128);
var v3 = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 128, 255, 0);
this.bmps[this.frame].colorTransform(v2, v3);
this.tinted[this.frame] = this.tint;
};
v1.onEnterFrame = function () {
var v2 = this;
if (!v2._visible) {
return undefined;
}
v2.t.do_tint();
v2.t.mc2.attachBitmap(v2.t.bmps[v2.t.frame], 0, 'auto', true);
v2.t.frame += 1;
if (v2.t.frame == 32) {
v2.t.frame = 0;
}
};
ASSetPropFlags(v1, null, 1);
v1.tint = 0;
v1.frame = 0;
}
#endinitclip
}
movieClip 20503 __Packages.com.dynamicflash.utils.Delegate {
#initclip
if (!com.dynamicflash.utils.Delegate) {
if (!com) {
_global.com = new Object();
}
if (!com.dynamicflash) {
_global.com.dynamicflash = new Object();
}
if (!com.dynamicflash.utils) {
_global.com.dynamicflash.utils = new Object();
}
_global.com.dynamicflash.utils.Delegate = function () {};
var v1 = _global.com.dynamicflash.utils.Delegate.prototype;
_global.com.dynamicflash.utils.Delegate.create = function (target, handler) {
var v4 = arguments.slice(2);
var v5 = function () {
super = arguments.callee;
var v3 = arguments.concat(super.extraArgs, [super]);
return super.handler.apply(super.target, v3);
};
v5.extraArgs = v4;
v5.handler = handler;
v5.target = super;
return v5;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20504 __Packages.GizmoButt {
#initclip
if (!GizmoButt) {
_global.GizmoButt = function (_up) {
this.up = _up;
this.setup();
};
var v1 = _global.GizmoButt.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 689;
for (;;) {
++v2;
label 689:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 884;
for (;;) {
++v2;
label 884:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.GizmoButt.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = GizmoButt.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1256;
for (;;) {
++v3;
label 1256:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.setup = function () {
this.setup_base();
this.mc.cacheAsBitmap = true;
};
v1.clean = function () {
this.clean_base();
};
v1.update = function () {
this.update_base();
};
v1.input = function (snapshot) {
if (this.top.focus == this) {
var v3 = GizmoButt.dupe_snapshot(snapshot);
this.mc.localToGlobal(v3);
this.up.mc.globalToLocal(v3);
if (snapshot.x > 0 && (snapshot.y > 0 && (snapshot.x < this.w && snapshot.y < this.h))) {
if (snapshot.key_off & 1) {
this.top.focus = null;
this.mc_base._visible = true;
this.mc_over._visible = false;
this.mc_down._visible = false;
this.onClick(this);
return this.top.focus;
}
this.mc_base._visible = false;
this.mc_over._visible = false;
this.mc_down._visible = true;
} else {
this.mc_base._visible = true;
this.mc_over._visible = false;
this.mc_down._visible = false;
if (snapshot.key_off & 1) {
this.top.focus = null;
return this.top.focus;
}
}
this.update();
this.input_base(snapshot);
return this.top.focus;
}
if (this.top.focus == null && (snapshot.x > 0 && (snapshot.y > 0 && (snapshot.x < this.w && snapshot.y < this.h)))) {
if (snapshot.key_on & 1) {
this.top.focus = this;
this.mc_base._visible = false;
this.mc_over._visible = false;
this.mc_down._visible = true;
return this.top.focus;
} else {
this.mc_base._visible = false;
this.mc_over._visible = true;
this.mc_down._visible = false;
}
this.input_base(snapshot);
return this.top.focus;
}
this.mc_base._visible = true;
this.mc_over._visible = false;
this.mc_down._visible = false;
this.input_base(snapshot);
return this.top.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20505 __Packages.PlayLobby {
#initclip
if (!PlayLobby) {
_global.PlayLobby = function (_up, _opts) {
this.up = _up;
this.opts = _opts;
this.gamebasename = this.opts.name;
this.gameversion = this.opts.version;
this.gamename = this.gamebasename + '.' + this.gameversion;
};
var v1 = _global.PlayLobby.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function () {
if (this.opts.style == 'popup') {
if (_root.popup) {
return undefined;
}
_root.popup = this;
this.mc = gfx.create_clip(_root.mc_popup, null);
} else {
this.mcb = gfx.create_clip(this.up.mc, null);
if (this.opts.backswf) {
this.mcb.back = gfx.add_clip(this.mcb, this.opts.backswf, null, 0, 0);
this.mcb.back.gotoAndStop(1);
this.mcb.back.cacheAsBitmap = true;
}
this.mc = gfx.create_clip(this.mcb, null);
}
_root.lobby = this;
this.username = _root.Login_Name;
this.gamedata = null;
this.players = new Array();
this.styles = new Array();
this.xups = new Array();
this.tfs = new Array();
this.mcs = new Array();
this.butts = new Array();
this.done = false;
this.steady = false;
this.mc.cacheAsBitmap = true;
this.mc._x = -800;
this.mc._y = 0;
this.mc.dx = 0;
gfx.clear(this.mc);
this.mc.style.out = -16777216;
this.mc.style.fill = 1073741824;
gfx.draw_box(this.mc, 0, 100 + 16, +16, 600 - 32, 600 - 32);
this.mc_base = gfx.create_clip(this.mc, null);
this.mc_pbem = gfx.create_clip(this.mc, null);
this.mcs[0] = gfx.create_clip(this.mc, null);
this.mcs[0].tf = gfx.create_text_html(this.mcs[0], null, 150, 50, 500, 150);
this.state = 'rooms';
this.new_butt('close', '<p align=\'center\'><b>Close</b></p>', 150 + 500 - 120, 40 + 40 * 2, 120, 20);
this.new_butt('rooms', '<p align=\'center\'><b>Join</b></p>', 150 + 500 - 120, 40 + 40 * 3, 120, 20);
this.new_butt('host', '<p align=\'center\'><b>Host</b></p>', 150 + 500 - 120, 40 + 40 * 4, 120, 20);
this.new_butt('styles', '<p align=\'center\'><b>Styles</b></p>', 150 + 500 - 120, 40 + 40 * 5, 120, 20);
this.new_butt('users', '<p align=\'center\'><b>Players</b></p>', 150 + 500 - 120, 40 + 40 * 6, 120, 20);
this.new_butt('pickme', '<p align=\'center\'><b>PickMe!</b></p>', 150 + 500 - 120, 40 + 40 * 7, 120, 20);
this.new_butt('start', '<p align=\'center\'><b>Start!</b></p>', 150 + 500 - 120, 40 + 40 * 8, 120, 20);
this.new_butt('cancel', '<p align=\'center\'><b>Cancel!</b></p>', 150 + 500 - 120, 40 + 40 * 9, 120, 20);
this.new_butt('watch', '<p align=\'center\'><b>Watch!</b></p>', 150 + 500 - 120, 40 + 40 * 10, 120, 20);
this.new_butt('rejoin', '<p align=\'center\'><b>ReJoin!</b></p>', 150 + 500 - 120, 40 + 40 * 10, 120, 20);
this.new_butt('pbem', '<p align=\'center\'><b>PBeM!</b></p>', 150 + 500 - 120, 40 + 40 * 11, 120, 20);
this.setup_gizmos();
this.rooms_str = '<p>Connecting to server... You should probably think about clicking one of the buttons to the right.</p>';
this.users_str = this.rooms_str;
this.thunk();
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
_root.poker.clear_clicks();
this.tfs[0] = gfx.create_text_edit(this.mc_pbem, null, 150, 200, 500, 40);
this.tfs[1] = gfx.create_text_edit(this.mc_pbem, null, 150, 300, 500, 40);
var v6 = 8;
gfx.clear(this.mc_pbem);
this.draw_boxen(this.mc_pbem, 150 - v6, 200 - v6, 500 + v6 + v6, 40 + v6 + v6);
this.draw_boxen(this.mc_pbem, 150 - v6, 300 - v6, 500 + v6 + v6, 40 + v6 + v6);
this.tfs[0].setNewTextFormat(gfx.create_text_format(32, -1));
this.tfs[1].setNewTextFormat(gfx.create_text_format(32, -1));
this.tfs[0].text = 'your@email';
this.tfs[1].text = 'their@email';
this.new_butt('ok', '<p align=\'center\'><b>OK</b></p>', 150, 40 + 40 * 12, 120, 20, this.mc_pbem);
this.new_butt('cancel', '<p align=\'center\'><b>Cancel</b></p>', 150 + 500 - 120, 40 + 40 * 12, 120, 20, this.mc_pbem);
if (this.opts.multi == 'arena') {
this.butt_press('rooms');
} else {
if (_root.pbem_id) {
this.butt_press('pbem_start');
} else {
this.butt_press('styles');
this.butt_press('rooms');
}
}
};
v1.exit = function () {
if (this.opts.style == 'popup') {
this.clean();
} else {
this.up.state_next = this.opts.state_next;
}
};
v1.clean = function () {
if (this.opts.style == 'popup') {
if (_root.popup != this) {
return undefined;
}
_root.popup = null;
}
_root.lobby = null;
if (this.opts.multi == 'arena') {
this.prepgame();
} else {
this.gmsgsend({'gcmd': 'set', 'gnam': this.gamename, 'gvar': 'status', 'gset': 'idle'});
}
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
this.mc.removeMovieClip();
this.mc = null;
this.mcb.removeMovieClip();
this.mcb = null;
_root.poker.clear_clicks();
_root.poker.ShowFloat(null, 0);
};
v1.prepgame = function () {
this.gamedata = new Object();
this.gamedata.gamename = this.gamename;
this.gamedata.player_idx = 0;
var v2 = 0;
goto 7575;
for (;;) {
++v2;
label 7575:
if (v2 >= this.players.length) break;
if (this.players[v2][0] == this.username) {
this.gamedata.player_idx = v2 + 1;
}
}
this.gamedata.xup = [];
v2 = 1;
goto 7712;
for (;;) {
++v2;
label 7712:
if (v2 >= 10) break;
if (this.styles[v2 + 'up']) {
this.gamedata.xup[v2] = [];
var v4 = Clown.pak_to_str(this.styles[v2 + 'up']);
var v5 = v4.split('&');
for (var v3 in v5) {
var v6 = v5[v3].split('=');
if (v6[0] != '' && v6[1]) {
this.gamedata.xup[v2][v6[0]] = v6[1];
}
}
}
}
this.gamedata.styles = this.styles;
this.styles = null;
this.gamedata.players = new Array();
v2 = 0;
goto 8068;
for (;;) {
++v2;
label 8068:
if (v2 >= this.players.length) break;
this.gamedata.players[v2] = {'name': this.players[v2][0]};
}
this.players = null;
this.users = null;
this.gamedata.players_numof = this.players_max;
this.exit();
if (this.opts.state_next) {
this.up.state_next = this.opts.state_next;
} else {
this.up.state_next = 'play';
}
};
v1.watchgame = function () {
this.prepgame();
};
v1.startgame = function () {
var v3 = false;
if (this.userauth == 'owner') {
this.gmsgsend({'gcmd': 'start', 'gnam': this.gamename, 'gtyp': 'go'});
}
var v2 = 0;
goto 8416;
for (;;) {
++v2;
label 8416:
if (v2 >= this.players.length) break;
if (this.players[v2][0] == this.username) {
v3 = true;
}
}
if (!v3) {
this.state = 'users';
this.thunk();
return undefined;
}
this.prepgame();
};
v1.thunk_users = function () {
var v7 = false;
var v8 = false;
var v2 = '';
v2 += this.gamename + ' : ' + this.styles.state + '<br><br>';
v2 += '<a href="asfunction:_root.lobby.lineclick,user/0">';
var v3 = 0;
goto 8681;
for (;;) {
++v3;
label 8681:
if (v3 >= this.players_max) break;
var v5 = '';
var v6 = '';
if (this.players[v3][0]) {
v5 = this.players[v3][0];
v6 = this.players[v3][1];
}
v2 += '<b>' + (v3 + 1) + 'UP : </b>' + v5 + ' : ' + v6 + '<br>';
if (v5 == this.username) {
v7 = true;
}
if (v5 == 'me') {
v8 = true;
}
}
v2 += '</a><br>';
v3 = 1;
goto 8953;
for (;;) {
++v3;
label 8953:
if (v3 >= this.users.length) break;
var v4 = this.users[v3];
v2 += '<a href="asfunction:_root.lobby.lineclick,user/' + v3 + '">';
v2 += '<b>' + v4[0] + '</b> : ' + v4[1] + '</a><br>';
}
if (this.users_str == '') {
this.gizmo_Tlist.str = v2;
} else {
this.gizmo_Tlist.str = this.users_str;
}
if (this.userauth == 'owner') {
if (this.players.length == this.players_max && (this.state != 'start' && !v8)) {
this.butts.start._visible = true;
}
v2 = '';
v2 += '<p><b>Please select which players will play in the next game.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 13434828, v2);
} else {
if (this.state == 'users') {
v3 = 1;
goto 9366;
for (;;) {
++v3;
label 9366:
if (v3 >= this.users.length) break;
if (this.users[v3][0] == this.username) {
if (this.users[v3][1] != 'pickme') {
this.butts.pickme._visible = true;
}
}
}
}
if (this.state == 'start') {
v2 = '';
v2 += '<p><b>You have been choosen. Click start if you want to play, cancel if you do not.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 13434828, v2);
} else {
v2 = '';
v2 += '<p><b>Please wait while the host decides who will play in the next game.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 16764108, v2);
}
}
if (this.styles.state == 'playing') {
if (v7) {
v2 = '';
v2 += '<p><b>You are in the midle of playing this game and should rejoin.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 13434828, v2);
this.butts.rejoin._visible = true;
this.butts.start._visible = false;
} else {
v2 = '';
v2 += '<p><b>A game is in progress, why not watch them play?.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 13434828, v2);
this.butts.watch._visible = true;
this.butts.start._visible = false;
}
}
};
v1.thunk = function () {
this.butts.rooms._visible = false;
this.butts.host._visible = false;
this.butts.styles._visible = false;
this.butts.users._visible = false;
this.butts.pickme._visible = false;
this.butts.start._visible = false;
this.butts.cancel._visible = false;
this.butts.watch._visible = false;
this.butts.rejoin._visible = false;
this.butts.pbem._visible = false;
this.mc_base._visible = true;
this.mc_pbem._visible = false;
if (this.styles.ups) {
if (this.styles.ups == '-') {
this.players = new Array();
} else {
this.players = this.styles.ups.split(';');
var v3 = 0;
goto 10348;
for (;;) {
++v3;
label 10348:
if (v3 >= this.players.length) break;
this.players[v3] = this.players[v3].split('/');
}
}
}
switch (this.state) {
case 'start':
v3 = 0;
goto 10549;
for (;;) {
++v3;
label 10549:
if (v3 >= this.players.length) break;
if (this.players[v3][0] == this.username) {
if (this.players[v3][1] != 'ready') {
this.butts.start._visible = true;
}
}
}
this.butts.cancel._visible = true;
var v7 = 0;
v3 = 0;
goto 10737;
for (;;) {
++v3;
label 10737:
if (v3 >= this.players.length) break;
if (this.players[v3][1] == 'cancel') {
this.state = 'users';
this.players = new Array();
this.gmsgsend({'gcmd': 'set', 'gnam': this.gamename, 'gvar': 'status', 'gset': 'idle'});
this.thunk();
return undefined;
}
if (this.players[v3][1] == 'ready') {
++v7;
}
}
if (v7 == this.players_max) {
this.butt_press('styles');
this.state = 'starting';
this.thunk();
return undefined;
}
this.thunk_users();
this.butts.cancel._visible = true;
break;
case 'rooms':
this.butts.rooms._visible = true;
this.butts.host._visible = true;
this.butts.users._visible = true;
this.butts.styles._visible = true;
this.butts.pbem._visible = true;
var v2 = '';
v2 += '<p><b>Please select an active gameroom to join or choose to host your own.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 13434828, v2);
this.gizmo_Tlist.str = this.rooms_str;
break;
case 'users':
this.butts.rooms._visible = true;
this.butts.host._visible = true;
this.butts.users._visible = true;
this.butts.styles._visible = true;
this.thunk_users();
break;
case 'styles':
this.butts.rooms._visible = true;
this.butts.host._visible = true;
this.butts.users._visible = true;
this.butts.styles._visible = true;
var v2 = '';
v2 += '<p><b>Behold the style settings of the current game in the current gameroom.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 16777215, v2);
v2 = '';
for (v3 in this.styles) {
if (this.styles[v3]) {
v2 += '<a href="asfunction:_root.lobby.lineclick,style/' + v3 + '">';
v2 += '<b>' + v3 + '</b> : ' + this.styles[v3] + '</a><br>';
}
}
if (this.styles_str == '') {
this.gizmo_Tlist.str = v2;
} else {
this.gizmo_Tlist.str = this.styles_str;
}
break;
case 'starting':
var v2 = '';
v2 += '<p><b>Starting Game.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 16777215, v2);
this.gizmo_Tlist.str = '';
break;
case 'pbem':
this.mc_base._visible = false;
this.mc_pbem._visible = true;
this.butts.ok._visible = true;
this.butts.cancel._visible = true;
var v2 = '';
v2 += '<p><b>Please enter <font color="#00ffff">your email</font> and then the email of the friend you wish to play with. Further instructions will be emailed to you after you click on OK.</b></p>';
gfx.set_text_html(this.mcs[0].tf, 22, 16777215, v2);
break;
case 'pbem_start':
var v2 = '';
v2 += '<p>Preparing the PBEM game for play, click START when the button becomes visible.</p>';
gfx.set_text_html(this.mcs[0].tf, 22, 16777215, v2);
if (this.pbem_str == 'OK') {
this.butts.start._visible = true;
this.gizmo_Tlist.str = 'Game hosting initiated. Press START to continue.';
} else {
this.gizmo_Tlist.str = this.pbem_str;
}
}
if (this.opts.multi == 'arena') {
this.butts.close._visible = false;
this.butts.styles._visible = false;
this.butts.users._visible = false;
this.butts.pickme._visible = false;
this.butts.start._visible = false;
this.butts.watch._visible = false;
this.butts.rejoin._visible = false;
this.butts.pbem._visible = false;
}
};
v1.butt_over = function (s) {
if (_root.lobby != this) {
return undefined;
}
this.butts[s]._alpha = 100;
switch (s) {
case 'close':
_root.poker.ShowFloat('Close this plopup.', 25 * 10);
break;
case 'rooms':
_root.poker.ShowFloat('List the active gamerooms you can join.', 25 * 10);
break;
case 'host':
_root.poker.ShowFloat('Host your own gameroom.', 25 * 10);
break;
case 'styles':
_root.poker.ShowFloat('View or modify the game style settings.', 25 * 10);
break;
case 'users':
_root.poker.ShowFloat('List the available players in your current game room.', 25 * 10);
break;
case 'pickme':
_root.poker.ShowFloat('Signal to the owner of the current gameroom that you wish to play in the next game.', 25 * 10);
break;
case 'start':
_root.poker.ShowFloat('Start the game with the selected players. (All players must click start before the game can begin)', 25 * 10);
break;
case 'cancel':
_root.poker.ShowFloat('Cancel this game start request.', 25 * 10);
break;
case 'watch':
_root.poker.ShowFloat('Watch the game being played in this gameroom.', 25 * 10);
break;
case 'pbem':
_root.poker.ShowFloat('Play with a friend through emails and online.', 25 * 10);
break;
case 'ok':
_root.poker.ShowFloat('Sends a confirmation email to the first address listed above with further instructions.', 25 * 10);
break;
case 'cancel':
_root.poker.ShowFloat('Return to the previous menu.', 25 * 10);
}
};
v1.butt_out = function (s) {
if (_root.lobby != this) {
return undefined;
}
_root.poker.ShowFloat(null, 0);
};
v1.butt_press = function (s) {
if (_root.lobby != this) {
return undefined;
}
switch (s) {
case 'close':
if (this.steady) {
this.up.do_str('lobby_close');
this.done = true;
this.mc.dx = _root.scalar.ox;
}
break;
case 'ok':
if (this.tfs[0].text == 'your@email') {
this.gmsgsend({'gcmd': 'rooms', 'gnam': this.gamename});
} else {
this.gmsgsend({'gcmd': 'rooms', 'gnam': this.gamename});
_root.comms.send_pbemstart(this.gamebasename, this.tfs[0].text, this.tfs[1].text);
this.done = true;
this.mc.dx = _root.scalar.ox;
}
break;
case 'cancel':
case 'rooms':
this.gmsgsend({'gcmd': 'rooms', 'gnam': this.gamename});
break;
case 'host':
if (this.opts.multi == 'arena') {
this.gmsgsend({'gcmd': 'host', 'gnam': this.gamename, 'gvar': 'multi', 'gset': 'arena'});
} else {
this.gmsgsend({'gcmd': 'host', 'gnam': this.gamename, 'gvar': 'multi', 'gset': 'ws'});
this.gmsgsend({'gcmd': 'style', 'gnam': this.gamename, 'gvar': 'seed', 'gset': Math.floor(65536 * Math.random()) & 65535});
}
break;
case 'styles':
this.gmsgsend({'gcmd': 'styles', 'gnam': this.gamename});
break;
case 'users':
this.gmsgsend({'gcmd': 'users', 'gnam': this.gamename});
break;
case 'pickme':
this.gmsgsend({'gcmd': 'set', 'gnam': this.gamename, 'gvar': 'status', 'gset': 'pickme'});
break;
case 'start':
if (this.state == 'pbem_start') {
this.xups.imgurl = _global.escape(_root.Login_Img);
this.check_send_xup();
this.butt_press('styles');
this.state = 'starting';
} else {
if (this.userauth == 'owner') {
if (this.players.length == this.players_max) {
if (this.state != 'start') {
var v3 = '';
var v4 = 0;
goto 14374;
for (;;) {
++v4;
label 14374:
if (v4 >= this.players.length) break;
if (v3 != '') {
v3 += ';';
}
v3 += this.players[v4][0] + '/idle';
}
this.gmsgsend({'gcmd': 'start', 'gnam': this.gamename, 'garg': v3, 'gtyp': 'ready'});
this.xups.imgurl = _global.escape(_root.Login_Img);
this.check_send_xup();
this.gmsgsend({'gcmd': 'set', 'gnam': this.gamename, 'gvar': 'status', 'gset': 'ready'});
this.state = 'start';
}
}
} else {
if (this.state == 'start') {
this.xups.imgurl = _global.escape(_root.Login_Img);
this.check_send_xup();
this.gmsgsend({'gcmd': 'set', 'gnam': this.gamename, 'gvar': 'status', 'gset': 'ready'});
}
}
}
this.thunk();
break;
case 'cancel':
if (this.state == 'start') {
this.gmsgsend({'gcmd': 'set', 'gnam': this.gamename, 'gvar': 'status', 'gset': 'cancel'});
}
break;
case 'rejoin':
case 'watch':
this.watchgame();
break;
case 'pbem':
this.state = 'pbem';
this.thunk();
break;
case 'pbem_start':
this.pbem_str = 'Connecting.';
this.gmsgsend({'gcmd': 'pbem_start', 'gnam': this.gamename, 'gpid': Math.floor(_root.pbem_id), 'gphash0': _global.escape(_root.pbem_hash0), 'gphash1': _global.escape(_root.pbem_hash1)});
this.state = 'pbem_start';
this.thunk();
}
};
v1.gmsgsend = function (msg) {
if (_root.sock.connected) {
if (_root.skip_wetlogin && !this.done_simple_login) {
if (_root.name) {
_root.sock.chat('/login ' + _root.name);
this.done_simple_login = true;
}
}
_root.sock.gmsg(msg, this.delegate(this.gmsgback, msg));
this.lastmsg = msg;
_root.sock.gmsg(null, this.delegate(this.gmsgback, null));
}
};
v1.gmsgback = function (msg, sentmsg) {
if (_root.lobby != this) {
return undefined;
}
if (!sentmsg) {
switch (msg.gcmd) {
case 'start':
this.players = msg.garg.split(';');
var v7 = 0;
goto 15491;
for (;;) {
++v7;
label 15491:
if (v7 >= this.players.length) break;
this.players[v7] = this.players[v7].split('/');
}
this.state = 'start';
this.thunk();
break;
case 'set':
if (msg.gvar == 'status') {
var v7 = 0;
goto 15635;
for (;;) {
++v7;
label 15635:
if (v7 >= this.players.length) break;
var v8 = this.players[v7];
if (v8[0] == msg.guser) {
v8[1] = msg.gset;
} else {}
}
v7 = 1;
goto 15758;
for (;;) {
++v7;
label 15758:
if (v7 >= this.users.length) break;
v8 = this.users[v7];
if (v8[0] == msg.guser) {
v8[1] = msg.gset;
} else {}
}
if (v7 == this.users.length) {
this.users[v7] = new Array();
this.users[v7][0] = msg.guser;
this.users[v7][1] = msg.gset;
this.users[msg.guser] = this.users[v7];
this.users[v7].name = msg.guser;
this.users[v7].state = msg.gset;
}
this.check_send_ups();
this.thunk();
}
break;
case 'style':
this.styles[msg.gvar] = msg.gset;
this.thunk();
break;
default:
}
} else {
switch (sentmsg.gcmd) {
case 'rooms':
var v6 = msg.gret.split(',');
if (v6[0] == 'OK') {
this.rooms = new Array();
var v5 = '';
v5 += this.gamename + ' : ' + 'searching' + '<br><br>';
var v7 = 1;
goto 16365;
for (;;) {
++v7;
label 16365:
if (v7 >= v6.length) break;
var v8 = v6[v7].split(':');
this.rooms[v7] = v8;
v5 += '<a href="asfunction:_root.lobby.lineclick,room/' + v7 + '">';
v5 += '<b>' + v8[0] + '</b> : ' + v8[1] + ' : ' + v8[3] + '</a><br>';
}
this.rooms_str = v5;
} else {
this.rooms_str = msg.gret;
}
this.state = 'rooms';
this.thunk();
break;
case 'styles':
var v6 = msg.gret.split(',');
if (v6[0] == 'OK') {
this.styles = new Array();
var v7 = 1;
goto 16666;
for (;;) {
++v7;
label 16666:
if (v7 >= v6.length) break;
var v8 = v6[v7].split(':');
this.styles[v8[0]] = v8[1];
}
this.styles_str = '';
} else {
this.styles_str = msg.gret;
}
if (this.state == 'starting') {
this.startgame();
} else {
this.state = 'styles';
this.thunk();
}
if (this.opts.multi == 'arena') {
this.exit();
}
break;
case 'users':
var v6 = msg.gret.split(',');
if (v6[0] == 'OK') {
this.users = new Array();
var v7 = 1;
goto 16975;
for (;;) {
++v7;
label 16975:
if (v7 >= v6.length) break;
var v8 = v6[v7].split(':');
v8.name = v8[0];
v8.status = v8[1];
this.users[v7] = v8;
this.users[v8.name] = v8;
}
v6 = msg.gret2.split(',');
this.owners = new Array();
this.username = 'me';
this.userauth = 'user';
v7 = 0;
goto 17184;
for (;;) {
++v7;
label 17184:
if (v7 >= v6.length) break;
this.owners[v7] = v6[v7];
if (v7 > 0) {
if (v6[v7] == v6[0].toLowerCase()) {
this.userauth = 'owner';
}
} else {
this.username = v6[0];
}
}
this.users_str = '';
} else {
this.users_str = msg.gret;
}
if (this.state != 'pbem_start') {
this.players = new Array();
this.state = 'users';
}
this.thunk();
break;
case 'host':
var v6 = msg.gret.split(',');
if (v6[0] == 'OK') {
if (this.opts.multi == 'arena') {
this.gizmo_Tlist.str = 'Game arena hosting initiated.';
this.butt_press('styles');
} else {
this.gizmo_Tlist.str = 'Game hosting initiated. Fetching list of users in room.';
this.butt_press('styles');
this.butt_press('users');
}
} else {
this.gizmo_Tlist.str = msg.gret;
}
break;
case 'pbem_start':
var v6 = msg.gret.split(',');
if (v6[0] == 'OK') {
this.pbem_str = 'OK';
} else {
this.pbem_str = msg.gret;
}
this.thunk();
break;
case 'set':
break;
case 'start':
default:
}
}
};
v1.lineclick = function (str) {
if (_root.lobby != this) {
return undefined;
}
var v3 = str.split('/');
switch (v3[0]) {
case 'room':
_root.sock.chat('/join ' + this.rooms[Math.floor(v3[1])][0]);
this.butt_press('styles');
this.butt_press('users');
break;
case 'user':
if (this.userauth == 'owner' && this.state != 'start') {
var v5 = Math.floor(v3[1]);
if (v5 == 0) {
this.players = new Array();
} else {
if (this.users[v5]) {
var v4 = 0;
goto 18090;
for (;;) {
++v4;
label 18090:
if (v4 >= this.players.length) break;
if (this.players[v4][0] == this.users[v5][0]) {
} else {}
}
if (v4 == this.players.length) {
if (this.players.length == this.players_max) {
this.players = new Array();
}
this.players[this.players.length] = [this.users[v5][0], 'idle'];
}
}
}
this.check_send_ups();
}
this.thunk();
}
};
v1.check_send_ups = function () {
var v3 = '';
var v2 = 0;
goto 18392;
for (;;) {
++v2;
label 18392:
if (v2 >= this.players.length) break;
if (v3 != '') {
v3 += ';';
}
v3 += this.players[v2][0] + '/' + this.players[v2][1];
}
if (v3 == '') {
v3 = '-';
}
if (this.styles.ups != v3 && this.userauth == 'owner') {
this.gmsgsend({'gcmd': 'style', 'gnam': this.gamename, 'gvar': 'ups', 'gset': v3});
this.styles.ups = v3;
}
};
v1.check_send_xup = function () {
var v2 = null;
var v3 = 0;
goto 18700;
for (;;) {
++v3;
label 18700:
if (v3 >= this.players.length) break;
if (this.username == this.players[v3][0]) {
v2 = v3 + 1 + 'up';
} else {}
}
if (!v2) {
return undefined;
}
var v4 = '';
for (v3 in this.xups) {
v4 += '&' + v3 + '=' + this.xups[v3];
}
v4 = Clown.str_to_pak(v4);
if (this.styles[v2] != v4) {
this.gmsgsend({'gcmd': 'style', 'gnam': this.gamename, 'gvar': v2, 'gset': v4});
this.styles[v2] = v4;
}
};
v1.onRelease = function () {
if (_root.lobby != this) {
return undefined;
}
if (this.steady) {
this.done = true;
this.mc.dx = _root.scalar.ox;
}
};
v1.update = function () {
if (_root.lobby != this || _root.pause) {
return undefined;
}
this.update_gizmos(_root.poker.snapshot());
for (var v2 in this.butts) {
var v3 = this.butts[v2];
if (v3._alpha != v3._alpha_dest) {
if (v3._alpha_dest > v3._alpha) {
v3._alpha += 1;
} else {
if (v3._alpha_dest < v3._alpha) {
v3._alpha -= 1;
}
}
}
}
this.mc._x += (this.mc.dx - this.mc._x) / 4;
if ((this.mc._x - this.mc.dx) * (this.mc._x - this.mc.dx) < 16 * 16) {
this.steady = true;
if (this.done) {
this.exit();
}
} else {
this.steady = false;
}
};
v1.new_butt = function (id, s, x, y, w, h, mcu) {
if (mcu) {
var v9 = gfx.create_clip(mcu, null);
v9._x = x;
v9._y = y;
this.set_butt(v9, id);
v9.tf = gfx.create_text_html(v9, null, 0, 0, w, h + 4);
gfx.clear(v9);
v9.style.fill = -2147483648;
v9.style.out = -2147483648;
gfx.draw_box(v9, 3, -4, -4, w + 8, h + 8);
gfx.set_text_html(v9.tf, 16, 16777215, s);
v9._alpha_dest = 60;
v9._alpha = v9._alpha_dest;
this.butts[id] = v9;
v9.cacheAsBitmap = true;
return v9;
}
v9 = gfx.create_clip(this.mc_base, null);
v9._x = x;
v9._y = y;
this.set_butt(v9, id);
v9.tf = gfx.create_text_html(v9, null, 0, 0, w, h + 4);
gfx.clear(v9);
v9.style.fill = -2147483648;
v9.style.out = -2147483648;
gfx.draw_box(v9, 3, -4, -4, w + 8, h + 8);
gfx.set_text_html(v9.tf, 16, 16777215, s);
v9._alpha_dest = 60;
v9._alpha = v9._alpha_dest;
this.butts[id] = v9;
v9.cacheAsBitmap = true;
return v9;
};
v1.set_butt = function (b, id) {
b.onRollOver = this.delegate(this.butt_over, id);
b.onRollOut = this.delegate(this.butt_out, id);
b.onReleaseOutside = this.delegate(this.butt_out, id);
b.onRelease = this.delegate(this.butt_press, id);
};
v1.update_gizmos = function (snapshot) {
this.gizmo.mc.globalToLocal(snapshot);
this.gizmo.focus = this.gizmo.input(snapshot);
this.gizmo.update();
};
v1.setup_gizmos = function () {
var v9 = [23, 4, 8];
var v3 = 360;
var v4 = 400;
var v5 = 20;
this.gizmo = new GizmoMaster({'mc': this.mc_base});
this.gizmo.top = this.gizmo;
var v6 = this.gizmo;
v6.set_area(150, 100, v3, v4);
var v10 = 0;
var v8 = this.gizmo;
v6 = v8.child(new Gizmo(v8));
v6.set_area(0, v10 * v5, v3, v9[0] * v5);
this.gizmoT = v6;
v10 += v9[0];
v6 = v8.child(new Gizmo(v8));
v6.set_area(0, v10 * v5, v3, v9[1] * v5);
this.gizmoM = v6;
v10 += v9[1];
v6 = v8.child(new Gizmo(v8));
v6.set_area(0, v10 * v5, v3, v9[2] * v5);
this.gizmoB = v6;
v8 = this.gizmoT;
v6 = v8.child(new Gizmo(v8));
v6.set_area(v3 - v5 * 1, v5, v5, (v9[0] - 1) * v5);
v6.mc.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.draw_boxen(v6.mc, 0, 0, v6.w, v6.h);
this.gizmo_Tscroll = v6;
v8 = v6;
v6 = v8.child(new GizmoKnob(v8));
v6.set_area(0, v8.h - v5 * 4, v5, v5 * 4);
var v7 = gfx.create_clip(v6.mc, null, 0, 0, 100, 100);
v7.style = {'fill': -2147483648 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.draw_puck(v7, 0, 0, v5, v5 * 4);
v6.mc_base = v7;
v7 = gfx.create_clip(v6.mc, null, 0, 0, 100, 100);
v7.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.draw_puck(v7, 0, 0, v5, v5 * 4);
v6.mc_over = v7;
v7 = gfx.create_clip(v6.mc, null, 0, 0, 100, 100);
v7.style = {'fill': -16777216 + this.foreground, 'out': -16777216 + this.foreground, 'text': -16777216 + this.foreground};
this.draw_puck(v7, 0, 0, v5, v5 * 4);
v6.mc_down = v7;
this.gizmo_Tscroll_knob = v6;
v8 = this.gizmoT;
v6 = v8.child(new GizmoText(v8));
v6.set_area(0, v5, v3 - v5 * 1, (v9[0] - 1) * v5);
v6.tf_fmt.size = v5 - 2;
v6.tf_fmt.color = -16777216 + this.foreground;
v6.vgizmo = this.gizmo_Tscroll_knob;
this.gizmo_Tlist = v6;
this.gizmo_Titems = [];
this.gizmo.update();
};
v1.draw_boxen = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9, y + v9);
mc.lineTo(x + w - v9, y + v9);
mc.lineTo(x + w - v9, y + h - v9);
mc.lineTo(x + v9, y + h - v9);
mc.lineTo(x + v9, y + v9);
mc.moveTo(x + v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + v9 * 2);
mc.lineTo(x + w - v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + h - v9 * 2);
mc.lineTo(x + v9 * 2, y + v9 * 2);
mc.endFill();
};
v1.draw_puck = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9 * 3, y + v9 * 3);
mc.lineTo(x + w - v9 * 3, y + v9 * 3);
mc.lineTo(x + w - v9 * 3, y + h - v9 * 3);
mc.lineTo(x + v9 * 3, y + h - v9 * 3);
mc.lineTo(x + v9 * 3, y + v9 * 3);
mc.endFill();
};
v1.draw_box = function (mc, x, y, w, h) {
var v7 = w / 16;
var v8 = h / 16;
var v9 = v7;
if (v9 > v8) {
v9 = v8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.moveTo(x + v9 * 1, y + v9 * 1);
mc.lineTo(x + w - v9 * 1, y + v9 * 1);
mc.lineTo(x + w - v9 * 1, y + h - v9 * 1);
mc.lineTo(x + v9 * 1, y + h - v9 * 1);
mc.lineTo(x + v9 * 1, y + v9 * 1);
mc.endFill();
};
ASSetPropFlags(v1, null, 1);
v1.username = 'me';
v1.userauth = 'user';
v1.players_max = 2;
v1.done_simple_login = false;
v1.foreground = 16777215;
v1.background = 32768;
}
#endinitclip
}
movieClip 20506 __Packages.Gizmo {
#initclip
if (!Gizmo) {
_global.Gizmo = function (_up) {
this.up = _up;
this.setup();
};
var v1 = _global.Gizmo.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 639;
for (;;) {
++v2;
label 639:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 834;
for (;;) {
++v2;
label 834:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.Gizmo.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = Gizmo.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1206;
for (;;) {
++v3;
label 1206:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.setup = function () {
this.setup_base();
};
v1.clean = function () {
this.clean_base();
};
v1.update = function () {
this.update_base();
};
v1.input = function (snapshot) {
this.focus = this.input_base(snapshot);
return this.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20507 __Packages.PlayHigh {
#initclip
if (!PlayHigh) {
_global.PlayHigh = function (_up, stropts) {
this.up = _up;
this.play = this.up.play;
this.hide_last = false;
this.show_hash = false;
if (stropts) {
var v6 = stropts.split(',');
var v4 = 0;
goto 3288;
for (;;) {
++v4;
label 3288:
if (v4 >= v6.length) break;
var v5 = v6[v4].split('=');
switch (v5[0]) {
case 'show_hash':
this.show_hash = true;
break;
case 'hide_last':
this.hide_last = true;
break;
case 'results':
this.results = v5[1];
continue;
}
}
}
this.rank = this.new_reset_scores();
this.high = this.new_reset_scores();
this.last = this.new_reset_scores();
this.state = 'high';
this.filter = 'global';
if (this.up.high_state) {
this.state = this.up.high_state;
}
if (this.up.high_filter) {
this.filter = this.up.high_filter;
}
};
var v1 = _global.PlayHigh.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.new_reset_scores = function () {
var v2 = new Array();
var v3 = 0;
goto 3744;
for (;;) {
++v3;
label 3744:
if (v3 >= 10) break;
v2[v3] = '0;Fetching...';
}
return v2;
};
v1.days_to_string = function (days) {
if (this.show_hash) {
return '#' + days;
}
var v3 = new Date();
v3.setTime(days * 24 * 60 * 60 * 1000);
var v4 = alt.Sprintf.format('%04d%02d%02d', v3.getFullYear(), v3.getMonth() + 1, v3.getDate());
return v4;
};
v1.setup = function (usestate) {
if (_root.skip_wetlogin) {
return undefined;
}
if (!this.finished) {
return undefined;
}
this.finished = false;
this.state = 'done';
this.retry = false;
if (_root.signals.ranksys == 'max') {
this.hide_last = true;
}
if (this.state != 'high' && (this.state != 'rank' && this.state != 'last')) {
this.state = 'high';
}
if (this.hide_last || this.show_hash) {
if (this.state == 'last') {
this.state = 'high';
}
}
if (this.show_hash) {
if (this.state == 'rank') {
this.state = 'high';
}
}
if (usestate) {
this.state = usestate;
}
_root.popup = this;
this.mcs = new Array();
this.tfs = new Array();
this.mcb = gfx.create_clip(_root.mc_popup, null);
if (_root.scalar.oy == 600) {
this.mc = this.mcb;
} else {
this.mcb._xscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mcb._yscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mc = gfx.create_clip(this.mcb, null);
}
this.mcb.cacheAsBitmap = true;
gfx.dropshadow(this.mc, 5, 45, 0, 1, 20, 20, 2, 3);
this.mc._y = 0;
this.mc.dx = 0;
this.mc._x = -800;
this.do_exit = false;
this.not_do_exit = 30;
this.done = false;
this.steady = false;
this.do_mochi = false;
gfx.clear(this.mc);
this.mc.style.out = -16777216;
this.mc.style.fill = 1342177280;
gfx.draw_box(this.mc, 0, 100 + 16, +16, 600 - 32, 600 - 32);
switch (this.state) {
case 'results':
this.mc_top = gfx.create_clip(this.mc, null, 100, 25);
this.tf_top = gfx.create_text_html(this.mc_top, null, 0, 0, 600, 50);
this.mc_top.onRelease = this.delegate(this.click, 'top');
this.mc_text = gfx.create_clip(this.mc, null, 150, 100);
this.tf_text = gfx.create_text_html(this.mc_text, null, 0, 0, 500, 300);
this.mc_text.onRelease = this.delegate(this.click, 'text');
this.mc_whore = gfx.create_clip(this.mc, null, 200, 425);
this.mc_whore.onRelease = this.delegate(this.click, 'whore');
this.mc_whore.text = gfx.create_text_html(this.mc_whore, null, 175, 0, 250, 175);
break;
default:
this.mc_res = gfx.create_clip(this.mc, null);
var v7 = 0;
var v3 = 0;
goto 5455;
for (;;) {
++v3;
label 5455:
if (v3 >= 10) break;
this.mcs[v3] = gfx.create_clip(this.mc_res, null, 0, 25 + 150 + v3 * 40);
this.mcs[v3].onRelease = this.delegate(this.click, 'score' + v3);
this.mcs[v3].onRollOver = this.delegate(this.over_on, 'score' + v3);
this.mcs[v3].onRollOut = this.delegate(this.over_off, 'score' + v3);
this.mcs[v3].onReleaseOutside = this.delegate(this.over_off, 'score' + v3);
this.tfs[v7] = gfx.create_text_html(this.mcs[v3], null, 50, 0, 200, 50);
++v7;
this.tfs[v7] = gfx.create_text_html(this.mcs[v3], null, 250, 0, 150, 50);
++v7;
this.tfs[v7] = gfx.create_text_html(this.mcs[v3], null, 400, 0, 550, 50);
++v7;
}
this.mc_top = gfx.create_clip(this.mc, null, 100, 25);
this.tf_top = gfx.create_text_html(this.mc_top, null, 0, 0, 600, 50);
this.mc_top.onRelease = this.delegate(this.click, 'top');
this.mc_topunder = gfx.create_clip(this.mc, null, 100, 75 - 10);
this.tf_topunder = gfx.create_text_html(this.mc_topunder, null, 0, 0, 600, 25);
this.mc_topunder.onRelease = this.delegate(this.click, 'topunder');
this.mc_topsub = gfx.create_clip(this.mc, null, 100, 100);
}
var v3 = 0;
goto 6287;
for (;;) {
++v3;
label 6287:
if (v3 >= this.icon_nams.length) break;
var v9 = this.icon_nams[v3];
this.mc_topsub[v9] = gfx.add_clip(this.mc_topsub, 'icon_' + v9, null, 300 - 20 * this.icon_nams.length + v3 * 40, 10, 200, 200);
gfx.glow(this.mc_topsub[v9], 16777215, 1, 8, 8, 1, 1, false, false);
this.mc_topsub[v9]._alpha = 50;
this.mc_topsub[v9].id = v9;
this.mc_topsub[v9].idx = v3;
this.mc_topsub[v3] = this.mc_topsub[v9];
this.mc_topsub[v3].onRelease = this.delegate(this.click, v9);
this.mc_topsub[v3].onRollOver = this.delegate(this.over_on, v9);
this.mc_topsub[v3].onRollOut = this.delegate(this.over_off, v9);
this.mc_topsub[v3].onReleaseOutside = this.delegate(this.over_off, v9);
}
if (this.hide_last) {
this.mc_topsub.last._visible = false;
}
if (this.show_hash) {
this.mc_topsub.last._visible = false;
this.mc_topsub.rank._visible = false;
this.mc_topsub.day._visible = false;
}
this.thunk();
this.get_high();
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
_root.poker.clear_clicks();
};
v1.clean = function () {
if (_root.popup != this) {
return undefined;
}
this.finished = true;
this.mc_whore = null;
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
this.mcb.removeMovieClip();
this.mc.removeMovieClip();
_root.popup = null;
if (this.up.next_game_seed) {
this.up.do_str('restart');
}
this.up.high_state = this.state;
this.up.high_filter = this.filter;
_root.poker.clear_clicks();
this.state = 'done';
};
v1.get_high = function () {
if (this.state == 'rank') {
this.rank = this.new_reset_scores();
} else {
if (this.state == 'high') {
this.high = this.new_reset_scores();
} else {
if (this.state == 'last') {
this.last = this.new_reset_scores();
} else {
return undefined;
}
}
}
++this.high_id;
_root.comms.get_high(this.state, this.filter, this.delegate(this.got_high, this.high_id));
};
v1.got_high = function (a, tid) {
if (tid == this.high_id) {
if (this.state == 'rank') {
this.rank = a;
} else {
if (this.state == 'high') {
this.high = a;
} else {
if (this.state == 'last') {
this.last = a;
}
}
}
this.thunk();
}
};
v1.thunk = function () {
var v2 = 0;
goto 7709;
for (;;) {
++v2;
label 7709:
if (v2 >= this.icon_nams.length) break;
this.mc_topsub[v2]._alpha = 50;
}
if (this.state == 'rank' || (this.state == 'high' || this.state == 'last')) {
var v5 = 0;
v2 = 0;
goto 7866;
for (;;) {
++v2;
label 7866:
if (v2 >= 10) break;
if (this.state == 'rank') {
var v3 = this.rank[v2].split(';');
} else {
if (this.state == 'high') {
var v3 = this.high[v2].split(';');
} else {
if (this.state == 'last') {
var v3 = this.last[v2].split(';');
}
}
}
if (v3[1].indexOf('_') != -1) {
v3[1] = (v3[1].split('_')).join(' ');
}
var v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="28" color="#ffffff">';
v4 += '<p align="right"><b>';
v4 += v3[0];
v4 += '</b></p>';
v4 += '</font>';
this.tfs[v5].htmlText = v4;
++v5;
if (this.state == 'last') {
v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="8" color="#ffffff">';
v4 += '<br></font>';
v4 += '<font face="Bitstream Vera Sans" size="16" color="#ffffff">';
v4 += '<p align="center"><b>';
if (v3[2]) {
v4 += this.days_to_string(v3[2]);
} else {
v4 += '#';
}
v4 += '</b></p>';
v4 += '</font>';
this.tfs[v5].htmlText = v4;
} else {
v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="28" color="#ffffff">';
v4 += '<p align="center"><b>';
v4 += this.str_numst[v2];
v4 += '</b></p>';
v4 += '</font>';
this.tfs[v5].htmlText = v4;
}
++v5;
v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="28" color="#ffffff">';
v4 += '<p align="left"><b>';
v4 += v3[1];
v4 += '</b></p>';
v4 += '</font>';
this.tfs[v5].htmlText = v4;
++v5;
}
v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="14" color="#888888">';
v4 += '<p align="center"><b>';
switch (this.state) {
case 'rank':
v4 += 'Click title above to cycle views<br>';
v4 += 'Click here to cycle filters<br>';
v4 += 'Click anywhere else to exit<br>';
this.mc_topsub.rank._alpha = 100;
break;
case 'high':
v4 += 'Click title above to cycle views<br>';
v4 += 'Click here to cycle filters<br>';
v4 += 'Click anywhere else to exit<br>';
this.mc_topsub.day._alpha = 100;
break;
case 'last':
v4 += 'Click title above to cycle view<br>';
v4 += 'Click a score below to play that game<br>';
v4 += 'Click anywhere else to exit<br>';
this.mc_topsub.last._alpha = 100;
break;
case 'mochi':
this.mc_topsub.mochi._alpha = 100;
}
v4 += '</b></p>';
v4 += '</font>';
this.tf_topsub.htmlText = v4;
v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="16" color="#cccccc">';
v4 += '<p align="center"><b>';
switch (this.state) {
case 'rank':
case 'high':
switch (this.filter) {
case 'global':
v4 += 'no filter';
this.mc_topsub.guest._alpha = 100;
break;
case 'registered':
v4 += 'showing registered users only';
this.mc_topsub.registered._alpha = 100;
break;
case 'friends':
v4 += 'showing friends only';
}
break;
case 'last':
}
v4 += '</b></p>';
v4 += '</font>';
this.tf_topunder.htmlText = v4;
} else {
if (this.state == 'mochi') {
if (!this.do_mochi) {
this.do_mochi = true;
mochi.MochiScores.showLeaderboard({'res': '540x450', 'onClose': this.delegate(this.mochi_close)});
this.mc_res._visible = false;
this.mc_topunder._visible = false;
this.mc_topsub._visible = false;
_root.poker.ShowFloat(null, 0);
}
} else {
if (this.state == 'results') {
switch (this.results) {
case 'bowwow':
var v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="26" color="#ffffff">';
v4 += '<p align="center">';
v4 += 'You scored <b>' + this.play.score + '</b>pts<br><br>';
v4 += '<b>Click here</b> or press anykey to continue.<br><br>';
v4 += '</p>';
v4 += '</font>';
this.tf_text.htmlText = v4;
break;
default:
var v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="28" color="#ffffff">';
v4 += '<p align="center">';
v4 += '<b>Click here</b> to return to the menu or press anykey to try again.<br><br>';
v4 += 'You scored <b>' + this.play.scores_best_new + '</b>pts<br><br>';
if (this.play.scores_best_old < this.play.scores_best_new) {
v4 += 'Congratulations, that\'s a whole <b>' + (this.play.scores_best_new - this.play.scores_best_old) + '</b>pts better than ' + this.play.scores_best_old + 'pts.<br><br>';
} else {
v4 += 'Your previous best score was <b>' + this.play.scores_best_old + '</b>pts<br><br>';
}
v4 += '</p>';
v4 += '</font>';
this.tf_text.htmlText = v4;
}
}
}
}
var v4 = '';
v4 += '<font face="Bitstream Vera Sans" size="28" color="#ffffff">';
v4 += '<p align="center"><b>';
switch (this.state) {
case 'rank':
if (_root.signals.ranksys == 'max') {
v4 += 'Highest scores in last 10 days.<br>';
} else {
v4 += 'Rankings, last 10 days added.<br>';
}
break;
case 'high':
v4 += 'High scores for ' + this.days_to_string(this.up.game_seed) + '.<br>';
break;
case 'last':
v4 += 'Your last 10 scores.<br>';
break;
case 'results':
v4 += 'Congratulations!<br>';
break;
case 'mochi':
v4 += 'Checking Mochi Bucket for scores.<br>';
}
v4 += '</b></p>';
v4 += '</font>';
this.tf_top.htmlText = v4;
};
v1.mochi_close = function () {
this.do_mochi = false;
this.state = 'high';
this.get_high();
this.thunk();
this.not_do_exit = 5;
this.mc_res._visible = true;
this.mc_top._visible = true;
this.mc_topunder._visible = true;
this.mc_topsub._visible = true;
};
v1.over_on = function (s) {
if (this.do_mochi) {
return undefined;
}
switch (s) {
case 'score0':
this.showgame(0);
break;
case 'score1':
this.showgame(1);
break;
case 'score2':
this.showgame(2);
break;
case 'score3':
this.showgame(3);
break;
case 'score4':
this.showgame(4);
break;
case 'score5':
this.showgame(5);
break;
case 'score6':
this.showgame(6);
break;
case 'score7':
this.showgame(7);
break;
case 'score8':
this.showgame(8);
break;
case 'score9':
this.showgame(9);
break;
case 'day':
_root.poker.ShowFloat('Show scores for todays game.', 25 * 5);
this.highlight_icon(s, true);
break;
case 'rank':
_root.poker.ShowFloat('Show rank. This is built using scores from the last 10 days.', 25 * 5);
this.highlight_icon(s, true);
break;
case 'last':
_root.poker.ShowFloat('Your score each day for the last 10 days. Play these games again to improve your rank.', 25 * 5);
this.highlight_icon(s, true);
break;
case 'guest':
_root.poker.ShowFloat('Show scores of all players.', 25 * 5);
this.highlight_icon(s, true);
break;
case 'registered':
_root.poker.ShowFloat('Show registered players scores only.', 25 * 5);
this.highlight_icon(s, true);
break;
case 'mochi':
_root.poker.ShowFloat('Display a Mochi Bucket of scores.', 25 * 5);
this.highlight_icon(s, true);
break;
case 'close':
_root.poker.ShowFloat('Close this plopup. Clicking almost anywhere also closes this plopup.', 25 * 5);
this.highlight_icon(s, true);
}
};
v1.highlight_icon = function (nam, onoff) {
if (this.mc_topsub[nam]._alpha < 100) {
if (onoff) {
this.mc_topsub[nam]._alpha = 75;
} else {
this.mc_topsub[nam]._alpha = 50;
}
}
};
v1.over_off = function (s) {
if (this.do_mochi) {
return undefined;
}
this.highlight_icon(s, false);
_root.poker.ShowFloat(null, 0);
};
v1.click = function (s) {
if (this.do_mochi) {
this.mochi_close();
return undefined;
}
switch (s) {
case 'whore':
if (_root.wonderfulls[0].url) {
getURL(_root.wonderfulls[0].url, '_blank');
}
if (this.state == 'results') {
if (this.steady) {
this.do_exit = true;
}
}
break;
case 'text':
if (this.state == 'results') {
if (this.steady) {
this.do_exit = true;
}
}
break;
break;
case 'top':
case 'mochi':
if (this.state != 'mochi') {
this.state = 'mochi';
this.thunk();
}
this.not_do_exit = 5;
break;
case 'day':
if (this.state != 'high') {
this.state = 'high';
this.get_high();
this.thunk();
}
this.not_do_exit = 5;
break;
case 'rank':
if (this.state != 'rank') {
this.state = 'rank';
this.get_high();
this.thunk();
}
this.not_do_exit = 5;
break;
case 'last':
if (this.state != 'last') {
this.state = 'last';
this.get_high();
this.thunk();
}
this.not_do_exit = 5;
break;
case 'guest':
if (this.filter != 'global') {
this.filter = 'global';
this.get_high();
this.thunk();
}
this.not_do_exit = 5;
break;
case 'registered':
if (this.filter != 'registered') {
this.filter = 'registered';
this.get_high();
this.thunk();
}
this.not_do_exit = 5;
break;
break;
case 'topunder':
break;
case 'topsub':
case 'score0':
this.gotoplaygame(0);
break;
case 'score1':
this.gotoplaygame(1);
break;
case 'score2':
this.gotoplaygame(2);
break;
case 'score3':
this.gotoplaygame(3);
break;
case 'score4':
this.gotoplaygame(4);
break;
case 'score5':
this.gotoplaygame(5);
break;
case 'score6':
this.gotoplaygame(6);
break;
case 'score7':
this.gotoplaygame(7);
break;
case 'score8':
this.gotoplaygame(8);
break;
case 'score9':
this.gotoplaygame(9);
break;
}
};
v1.gotoplaygame = function (num) {
if (this.state == 'last') {
var v3 = this.last[num].split(';');
if (v3[2]) {
this.up.next_game_seed = Math.floor(v3[2]);
if (this.up.next_game_seed == this.up.game_seed) {
this.up.next_game_seed = null;
}
}
this.state = 'high';
}
};
v1.showgame = function (num) {
if (this.state == 'last') {
var v3 = this.last[num].split(';');
if (v3[2]) {
var v4 = this.days_to_string(Math.floor(v3[2]));
_root.poker.ShowFloat('Clicking here will end this game and start the game for ' + v4 + ' so be careful...', 25 * 5);
}
}
};
v1.statechange = function () {
switch (this.state) {
break;
case 'results':
case 'high':
this.state = 'rank';
break;
case 'rank':
if (this.hide_last || this.show_hash) {
this.state = 'high';
} else {
this.state = 'last';
}
break;
case 'last':
this.state = 'high';
break;
default:
this.state = 'high';
}
this.get_high();
this.thunk();
};
v1.filterchange = function () {
switch (this.filter) {
case 'global':
this.filter = 'registered';
break;
case 'registered':
this.filter = 'global';
break;
case 'friends':
this.filter = 'global';
}
this.get_high();
this.thunk();
};
v1.click_str = function (id) {
var v3 = id.split('_');
trace(v3);
switch (v3[0]) {
case 'none':
break;
break;
case 'submit':
}
};
v1.update = function () {
var v3 = this.mc._xmouse > 0 && (this.mc._ymouse > 0 && (this.mc._xmouse < 800 && this.mc._ymouse < 600));
if (!this.do_mochi) {
if (_root.popup == this && (_root.poker.anykey && v3)) {
if (this.steady) {
if (!this.do_exit) {
if (this.state == 'results') {
this.retry = true;
}
this.do_exit = true;
}
}
}
}
if (_root.popup != this || _root.pause) {
return undefined;
}
if (this.mc_whore) {
if (!this.mc_whore.ad) {
if (_root.wonderfulls) {
this.mc_whore.ad = gfx.create_clip(this.mc_whore, null);
this.mc_whore.ad.loadMovie(_root.wonderfulls[0].img);
var v2 = '';
v2 += '<font face="Bitstream Vera Sans" size="24" color="#ffffff">';
v2 += '<p align="center">';
v2 += _root.wonderfulls[0].txt;
v2 += '</p>';
v2 += '</font>';
this.mc_whore.text.htmlText = v2;
}
}
}
this.mc._x += (this.mc.dx - this.mc._x) / 4;
if ((this.mc._x - this.mc.dx) * (this.mc._x - this.mc.dx) < 16 * 16) {
this.steady = true;
if (this.done) {
this.clean();
}
} else {
this.steady = false;
}
if (this.do_exit && this.not_do_exit == 0) {
this.done = true;
this.mc.dx = _root.scalar.ox;
}
this.do_exit = false;
if (this.not_do_exit > 0) {
--this.not_do_exit;
}
};
ASSetPropFlags(v1, null, 1);
v1.icon_nams = ['mochi', 'day', 'rank', 'last', 'guest', 'registered', 'close'];
v1.results = '';
v1.finished = true;
v1.str_numst = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th'];
v1.hide_last = false;
v1.show_hash = false;
v1.high_id = 0;
}
#endinitclip
}
movieClip 20508 __Packages.PlayHUD {
#initclip
if (!PlayHUD) {
_global.PlayHUD = function (_up) {
this.up = _up;
};
var v1 = _global.PlayHUD.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.days_to_string = function (days) {
var v3 = new Date();
v3.setTime(days * 24 * 60 * 60 * 1000);
var v4 = alt.Sprintf.format('%04d%02d%02d', v3.getFullYear(), v3.getMonth() + 1, v3.getDate());
return v4;
};
v1.setup = function () {
this.last_artist = '';
this.last_track = '';
this.mc = gfx.create_clip(this.up.mc, null);
this.mc_play = gfx.create_clip(this.mc, null);
this.tf_play = gfx.create_text_html(this.mc_play, null, 800 - 200, 10, 200, 100 + 10);
this.set_butt(this.mc_play, 'mp3');
this.points = 0;
this.points1 = 0;
this.points2 = 0;
this.chaser = 0;
this.butts = [];
this.butt_ids = {};
this.tf_rgbs = [];
this.mcs = new Array();
var v2 = 0;
goto 3926;
for (;;) {
++v2;
label 3926:
if (v2 >= PlayHUD.interface_lines.length) break;
var v3 = PlayHUD.interface_lines[v2];
var v4 = v3.split(',');
var v5 = v4[0];
var v6 = v5.split('_');
var v7 = gfx.add_clip(this.mc, 'swf_interface', null);
v7.gotoAndStop(v2 + 1);
v7._visible = false;
v7.nam = v5;
v7.nams = v6;
switch (v6[0]) {
case 'back':
v7._visible = true;
break;
case 'play':
switch (v6[1]) {
case 'counters':
v7._visible = true;
break;
case 'single':
case 'score1':
if (!this.up.gamecomms) {
v7._visible = true;
}
break;
case 'restart':
case 'menu':
if (!this.up.gamecomms) {
v7._visible = true;
this.make_button(v7);
}
}
}
v7.cacheAsBitmap = true;
this.mcs[v2] = v7;
this.mcs[v5] = v7;
}
if (!this.up.gamecomms) {
this.mc_pts1 = gfx.create_clip(this.mc, null);
this.mc_pts1.nam = 'score';
this.make_button(this.mc_pts1);
this.tf_pts1 = gfx.create_text_html(this.mc_pts1, null, 200 + 10, 20 - 20, 400 - 20, 60);
this.mc_rgbs = gfx.create_clip(this.mc, null);
gfx.dropshadow(this.mc_rgbs, 2, 45, 0, 1, 4, 4, 2, 3);
this.tf_rgbs[0] = gfx.create_text_html(this.mc_rgbs, null, 200 + 75, 550 - 10, 50, 50);
this.tf_rgbs[1] = gfx.create_text_html(this.mc_rgbs, null, 250 + 75, 550 - 10, 50, 50);
this.tf_rgbs[2] = gfx.create_text_html(this.mc_rgbs, null, 300 + 75, 550 - 10, 50, 50);
this.tf_rgbs[3] = gfx.create_text_html(this.mc_rgbs, null, 350 + 75, 550 - 10, 50, 50);
this.tf_rgbs[4] = gfx.create_text_html(this.mc_rgbs, null, 400 + 75, 550 - 10, 50, 50);
this.mc2 = gfx.create_clip(this.mc, null, 800 - 160, 230, 125, 125);
this.set_butt(this.mc2, 'name1');
this.mc2.tf = gfx.create_text_html(this.mc2, null, 0, 100, 100, 30);
gfx.set_text_html(this.mc2.tf, 16, -1, '<p align=\'center\'><b>' + _root.Login_Name + '</b></p>');
_root.bmc.clear_loading();
_root.bmc.remember('Login_Img', bmcache.create_url, {'url': _root.Login_Img, 'bmpw': 100, 'bmph': 100, 'hx': 0, 'hy': 0});
this.mc3 = null;
} else {
this.mc_turn = gfx.create_clip(this.mc, null);
this.mc_turn.tf = gfx.create_text_html(this.mc_turn, null, 10, 10, 180, 90);
gfx.clear(this.mc_turn);
this.mc_turn.style.fill = -2147483648;
this.mc_turn.style.out = -2147483648;
gfx.draw_box(this.mc_turn, 3, 5, 5, 190, 100);
this.set_butt(this.mc_turn, 'turn');
this.mc_rgbs = gfx.create_clip(this.mc, null);
gfx.dropshadow(this.mc_rgbs, 2, 45, 0, 1, 4, 4, 2, 3);
this.tf_rgbs[0] = gfx.create_text_html(this.mc_rgbs, null, 200 + 75, 550 - 10, 50, 50);
this.tf_rgbs[1] = gfx.create_text_html(this.mc_rgbs, null, 250 + 75, 550 - 10, 50, 50);
this.tf_rgbs[2] = gfx.create_text_html(this.mc_rgbs, null, 300 + 75, 550 - 10, 50, 50);
this.tf_rgbs[3] = gfx.create_text_html(this.mc_rgbs, null, 350 + 75, 550 - 10, 50, 50);
this.tf_rgbs[4] = gfx.create_text_html(this.mc_rgbs, null, 400 + 75, 550 - 10, 50, 50);
_root.bmc.clear_loading();
this.mc4 = gfx.create_clip(this.mc, null, 10 + 30 + 600 + 62, 125 + 120 + 40 * 5 + 10, 125, 125);
this.set_butt(this.mc4, 'name2');
_root.bmc.remember('Login_Img1', bmcache.create_url, {'url': _global.unescape(this.up.gamecomms.xup[1].imgurl), 'bmpw': 100, 'bmph': 100, 'hx': -50, 'hy': -100});
this.mc5 = null;
this.mc2 = gfx.create_clip(this.mc, null, 10 + 30 + 62, 125 + 120 + 40 * 5 + 10, 125, 125);
this.set_butt(this.mc2, 'name1');
_root.bmc.remember('Login_Img2', bmcache.create_url, {'url': _global.unescape(this.up.gamecomms.xup[2].imgurl), 'bmpw': 100, 'bmph': 100, 'hx': -50, 'hy': -100});
this.mc3 = null;
this.butts[this.butts.length] = this.new_text('name1', '<p align=\'center\'><b>' + this.up.gamecomms.players[0].name + '</b></p>', 16, 0, 120 + 40 * 5 - 10, 200, 20);
this.butts[this.butts.length] = this.new_text('name2', '<p align=\'center\'><b>' + this.up.gamecomms.players[1].name + '</b></p>', 16, 600, 120 + 40 * 5 - 10, 200, 20);
this.butts[this.butts.length] = this.new_text('ups1', '<p align=\'center\'><b>1UP : ' + ((this.up.player == 0) ? 'You' : 'Them') + '</b></p>', 16, 0, 150 + 120 + 40 * 5 - 10, 200, 20);
this.butts[this.butts.length] = this.new_text('ups2', '<p align=\'center\'><b>2UP : ' + ((this.up.player == 1) ? 'You' : 'Them') + '</b></p>', 16, 600, 150 + 120 + 40 * 5 - 10, 200, 20);
if (this.up.player == 0) {
this.butts[this.butts.length] = this.new_butt('pass1', '<p align=\'center\'><b>Pass</b></p>', 40, 120 + 40 * 4, 120, 20);
} else {
this.butts[this.butts.length] = this.new_butt('pass2', '<p align=\'center\'><b>Pass</b></p>', 640, 120 + 40 * 4, 120, 20);
}
this.mc_pts1 = gfx.create_clip(this.mc, null);
this.mc_pts2 = gfx.create_clip(this.mc, null);
this.tf_pts1 = gfx.create_text_html(this.mc_pts1, null, 0, 120 + 40 * 3 - 10, 200, 40);
this.tf_pts2 = gfx.create_text_html(this.mc_pts2, null, 600, 120 + 40 * 3 - 10, 200, 40);
this.mc_choose1 = gfx.create_clip(this.mc, null, 50, 120 + 40 * 1 - 10, 50, 50);
this.mc_choose2 = gfx.create_clip(this.mc, null, 650, 120 + 40 * 1 - 10, 50, 50);
this.set_butt(this.mc_choose1, 'choose1');
this.set_butt(this.mc_choose2, 'choose2');
this.choosen = new Array(new FieldItem({'mc': this.mc_choose1}), new FieldItem({'mc': this.mc_choose1}), new FieldItem({'mc': this.mc_choose2}), new FieldItem({'mc': this.mc_choose2}));
this.choosen[0].setup('fire');
this.choosen[1].setup('fire');
this.choosen[2].setup('fire');
this.choosen[3].setup('fire');
this.choosen[0].setxy(50, 50);
this.choosen[1].setxy(150, 50);
this.choosen[2].setxy(50, 50);
this.choosen[3].setxy(150, 50);
this.choosen[0].mc._visible = false;
this.choosen[1].mc._visible = false;
this.choosen[2].mc._visible = false;
this.choosen[3].mc._visible = false;
this.mc_stage = gfx.create_clip(this.mc, null, 400, 50);
this.mc_stage.tf = gfx.create_text_html(this.mc_stage, null, -200, 0, 400, 50);
this.butt_changed('stage');
}
this.show_loaded();
this.hover = null;
this.last_pct = -1;
};
v1.make_button = function (m) {
m.nam_alt = m.nams[0] + '2_' + m.nams[1];
m.onRelease = this.delegate(this.click, m);
m.onRollOver = this.delegate(this.hover_on, m);
m.onRollOut = this.delegate(this.hover_off, m);
m.onReleaseOutside = this.delegate(this.hover_off, m);
this.hover_off(m);
};
v1.hover_on = function (m) {
if (_root.popup) {
return undefined;
}
switch (m.nam) {
case 'play_restart':
_root.poker.ShowFloat('Reset game and start again.', 25 * 10);
break;
case 'play_menu':
_root.poker.ShowFloat('Return to main menu.', 25 * 10);
break;
case 'score':
_root.poker.ShowFloat('Click to view high scores.', 25 * 10);
}
switch (m.nam) {
case 'play_restart':
m._alpha = 100;
break;
case 'play_menu':
m._alpha = 100;
}
};
v1.hover_off = function (m) {
switch (m.nam) {
case 'play_restart':
m._alpha = 80;
break;
case 'play_menu':
m._alpha = 80;
}
_root.poker.ShowFloat(null, 0);
};
v1.click = function (m) {
if (_root.popup) {
return undefined;
}
_root.poker.ShowFloat(null, 0);
switch (m.nam) {
case 'score':
this.up.up.high.setup();
break;
case 'play_restart':
this.up.up.state_next = 'play';
break;
case 'play_menu':
this.up.up.state_next = 'menu';
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({'style': 'sqr_plode', 'mc': this.up.mc});
_root.swish.setup();
}
};
v1.clean = function () {
this.choosen[0].clean();
this.choosen[1].clean();
this.choosen[2].clean();
this.choosen[3].clean();
Mouse.removeListener(this);
};
v1.show_loaded = function () {
if (this.mc3 == null) {
if (this.up.gamecomms) {
if (_root.bmc.isloaded('Login_Img1')) {
this.mc3 = _root.bmc.create(this.mc2, 'Login_Img1', null);
}
} else {
if (_root.bmc.isloaded('Login_Img')) {
this.mc3 = _root.bmc.create(this.mc2, 'Login_Img', null);
}
}
}
if (this.mc5 == null) {
if (_root.bmc.isloaded('Login_Img2')) {
this.mc5 = _root.bmc.create(this.mc4, 'Login_Img2', null);
}
}
};
v1.update = function () {
this.show_loaded();
if (!this.up.gamecomms) {
if (this.up.field.state == 'user') {
switch (this.up.gameskill) {
case 'easy':
this.chaser += this.points / 25 * 120;
break;
case 'normal':
this.chaser += this.points / 25 * 60;
break;
case 'hard':
this.chaser += this.points / 25 * 30;
}
}
if (this.chaser > 0) {
var v5 = Math.floor(100 * this.chaser / this.points);
if (v5 >= 100) {
if (this.points > this.chaser) {
v5 = 99;
} else {
v5 = 100;
}
}
} else {
var v5 = 0;
}
var v2 = '<p align=\'center\'>' + this.points + '</p>';
if (this.up.gamemode == 'endurance') {
if (this.last_pct != v5) {
gfx.clear(this.mc_rgbs);
if (v5 < 50) {
this.mc_rgbs.style.fill = -16711936 + (Math.floor(255 * v5 / 50) << 16);
} else {
this.mc_rgbs.style.fill = -65536 + (Math.floor(255 * (100 - v5) / 50) << 8);
}
gfx.draw_box(this.mc_rgbs, 0, 200, 100 - 30, 400 - v5 * 4, 15);
this.last_pct = v5;
}
if (v5 == 100) {
this.up.won.setup();
}
}
gfx.set_text_html(this.tf_pts1, 48, 16777215, v2);
} else {
var v2 = '<p align=\'center\'>' + this.points1 + '</p>';
gfx.set_text_html(this.tf_pts1, 30, 16777215, v2);
v2 = '<p align=\'center\'>' + this.points2 + '</p>';
gfx.set_text_html(this.tf_pts2, 30, 16777215, v2);
}
gfx.set_text_html(this.tf_rgbs[0], 19, -65536, '<p align="center"><b>' + this.up.field.available_moves[0] + '</b></p>');
gfx.set_text_html(this.tf_rgbs[1], 19, -16711936, '<p align="center"><b>' + this.up.field.available_moves[1] + '</b></p>');
gfx.set_text_html(this.tf_rgbs[2], 19, -256, '<p align="center"><b>' + this.up.field.available_moves[2] + '</b></p>');
gfx.set_text_html(this.tf_rgbs[3], 19, -16776961, '<p align="center"><b>' + this.up.field.available_moves[3] + '</b></p>');
gfx.set_text_html(this.tf_rgbs[4], 19, -1, '<p align="center"><b>' + this.up.field.available_moves[4] + '</b></p>');
this.butt_changed('qual');
var v3 = 0;
goto 11402;
for (;;) {
++v3;
label 11402:
if (v3 >= this.butts.length) break;
var v4 = this.butts[v3];
v4._alpha = (v4._alpha + v4._alpha + v4._alpha_dest) / 3;
}
var v6 = _root.wetplay.wetplayMP3.disp_title;
var v7 = _root.wetplay.wetplayMP3.disp_creator;
if (v6 != this.last_track || v7 != this.last_artist) {
v2 = '';
v2 += '<p align=\'center\'>Now Playing<br>';
v2 += '<b>' + v6 + '</b><br>';
v2 += 'by<br>';
v2 += '<b>' + v7 + '</b><br>';
gfx.set_text_html(this.tf_play, 14, -1, v2);
this.last_track = v6;
this.last_artist = v7;
}
if (this.mc_stage._xscale > 100) {
this.mc_stage._xscale = Math.floor(this.mc_stage._xscale - (this.mc_stage._xscale - 100) * 0.1);
this.mc_stage._yscale = this.mc_stage._xscale;
}
if (this.mc2._xscale > 125) {
this.mc2._xscale = Math.floor(this.mc2._xscale - (this.mc2._xscale - 125) * 0.1);
this.mc2._yscale = this.mc2._xscale;
}
if (this.mc4._xscale > 125) {
this.mc4._xscale = Math.floor(this.mc4._xscale - (this.mc4._xscale - 125) * 0.1);
this.mc4._yscale = this.mc4._xscale;
}
};
v1.goto_mp3_site = function () {
if (_root.popup) {
return undefined;
}
if (_root.wetplay.wetplayMP3.disp_info != '') {
getURL(_root.wetplay.wetplayMP3.disp_info, 'BOT');
}
};
v1.butt_over = function (id) {
if (_root.popup) {
return undefined;
}
switch (id) {
case 'turn':
_root.poker.ShowFloat('Click here for more multiplayer options.', 25 * 10);
break;
case 'mp3':
if (_root.wetplay.wetplayMP3.disp_info != '') {
_root.poker.ShowFloat('Would you like to know more?', 25 * 10);
}
break;
case 'gamemode':
switch (this.up.gamemode) {
case 'puzzle':
_root.poker.ShowFloat('End this game and switch to Endurance mode.', 25 * 10);
break;
case 'endurance':
_root.poker.ShowFloat('End this game and switch to Puzzle mode.', 25 * 10);
}
break;
case 'qual':
_root.poker.ShowFloat('Adjust the graphical quality, a lower quality can drastically increase frame rate.', 25 * 10);
break;
case 'restart':
_root.poker.ShowFloat('Give up, reset the board and try again.', 25 * 10);
break;
case 'about':
_root.poker.ShowFloat('Would you like to know more?', 25 * 10);
break;
case 'menu':
_root.poker.ShowFloat('Return to the main menu.', 25 * 10);
break;
case 'logoff':
_root.poker.ShowFloat('Log Out so you can change your name.', 25 * 10);
break;
case 'pass1':
case 'pass2':
_root.poker.ShowFloat('Skip your turn. This round will end if all players skip.', 25 * 10);
break;
case 'choose1':
case 'choose2':
_root.poker.ShowFloat('The first two colours you swap become yours, you get 1000 pts if either colour is totally cleared.', 25 * 10);
break;
case 'high':
switch (this.up.gamemode) {
case 'puzzle':
_root.poker.ShowFloat('Browse other players scores and click on dates to play an older puzzle.', 25 * 10);
break;
case 'endurance':
_root.poker.ShowFloat('Browse other players scores.', 25 * 10);
}
break;
case 'full':
_root.poker.ShowFloat('Toggle fullscreen mode, this only works on sites that allow it and you may need to reduce the quality to maintain frame rate.', 25 * 10);
this.butt_changed(id);
}
this.butt_ids[id]._alpha_dest = 100;
};
v1.butt_out = function (id) {
this.butt_ids[id]._alpha_dest = 75;
_root.poker.ShowFloat(null, 0);
};
v1.butt_up = function (id) {};
v1.butt_press = function (id) {
if (_root.popup) {
return undefined;
}
switch (id) {
case 'turn':
this.up.turnmenu.setup();
break;
case 'pass1':
case 'pass2':
this.up.next_turn('-1/-1');
break;
case 'mp3':
this.goto_mp3_site();
break;
case 'qual':
_root._highquality = (_root._highquality + 1) % 3;
this.up.field.redraw_all();
break;
case 'restart':
this.up.do_str(id);
break;
case 'logoff':
this.points = 0;
this.up.do_str(id);
break;
case 'high':
_root.signals.signal('diamonds', 'high', this.up);
this.up.up.high.setup();
break;
case 'about':
this.up.up.about.setup();
break;
case 'menu':
this.up.up.state_next = 'splash';
_root.swish = new Swish({'style': 'sqr_plode', 'mc': this.up.mc});
break;
case 'full':
if (Stage.displayState == 'normal') {
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 600, 450);
Stage.displayState = 'fullScreen';
} else {
Stage.displayState = 'normal';
}
break;
case 'gamemode':
switch (this.up.gamemode) {
case 'puzzle':
this.up.gamemode = 'endurance';
break;
case 'endurance':
this.up.gamemode = 'puzzle';
}
this.up.do_str('restart');
}
this.butt_changed(id);
};
v1.butt_changed = function (id) {
switch (id) {
case 'stage':
gfx.set_text_html(this.mc_stage.tf, 24, -1, '<p align=\'center\'><b>STAGE ' + (this.up.stage + 1) + '</b></p>');
this.mc_stage._xscale = 300;
this.mc_stage._yscale = 300;
break;
case 'qual':
var v4 = ['Bad', 'Good', 'Best'];
var v3 = '<p align=\'center\'><b>Q.' + v4[_root._highquality] + ' @ ' + _root.scalar.t_fps + 'fps</b></p>';
if (this.butt_ids[id].s != v3) {
this.butt_ids[id].s = v3;
gfx.set_text_html(this.butt_ids[id].tf, 16, 16777215, v3);
}
break;
case 'full':
if (Stage.displayState == 'normal') {
var v3 = '<p align=\'center\'><b>Full screen</b></p>';
} else {
var v3 = '<p align=\'center\'><b>Windowed</b></p>';
}
this.butt_str('full', v3);
break;
case 'gamemode':
if (this.up.gamemode == 'puzzle') {
var v3 = '<p align=\'center\'><b>Daily Puzzle</b></p>';
} else {
var v3 = '<p align=\'center\'><b>Endurance</b></p>';
}
this.butt_str('gamemode', v3);
}
};
v1.set_butt = function (b, id) {
b.onRollOver = this.delegate(this.butt_over, id);
b.onRollOut = this.delegate(this.butt_out, id);
b.onReleaseOutside = this.delegate(this.butt_out, id);
b.onRelease = this.delegate(this.butt_press, id);
};
v1.new_butt = function (id, s, x, y, w, h) {
var v8 = gfx.create_clip(this.mc, null);
this.set_butt(v8, id);
v8._x = x;
v8._y = y;
v8.tf = gfx.create_text_html(v8, null, 0, 0, w, h + 4);
gfx.clear(v8);
v8.style.fill = -2147483648;
v8.style.out = -2147483648;
gfx.draw_box(v8, 3, -4, -4, w + 8, h + 8);
gfx.set_text_html(v8.tf, 16, 16777215, s);
v8._alpha_dest = 75;
v8._alpha = v8._alpha_dest;
this.butt_ids[id] = v8;
v8.cacheAsBitmap = true;
return v8;
};
v1.new_text = function (id, s, fs, x, y, w, h) {
var v9 = gfx.create_clip(this.mc, null);
v9._x = x;
v9._y = y;
v9.tf = gfx.create_text_html(v9, null, 0, 0, w, h + 4);
gfx.set_text_html(v9.tf, fs, 16777215, s);
v9._alpha_dest = 100;
v9._alpha = v9._alpha_dest;
this.butt_ids[id] = v9;
v9.cacheAsBitmap = true;
return v9;
};
v1.butt_str = function (id, s) {
gfx.set_text_html(this.butt_ids[id].tf, 16, 16777215, s);
};
v1.turn_str = function (s) {
gfx.set_text_html(this.mc_turn.tf, 18, 16777215, s);
};
ASSetPropFlags(v1, null, 1);
_global.PlayHUD.interface_lines = ['back', 'backtitle', 'back', 'button_play', 'button_more', 'button_about', 'button_shop', 'button_logout', 'button_code', 'button2_play', 'button2_more', 'button2_about', 'button2_shop', 'button2_logout', 'button2_code', 'solid_water', 'solid_air', 'solid_fire', 'solid_earth', 'solid_ether', 'mode', 'mode_puzzle', 'mode_endurance', 'mode_ws', 'play_ws', 'play_single', 'play_restart', 'play_menu', 'play_score1', 'play_counters', 'play', 'play_stage1', 'play_stage2', 'play_pass1', 'play_pass2', ''];
}
#endinitclip
}
movieClip 20509 __Packages.PlayCode {
#initclip
if (!PlayCode) {
_global.PlayCode = function (_up) {
this.up = _up;
};
var v1 = _global.PlayCode.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function () {
_root.popup = this;
this.mcs = new Array();
this.tfs = new Array();
this.mcb = gfx.create_clip(_root.mc_popup, null);
if (_root.scalar.oy == 600) {
this.mc = this.mcb;
} else {
this.mcb._xscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mcb._yscale = Math.floor(100 * (_root.scalar.oy / 600));
this.mc = gfx.create_clip(this.mcb, null);
}
this.mcb.cacheAsBitmap = true;
gfx.dropshadow(this.mc, 5, 45, 0, 1, 20, 20, 2, 3);
this.mc._y = 0;
this.mc.dx = 0;
this.mc._x = -800;
this.done = false;
this.steady = false;
gfx.clear(this.mc);
this.mcs[0] = gfx.create_clip(this.mc, null);
this.mcs[0].onRelease = this.delegate(this.onRelease, null);
this.mcs[0].showHandCursor = false;
this.mcs[0].style.out = -16777216;
this.mcs[0].style.fill = 268435456;
gfx.draw_box(this.mcs[0], 0, 0, 0, 800, 600);
this.mcs[0].style.out = -16777216;
this.mcs[0].style.fill = -2147483648;
gfx.draw_box(this.mcs[0], 0, 100 + 16, +16, 600 - 32, 600 - 32);
this.mcs[1] = gfx.create_clip(this.mc, null);
this.mcs[1].onRelease = this.delegate(function () {}, null);
this.mcs[1].showHandCursor = false;
this.mcs[1].style.out = -16777216;
this.mcs[1].style.fill = 268435456;
gfx.draw_box(this.mcs[1], 0, 150, 50, 500, 500);
this.mcs[2] = gfx.create_clip(this.mc, null, 150, 50, 150, 150);
this.thunk();
Mouse.addListener(this);
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
_root.poker.clear_clicks();
_root.poker.ShowFloat(null, 0);
System.security.allowDomain('cdn.gigya.com');
System.security.allowInsecureDomain('cdn.gigya.com');
this.mcWF = gfx.create_clip(this.mcs[2], null);
this.mcWF._lockroot = true;
this.mcWF._x = 0;
this.mcWF._y = 0;
this.mcWF.ModuleID = 'PostModule1';
_root[this.mcWF.ModuleID] = {};
var v6 = _root[this.mcWF.ModuleID];
v6.width = '333';
v6.height = '333';
v6.partner = '200531';
v6.UIConfig = '<config><display showEmail="true" showBookmark="true" showCloseButton="true" bulletinChecked="false" networksWithCodeBox="" /></config>';
v6.defaultContent = function () {
return '<center><embed src="http://link.wetgenes.com/link/WetDiamonds.swf" type="application/x-shockwave-flash" width="640" height="480"></embed><br /><a href="http://games.WetGenes.com" target="_blank" title="games.WetGenes.com">Play more free online games at games.WetGenes.com</a></center>';
};
v6.facebookURL = 'http://link.wetgenes.com/link/WetDiamonds.fb';
var v7 = 'WetDiamonds'.toLowerCase();
if (v7 == 'wetbasement') {
v7 = 'basement';
}
if (v7 == 'wetdiamonds') {
v7 = 'diamonds';
}
v6.bookmarkURL = 'http://' + v7 + '.wetgenes.com/';
v6.widgetTitle = 'Play WetDiamonds at www.WetGenes.com';
v6.onPostProfile = this.delegate(this.finish);
v6.onClose = this.delegate(this.finish);
v6.onLoad = this.delegate(this.WFonLoad);
this.mcWF.loadMovie('http://cdn.gigya.com/WildFire/swf/wildfire.swf', 'get');
this.wf_loaded = false;
};
v1.WFonLoad = function () {
this.wf_loaded = true;
};
v1.clean = function () {
if (_root.popup != this) {
return undefined;
}
this.mcWF = null;
this.update_do = null;
this.mc.removeMovieClip();
this.mcb.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
_root.poker.clear_clicks();
_root.poker.ShowFloat(null, 0);
};
v1.thunk = function () {};
v1.over = function (s) {};
v1.notover = function (s) {
_root.poker.ShowFloat(null, 0);
};
v1.click = function (s) {};
v1.onRelease = function () {
if (_root.popup != this) {
return undefined;
}
if (this.steady) {
this.done = true;
this.mc.dx = _root.scalar.ox;
}
};
v1.finish = function () {
this.done = true;
this.mc.dx = _root.scalar.ox;
};
v1.update = function () {
if (_root.popup != this || _root.pause) {
return undefined;
}
this.mc._x += (this.mc.dx - this.mc._x) / 4;
if ((this.mc._x - this.mc.dx) * (this.mc._x - this.mc.dx) < 16 * 16) {
this.steady = true;
if (this.done) {
this.clean();
}
} else {
this.steady = false;
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20510 __Packages.OverItem {
#initclip
if (!OverItem) {
_global.OverItem = function (_up) {
this.up = _up;
};
var v1 = _global.OverItem.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function (nam, dat) {
this.mc = gfx.create_clip(this.up.mc, null);
this.type = nam;
this.data = dat;
this.flags = 0;
this._x = 0;
this._y = 0;
this.vx = 0;
this.vy = 0;
this.draw();
};
v1.draw = function () {
var v2 = 2.0;
switch (this.type) {
case null:
break;
case 'score':
this.tf = gfx.create_text_html(this.mc, null, -100, -25, 200, 30);
gfx.set_text_html(this.tf, 24, 16777215, '<p align="center">' + this.data.str + '</p>');
}
};
v1.clean = function () {
this.mc.removeMovieClip();
};
v1.setxy = function (setx, sety, setvx, setvy) {
if (setvx != undefined) {
this.vx = setvx;
}
if (setvy != undefined) {
this.vy = setvy;
}
this._x = setx;
this._y = sety;
if (this.mc) {
this.mc._x = setx;
this.mc._y = sety;
}
};
v1.update = function () {
if (this.type !== 'score') {
} else {
this.setxy(this._x + this.vx, this._y + this.vy);
this.mc._alpha -= 1;
if (this.mc._alpha <= 0) {
return true;
}
return false;
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20511 __Packages.OverField {
#initclip
if (!OverField) {
_global.OverField = function (_up) {
this.up = _up;
};
var v1 = _global.OverField.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.setup = function (nam) {
this.mc_scalar = gfx.create_clip(this.up.mc, null);
this.mc = gfx.create_clip(this.mc_scalar, null);
this.over = new Object();
this.over.up = this.up;
this.over.mc = gfx.create_clip(this.mc_scalar, null);
this.tab_w = 8;
this.tab_h = 8;
this.types = new Array('fire', 'earth', 'air', 'water', 'ether');
var v7 = 0;
goto 936;
for (;;) {
++v7;
label 936:
if (v7 >= 5) break;
this.types[this.types[v7]] = v7;
}
this.launches = new Array();
this.floaters = new Array();
_root.poker.clear_clicks();
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
};
v1.clean = function () {
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
while (this.launches.length) {
this.launches[0].clean();
this.launches.splice(0, 1);
}
while (this.floaters.length) {
this.floaters[0].clean();
this.floaters.splice(0, 1);
}
this.mc.removeMovieClip();
};
v1.update = function () {
var v2 = 0;
goto 1409;
for (;;) {
++v2;
label 1409:
if (v2 >= this.launches.length) break;
if (this.launches[v2].update_launch()) {
this.launches[v2].clean();
this.launches.splice(v2, 1);
--v2;
}
}
v2 = 0;
goto 1561;
for (;;) {
++v2;
label 1561:
if (v2 >= this.floaters.length) break;
if (this.floaters[v2].update()) {
this.floaters[v2].clean();
this.floaters.splice(v2, 1);
--v2;
}
}
};
v1.add_floater = function (str, xx, yy) {
var v5 = new OverItem(this);
v5.setup('score', {'str': str});
v5.setxy(xx, yy);
v5.vx = 0;
v5.vy = -2;
v5.mc.filters = null;
v5.mc.cacheAsBitmap = true;
this.floaters.push(v5);
return v5;
};
ASSetPropFlags(v1, null, 1);
v1.rnd_num = 0;
}
#endinitclip
}
movieClip 20512 __Packages.WetPlayIcon {
#initclip
if (!WetPlayIcon) {
_global.WetPlayIcon = function (stropts) {
this.scale_800x600 = false;
this.mute = false;
if (stropts) {
var v4 = stropts.split(',');
var v3 = 0;
goto 688;
for (;;) {
++v3;
label 688:
if (v3 >= v4.length) break;
switch (v4[v3]) {
case 'scale_800x600':
this.scale_800x600 = true;
break;
case 'mute':
this.mute = true;
continue;
}
}
}
};
var v1 = _global.WetPlayIcon.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.get_width = function () {
if (this.scale_800x600) {
return 800;
} else {
return Stage.width;
}
};
v1.get_height = function () {
if (this.scale_800x600) {
return 600;
} else {
return Stage.height;
}
};
v1.logindone = function () {
if (!this.donelogindone) {
this.setup();
this.donelogindone = true;
}
if (this.mute) {
return undefined;
}
if (_root.login.opt_sound) {
this.wetplayMP3.set_vol(50);
} else {
this.wetplayMP3.set_vol(0);
}
};
v1.setup = function () {
this.mcs = gfx.create_clip(_root, 16384 + 32 - 16);
this.mc = gfx.create_clip(this.mcs);
this.mc_play_icon = gfx.add_clip(this.mc, 'WetPlayIcon', null, this.get_width() - 11, 11);
this.wetplayGFX = new WetPlayGFX(this);
this.wetplayMP3 = new WetPlayMP3(this);
this.wall = this.wetplayMP3.w + this.wetplayMP3.x * 2;
this.hall = this.wetplayMP3.h + this.wetplayMP3.y * 2;
this.xall = this.wetplayMP3.x * 2;
this.yall = this.wetplayMP3.y * 2;
this.wetplayMP3.setup();
this.wetplayMP3.mc.dx = this.get_width() + this.xall;
this.wetplayMP3.mc.dy = -this.hall;
this.wetplayMP3.mc._x = this.wetplayMP3.mc.dx;
this.wetplayMP3.mc._y = this.wetplayMP3.mc.dy;
this.wetplayMP3.mc.ox = this.wetplayMP3.mc._x;
this.wetplayMP3.mc.oy = this.wetplayMP3.mc._y;
this.wetplayMP3.mc.idx = 0;
if (this.mute) {
this.wetplayMP3.set_vol_start(100, false);
}
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
};
v1.clean = function () {
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
};
v1.update = function () {
if (this.scale_800x600) {
_root.scalar.apply(this.mcs);
}
this.mc_play_icon._x = this.get_width() - 11;
this.mc_play_icon._y = 11;
var v2 = _root.poker.snapshot();
this.mc.globalToLocal(v2);
if (_root.popup == this.wetplayMP3) {
if ((v2.x < this.get_width() - (this.wall - this.xall / 2) || v2.y > this.hall) && (!_root.poker.poke_now && !_root.poker.poke_up)) {
this.wetplayMP3.mc._visible = false;
_root.popup = null;
}
} else {
if (!_root.popup && !this.mute) {
if (v2.x > this.get_width() - 20 && (v2.y < 20 && (!_root.poker.poke_now && !_root.poker.poke_up))) {
_root.popup = this.wetplayMP3;
this.wetplayMP3.mc._visible = true;
this.wetplayMP3.mc._x = this.get_width() - (this.wall - this.xall / 2);
this.wetplayMP3.mc._y = this.yall / 2;
} else {
this.wetplayMP3.mc._visible = false;
}
} else {
this.wetplayMP3.mc._visible = false;
if (_root.popup == this.wetplayMP3) {
_root.popup = null;
}
}
}
if (_root.popup) {
this.mc_play_icon._visible = false;
} else {
this.mc_play_icon._visible = true;
}
this.mc_play_icon._xscale = 50 + this.wetplayMP3.throbe * 150;
this.mc_play_icon._yscale = this.mc_play_icon._xscale;
this.mc_play_icon._alpha = 60;
this.wetplayMP3.update();
};
v1.PlaySFX = function (nam, chan, loops, vol) {
return this.wetplayMP3.PlaySFX(nam, chan, loops, vol);
};
ASSetPropFlags(v1, null, 1);
v1.donelogindone = false;
}
#endinitclip
}
movieClip 20513 __Packages.Poker {
#initclip
if (!Poker) {
_global.Poker = function (_hand) {
this.hand = _hand;
if ((System.capabilities.version.split(' '))[0] == 'WII') {
this.hand = false;
}
this.hand = false;
this.mc = gfx.create_clip(_root, 16384 + 32);
this.float = true;
if (this.float) {
this.mc_floater = gfx.create_clip(_root, 16384 + 32 + 1);
gfx.clear(this.mc_floater);
this.mc_floater.w = 200;
this.mc_floater.h = 80;
this.mc_floaterz = gfx.create_clip(this.mc_floater, null);
this.mc_floaterz._x = 100;
this.mc_floaterz._y = 40;
this.tf_floater = gfx.create_text_html(this.mc_floaterz, null, -100, 0, 200, 200);
this.float_str = '';
this.float_time = -100;
}
if (this.hand) {
this.mcb0 = gfx.create_clip(this.mc, null);
this.mcb1 = gfx.create_clip(this.mcb0, null);
this.mcg = gfx.create_clip(this.mcb1, null);
this.mcg0 = gfx.add_clip(this.mcg, 'poke0', null);
this.mcg1 = gfx.add_clip(this.mcg, 'poke1', null);
this.mcg0._x = -19;
this.mcg0._y = -19;
this.mcg1._x = -(19 + 8);
this.mcg1._y = -(19 + 8);
this.mcg._xscale = 75;
this.mcg._yscale = 75;
}
this.onMouseUp();
Mouse.addListener(this);
Key.addListener(this);
this.lx = 0;
this.ly = 0;
this.size = 1;
this.scale = 1;
this.poke_last = false;
this.poke_down = false;
this.poke_up = false;
this.poke_now = false;
this.clear_clicks();
this.update_do = this.delegate(this.update, null);
MainStatic.update_add(_root.updates, this.update_do);
};
var v1 = _global.Poker.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.clean = function () {
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
};
v1.ShowFloat = function (str, tim) {
if (str != null && this.float_str != str) {
this.float_str = str;
gfx.clear(this.mc_floaterz);
this.mc_floaterz.style.out = -1;
this.mc_floaterz.style.fill = -3355444;
gfx.set_text_html(this.tf_floater, 16, 0, '<p align="center">' + str + '</p>');
this.mc_floater.h = this.tf_floater.textHeight + 6;
gfx.draw_box(this.mc_floaterz, 4, -100, -this.mc_floater.h / 2, 200, this.mc_floater.h);
this.tf_floater._y = -this.mc_floater.h / 2;
this.mc_floaterz._y = this.mc_floater.h / 2;
}
if (tim == 0) {
if (this.float_time > tim) {
this.float_time = tim;
}
} else {
this.float_time = tim;
}
};
v1.onKeyDown = function () {
this.do_anykey = true;
};
v1.onMouseMove = function () {};
v1.onMouseDown = function () {
if (this.hand) {
Mouse.hide();
this.mcg0._visible = false;
this.mcg1._visible = true;
}
this.poke_now_now = true;
this.poke_down_now = true;
if (this.clicks.length < 16) {
this.clicks[this.clicks.length] = {'click': 1, 'x': _root._xmouse, 'y': _root._ymouse};
}
};
v1.onMouseUp = function () {
this.do_anykey = true;
if (this.hand) {
Mouse.hide();
this.mcg0._visible = true;
this.mcg1._visible = false;
}
this.poke_now_now = false;
this.poke_up_now = true;
if (this.clicks.length < 16) {
this.clicks[this.clicks.length] = {'click': -1, 'x': _root._xmouse, 'y': _root._ymouse};
}
};
v1.clear_clicks = function () {
this.do_anykey = false;
this.anykey = false;
this.poke_last = false;
this.poke_down = false;
this.poke_up = false;
this.poke_now = false;
this.clicks = [];
};
v1.update = function () {
if (this.do_anykey) {
this.anykey = true;
} else {
this.anykey = false;
}
this.do_anykey = false;
this.x = _root._xmouse;
this.y = _root._ymouse;
this.poke_last = this.poke_now;
this.poke_down = this.poke_down_now;
this.poke_up = this.poke_up_now;
this.poke_now = this.poke_now_now;
this.poke_down_now = false;
this.poke_up_now = false;
this.dx = this.x - this.lx;
this.dy = this.y - this.ly;
this.lx = this.x;
this.ly = this.y;
if (this.hand) {
this.mc._x = this.x;
this.mc._y = this.y;
this.scale = _root.scalar.sx * this.size / 100;
this.mc._xscale = 100 * this.scale;
this.mc._yscale = this.mc._xscale;
gfx.dropshadow(this.mc, 2, 45, 0, 1, 4 * this.scale, 4 * this.scale, 2, 3);
if (this.dx == 0 && this.dy == 0) {
this.mcb0._rotation = 0;
this.mcb0._xscale = 100;
this.mcb0._yscale = 100;
this.mcb1._rotation = 0;
} else {
var v3 = 180 * Math.atan2(this.dy, -this.dx) / Math.PI;
var v4 = Math.sqrt(this.dy * this.dy + this.dx * this.dx);
v4 /= 1.5;
if (v4 > 400) {
v4 = 400;
}
this.mcb0._rotation = -v3;
this.mcb0._xscale = 100 + v4;
this.mcb0._yscale = 100 - v4 / 5;
this.mcb1._rotation = v3;
}
if (this.dx > 32) {
this.dx = 32;
}
if (this.dx < -32) {
this.dx = -32;
}
var v2 = this.dx;
this.mcg._rotation += (v2 - this.mcg._rotation) / 4;
}
if (this.float && this.float_time >= -10) {
if (this.float_time > 0) {
--this.float_time;
this.mc_floater._visible = true;
this.mc_floaterz._xscale = 100;
this.mc_floaterz._yscale = 100;
} else {
--this.float_time;
this.mc_floaterz._xscale = 100 + this.float_time * 10;
this.mc_floaterz._yscale = this.mc_floaterz._xscale;
if (this.float_time == -10) {
this.mc_floater._visible = false;
}
}
var v5 = this.mc_floater.w;
var v6 = this.mc_floater.h;
var v13 = Stage.width;
var v14 = Stage.height;
var v9 = this.x - v13 / 2;
var v10 = this.y - v14 / 2;
var v17 = v9 * v9;
var v21 = v9 < 0 ? -v9 : v9;
var v18 = v10 * v10;
var v22 = v10 < 0 ? -v10 : v10;
var v16 = v17 + v18;
var v15 = Math.sqrt(v16);
if (v15 == 0) {
v15 = 1;
v9 = 0;
v10 = 1;
}
var v11 = v9 / v15;
var v12 = v10 / v15;
var v19 = -v11 * v5 * 1.75;
var v20 = -v12 * v6 * 1.75;
if (v21 / 2 > v22) {
if (v9 < 0) {
var v7 = this.x;
var v8 = this.y + v20 - v6 / 2;
v7 += 50;
} else {
var v7 = this.x - v5;
var v8 = this.y + v20 - v6 / 2;
v7 -= 50;
}
} else {
if (v21 < v22 / 2) {
if (v10 < 0) {
var v7 = this.x + v19 - v5 / 2;
var v8 = this.y;
v8 += 50;
} else {
var v7 = this.x + v19 - v5 / 2;
var v8 = this.y - v6;
v8 -= 50;
}
} else {
if (v9 < 0) {
if (v10 < 0) {
var v7 = this.x;
var v8 = this.y;
v7 += 50;
v8 += 50;
} else {
var v7 = this.x;
var v8 = this.y - v6;
v7 += 50;
v8 -= 50;
}
} else {
if (v10 < 0) {
var v7 = this.x - v5;
var v8 = this.y;
v7 -= 50;
v8 += 50;
} else {
var v7 = this.x - v5;
var v8 = this.y - v6;
v7 -= 50;
v8 -= 50;
}
}
}
}
this.mc_floater._x = this.mc_floater._x * 0.75 + v7 * 0.25;
this.mc_floater._y = this.mc_floater._y * 0.75 + v8 * 0.25;
this.mc_floater._visible = true;
} else {
this.mc_floater._visible = false;
}
};
v1.snapshot = function () {
var v2 = {};
v2.key = this.poke_now ? 1 : 0;
v2.key_on = this.poke_down ? 1 : 0;
if (!this.poke_up) {
v2.key_off = 0;
v2.x = this.x;
v2.y = this.y;
v2.frame = 0;
return v2;
}
v2.key_off = 1;
v2.x = this.x;
v2.y = this.y;
v2.frame = 0;
return v2;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20514 __Packages.mochi.MochiScores {
#initclip
if (!mochi.MochiScores) {
if (!mochi) {
_global.mochi = new Object();
}
_global.mochi.MochiScores = function () {};
var v1 = _global.mochi.MochiScores.prototype;
_global.mochi.MochiScores.setBoardID = function (boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send('scores_setBoardID', {'boardID': boardID});
};
_global.mochi.MochiScores.showLeaderboard = function (options) {
if (options.clip != null) {
if (options.clip.__mochiservicesMC != mochi.MochiServices.clip) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.id, options.clip);
}
delete options.clip;
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.clip.stop();
}
if (options.onClose != null) {
mochi.MochiScores.onClose = options.onClose;
} else {
mochi.MochiScores.onClose = function () {
if (mochi.MochiServices.clip == _root.__mochiservicesMC) {
mochi.MochiServices.clip._parent.play();
} else {
mochi.MochiServices.clip.play();
}
};
}
if (options.onError != null) {
mochi.MochiScores.onError = options.onError;
} else {
mochi.MochiScores.onError = mochi.MochiScores.onClose;
}
if (options.boardID == null) {
if (mochi.MochiScores.boardID != null) {
options.boardID = mochi.MochiScores.boardID;
}
}
mochi.MochiServices.send('scores_showLeaderboard', {'options': options}, null, mochi.MochiScores.doClose);
};
_global.mochi.MochiScores.getPlayerInfo = function (callbackObj, callbackMethod) {
mochi.MochiServices.send('scores_getPlayerInfo', null, callbackObj, callbackMethod);
};
_global.mochi.MochiScores.submit = function (score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send('scores_submit', {'score': score, 'name': name}, callbackObj, callbackMethod);
};
_global.mochi.MochiScores.requestList = function (callbackObj, callbackMethod) {
mochi.MochiServices.send('scores_requestList', null, callbackObj, callbackMethod);
};
_global.mochi.MochiScores.doClose = function (args) {
if (args.error == true) {
mochi.MochiScores.onError.apply(null, [args.errorCode, args.httpStatus]);
} else {
mochi.MochiScores.onClose.apply();
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20515 __Packages.GizmoKnob {
#initclip
if (!GizmoKnob) {
_global.GizmoKnob = function (_up) {
this.up = _up;
this.setup();
};
var v1 = _global.GizmoKnob.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 712;
for (;;) {
++v2;
label 712:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 907;
for (;;) {
++v2;
label 907:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.GizmoKnob.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = GizmoKnob.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1279;
for (;;) {
++v3;
label 1279:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.set_knob = function (xx, yy) {
if (xx != null) {
this.x_knob = xx;
if (this.x_knob < 0) {
this.x_knob = 0;
}
if (this.x_knob > 1) {
this.x_knob = 1;
}
}
if (yy != null) {
this.y_knob = yy;
if (this.y_knob < 0) {
this.y_knob = 0;
}
if (this.y_knob > 1) {
this.y_knob = 1;
}
}
if (this.up.w > this.w) {
this.x = this.x_knob * (this.up.w - this.w);
} else {
this.x_knob = 0;
this.x = 0;
}
if (this.up.h > this.h) {
this.y = this.y_knob * (this.up.h - this.h);
} else {
this.y_knob = 0;
this.y = 0;
}
};
v1.setup = function () {
this.setup_base();
};
v1.clean = function () {
this.clean_base();
};
v1.update = function () {
if (this.up.w > this.w) {
this.x_knob = this.x / (this.up.w - this.w);
} else {
this.x_knob = 0;
}
if (this.up.h > this.h) {
this.y_knob = this.y / (this.up.h - this.h);
} else {
this.y_knob = 0;
}
this.update_base();
};
v1.input = function (snapshot) {
if (this.top.focus == this) {
var v3 = GizmoKnob.dupe_snapshot(snapshot);
this.mc.localToGlobal(v3);
this.up.mc.globalToLocal(v3);
this.mc_base._visible = false;
this.mc_over._visible = false;
this.mc_down._visible = true;
this.x = this.top.focus_data.orig_x + v3.x - this.top.focus_data.x;
this.y = this.top.focus_data.orig_y + v3.y - this.top.focus_data.y;
if (this.x + this.w > this.up.w) {
this.x = this.up.w - this.w;
}
if (this.y + this.h > this.up.h) {
this.y = this.up.h - this.h;
}
if (this.x < 0) {
this.x = 0;
}
if (this.y < 0) {
this.y = 0;
}
if (snapshot.key_off & 1) {
this.onClick(this.top.focus);
this.top.focus = null;
return this.top.focus;
}
this.top.focus = this.input_base(snapshot);
return this.top.focus;
}
if (this.top.focus == null && (snapshot.x > 0 && (snapshot.y > 0 && (snapshot.x < this.w && snapshot.y < this.h)))) {
if (snapshot.key_on & 1) {
this.top.focus = this;
this.top.focus_data = GizmoKnob.dupe_snapshot(snapshot);
this.mc.localToGlobal(this.top.focus_data);
this.up.mc.globalToLocal(this.top.focus_data);
this.top.focus_data.orig_x = this.x;
this.top.focus_data.orig_y = this.y;
this.mc_base._visible = false;
this.mc_over._visible = false;
this.mc_down._visible = true;
return this.top.focus;
} else {
this.mc_base._visible = false;
this.mc_over._visible = true;
this.mc_down._visible = false;
}
this.top.focus = this.input_base(snapshot);
return this.top.focus;
}
this.mc_base._visible = true;
this.mc_over._visible = false;
this.mc_down._visible = false;
this.top.focus = this.input_base(snapshot);
return this.top.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20516 __Packages.WetDiamonds {
#initclip
if (!WetDiamonds) {
_global.WetDiamonds = function () {
this.v = [];
this.v.name = 'WetDiamonds';
this.v.site = 'generic';
this.v.number = '2.12';
this.v.stamp = 'Feb 23 2010';
this.v.stamp_number = '20100223';
this.setup_done = false;
this.mc = gfx.create_clip(_root, null);
this.mc.onEnterFrame = this.delegate(this.update);
gfx.setscroll(this.mc, 0, 0, _root.scalar.ox, _root.scalar.oy);
_root.wtf = new WTF();
var v2 = MainStatic.get_base_context_menu(this);
var v4 = function () {
this.state_next = 'splash';
};
var v3 = new ContextMenuItem('Quit to Main Menu.', this.delegate(v4));
v2.customItems.push(v3);
_root.menu = v2;
};
var v1 = _global.WetDiamonds.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
_global.WetDiamonds.main = function () {
if (_root.kongregateServices != undefined) {
_root.kongregateServices.connect();
_root.wethidemochiads = true;
}
var v2 = function (a, b) {
if (_root[a] == undefined) {
_root[a] = b;
}
};
v2('host', 'diamonds.wetgenes.com');
v2('wp_back', '0xcc000000');
v2('wp_xspf', 'http://diamonds.wetgenes.com/swf/WetDiamonds.xspf');
_root.gotoAndStop(1);
_root._highquality = 2;
if ((System.capabilities.version.split(' '))[0] == 'WII') {
_root._highquality = 1;
_root.wethidemochiads = true;
}
_root.mc = _root;
_root.newdepth = 1;
_root.mc_popup = gfx.create_clip(_root, 16383);
_root.popup = null;
_root.updates = MainStatic.update_setup();
_root.bmc = new bmcache();
_root.scalar = new Scalar(800, 600);
_root.poker = new Poker(false);
_root.loading = new Loading(true);
_root.replay = new Replay();
_root.diamonds = new WetDiamonds();
_root.signals = new BetaSignals(_root.diamonds);
_root.comms = new BetaComms(_root.diamonds);
_root.wetplay = new WetPlayIcon();
};
v1.setup = function () {
var v2 = new Date();
this.game_seed = Math.floor(v2.getTime() / 1000 / 24 * 60 * 60) & 65535;
this.next_game_seed = null;
this.state_last = null;
this.state = null;
this.state_next = null;
this.login = new Login(this);
this.splash = new WetDiamondsSplash(this);
this.menu = this.splash;
this.play = new WetDiamondsPlay(this);
this.lobby = new PlayLobby(this, {'style': 'popup', 'name': 'diamonds.ws', 'version': '2.12'});
this.about = new PlayAbout(this);
this.high = new PlayHigh(this);
this.code = new PlayCode(this);
this.over = new OverField({'up': this, 'mc': gfx.create_clip(this.mc, 65544)});
this.over.setup();
this.state_next = 'login';
};
v1.update = function () {
var v2 = new Date();
var v3 = v2.getTime();
MainStatic.choose_and_apply_scalar(this);
if (!this.setup_done && (_root.getBytesLoaded() == _root.getBytesTotal() && _root.loading.done)) {
_root.gotoAndStop(2);
this.setup();
this.setup_done = true;
}
if (!this.setup_done) {
MainStatic.update_do(_root.updates);
return undefined;
}
if (this.state_next != null) {
if (this.state) {
this[this.state].clean();
}
this.state_last = this.state;
this.state = this.state_next;
this.state_next = null;
if (this.next_game_seed) {
this.game_seed = this.next_game_seed;
this.next_game_seed = null;
}
if (this.state) {
this[this.state].setup();
}
this.old_time = v3;
this.update_time = 0;
}
if (this.state) {
this.update_time = Math.floor(this.update_time * 3 / 4);
this.update_time += v3 - this.old_time;
if (this.update_time > 200) {
this.update_time = 200;
}
MainStatic.update_do(_root.updates);
this[this.state].update();
this.update_time -= 40;
this.old_time = v3;
}
};
v1.clean = function () {};
v1.do_str = function (str) {
switch (str) {
case 'restart':
this.state_next = 'play';
break;
case 'logoff':
this.state_next = 'login';
_root.bmc.forget('Login_Img');
break;
case 'lobby_close':
this[this.state].do_lobby_close();
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20517 __Packages.WetDiamondsSplash {
#initclip
if (!WetDiamondsSplash) {
_global.WetDiamondsSplash = function (_up) {
this.up = _up;
};
var v1 = _global.WetDiamondsSplash.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.setup = function () {
this.mc_back = gfx.create_clip(this.up.mc, null);
gfx.clear(this.mc_back);
this.mc_back.style.fill = -12303224;
gfx.draw_box(this.mc_back, 0, 0, 0, 800, 600);
this.mc_back.cacheAsBitmap = true;
this.mc = gfx.create_clip(this.up.mc, null);
this.mcs = new Array();
var v2 = 0;
goto 2966;
for (;;) {
++v2;
label 2966:
if (v2 >= WetDiamondsSplash.interface_lines.length) break;
var v5 = WetDiamondsSplash.interface_lines[v2];
var v6 = v5.split(',');
var v7 = v6[0];
var v8 = v7.split('_');
var v9 = gfx.add_clip(this.mc, 'swf_interface', null);
v9.gotoAndStop(v2 + 1);
v9._visible = false;
v9.nam = v7;
v9.nams = v8;
if (this.style == 'start') {
switch (v8[0]) {
case 'back':
v9._visible = true;
break;
case 'mode':
v9._visible = true;
if (v7 == 'mode_puzzle' || (v7 == 'mode_endurance' || v7 == 'mode_ws')) {
this.make_button(v9);
}
}
} else {
switch (v8[0]) {
case 'back':
case 'backtitle':
case 'solid':
v9._visible = true;
break;
case 'button':
v9._visible = true;
this.make_button(v9);
}
}
v9.cacheAsBitmap = true;
this.mcs[v2] = v9;
this.mcs[v7] = v9;
}
this.mcs.mode_ws._alpha = 80;
this.mcs.mode_puzzle._alpha = 80;
this.mcs.mode_endurance._alpha = 80;
if (this.style == 'start') {
} else {
this.types = new Array('fire', 'earth', 'air', 'water', 'ether');
v2 = 0;
goto 3637;
for (;;) {
++v2;
label 3637:
if (v2 >= 5) break;
this.types[this.types[v2]] = v2;
}
this.over = new Object();
this.over.up = this.up;
this.over.mc = gfx.create_clip(this.mc, null);
this.launches = new Array();
this.it = new Array();
this.over.tf = gfx.create_text_html(this.over.mc, null, 10, 10, 200, 50);
this.over.bounces = 0;
this.over.bounces_max = 0;
v2 = 0;
goto 3921;
for (;;) {
++v2;
label 3921:
if (v2 >= 5) break;
this.it[v2] = new FieldItem(this);
this.it[v2].setup(this.types[v2]);
this.it[v2].mc._visible = false;
}
if (_root.pbem_id) {
this.mcs.puz._visible = false;
this.mcs.end._visible = false;
}
}
this.poke_wait = 0;
};
v1.clean = function () {
while (this.launches.length) {
this.launches[0].clean();
this.launches.splice(0, 1);
}
this.mc.removeMovieClip();
};
v1.make_button = function (m) {
m.nam_alt = m.nams[0] + '2_' + m.nams[1];
m.onRelease = this.delegate(this.click, m);
m.onRollOver = this.delegate(this.hover_on, m);
m.onRollOut = this.delegate(this.hover_off, m);
m.onReleaseOutside = this.delegate(this.hover_off, m);
};
v1.do_lobby_close = function () {
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({'style': 'fade', 'mc': this.mc_back});
_root.swish.setup();
if (this.mc._visible == false) {
this.mc._visible = true;
}
};
v1.hover_on = function (m) {
if (m.nam == 'mode_puzzle' || (m.nam == 'mode_endurance' || m.nam == 'mode_ws')) {
m._alpha = 100;
}
this.mcs[m.nam_alt]._visible = true;
switch (m.nam) {
case 'button_about':
_root.poker.ShowFloat('Did you know this game was made by real people?', 25 * 10);
break;
case 'button_logout':
_root.poker.ShowFloat('Change your name? change your options?', 25 * 10);
break;
case 'button_shop':
_root.poker.ShowFloat('You too can consume junk and support this game, it\'s like two things for the price of one :)', 25 * 10);
break;
case 'button_code':
_root.poker.ShowFloat('Get the codes to place this game on your blog, profile or website.', 25 * 10);
break;
case 'mode_puzzle':
_root.poker.ShowFloat('The daily puzzle, a new challenge every day. Play todays game or any in the last 10 days to increase your rank. Moves can only be made whilst the diamonds are at rest.', 25 * 10);
break;
case 'mode_endurance':
_root.poker.ShowFloat('Diamonds fall randomly from above, just last as long as you can. Moves can and should be made while the diamonds are falling. The moment you stop, diamonds will freeze and the timer will count down.', 25 * 10);
break;
case 'mode_ws':
_root.poker.ShowFloat('A Ws mode for profesional players to compete in. Please remember that you will need a friend to play this game against.', 25 * 10);
}
};
v1.hover_off = function (m) {
_root.poker.ShowFloat(null, 0);
if (m.nam == 'mode_puzzle' || m.nam == 'mode_endurance') {
m._alpha = 80;
}
this.mcs[m.nam_alt]._visible = false;
};
v1.click = function (m) {
var v3 = 'diamonds.wetgenes.com';
var v4 = 'WetDiamonds:+Swap+diamonds+to+match+three+or+more.';
var v5 = '+Play+multiplayer,+daily+puzzle+or+endurance+modes.';
if (_root.popup) {
return undefined;
}
_root.poker.ShowFloat(null, 0);
switch (m.nam) {
case 'button_more':
getURL('http://games.wetgenes.com/', '_bank');
break;
case 'button_shop':
getURL('http://link.wetgenes.com/link/WetDiamonds.shop', '_bank');
break;
case 'button_code':
this.up.code.setup();
break;
case 'button_about':
this.up.about.setup();
break;
case 'button_logout':
this.up.do_str('logoff');
break;
case 'mode_ws':
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({'style': 'sqr_plode', 'mc': this.mc});
_root.swish.setup();
this.up.lobby.setup();
this.mc._visible = false;
break;
case 'button_play':
this.style = 'start';
this.up.state_next = 'menu';
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({'style': 'slide_left', 'mc': this.mc});
_root.swish.setup();
break;
case 'mode_puzzle':
this.style = null;
this.up.play.gamemode = 'puzzle';
this.up.state_next = 'play';
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({'style': 'slide_left', 'mc': this.mc});
_root.swish.setup();
break;
case 'mode_endurance':
this.style = null;
this.up.play.gamemode = 'endurance';
this.up.state_next = 'play';
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({'style': 'slide_left', 'mc': this.mc});
_root.swish.setup();
break;
case 'digg':
getURL('http://digg.com/submit?phase=2&url=' + v3 + '&title=' + v4 + '&bodytext=' + v4 + v5 + '&topic=playable_web_games', '_blank');
break;
case 'stum':
getURL('http://www.stumbleupon.com/submit?url=http://' + v3 + '&title=' + v4 + v5, '_blank');
}
};
v1.update = function () {
if (_root.popup) {
return undefined;
}
if (this.mc._visible == false) {
this.mc._visible = true;
}
var v2 = 0;
goto 6535;
for (;;) {
++v2;
label 6535:
if (v2 >= this.launches.length) break;
if (this.launches[v2].update_launch()) {
this.launches[v2].clean();
this.launches.splice(v2, 1);
--v2;
}
}
if (this.over.bounces_max < this.over.bounces) {
this.over.bounces_max = this.over.bounces;
}
gfx.set_text_html(this.over.tf, 16, 16777215, 'bounces : ' + this.over.bounces_max + ' / ' + this.over.bounces);
var v3 = -1;
if (this.mcs.solid_water.hitTest(_root._xmouse, _root._ymouse, true)) {
v3 = 3;
}
if (this.mcs.solid_air.hitTest(_root._xmouse, _root._ymouse, true)) {
v3 = 2;
}
if (this.mcs.solid_fire.hitTest(_root._xmouse, _root._ymouse, true)) {
v3 = 0;
}
if (this.mcs.solid_earth.hitTest(_root._xmouse, _root._ymouse, true)) {
v3 = 1;
}
if (this.mcs.solid_ether.hitTest(_root._xmouse, _root._ymouse, true)) {
v3 = 4;
}
if (_root.poker.poke_now || v3 >= 0) {
if (this.poke_wait <= 0) {
this.poke_wait = 1;
if (v3 >= 0) {
var v4 = this.it[v3];
v4.setxy(this.mc._xmouse, this.mc._ymouse);
} else {
var v4 = this.it[this.rnd() % 5];
v4.setxy(this.mc._xmouse, this.mc._ymouse);
}
var v5 = v4.launch(((this.rnd() & 255) - 128) / 8, ((this.rnd() & 255) - 512) / 8);
v5.mc._xscale = 50;
v5.mc._yscale = 50;
v5.mc._rotation = this.rnd() % 360;
var v6 = this.rnd() % 20;
v2 = 0;
goto 7628;
for (;;) {
++v2;
label 7628:
if (v2 >= v6) break;
v5.nextframe();
}
}
}
if (this.poke_wait > 0) {
--this.poke_wait;
}
};
ASSetPropFlags(v1, null, 1);
v1.wave_frame = 0;
v1.style = null;
_global.WetDiamondsSplash.mcnames = ['back', 'end2', 'puz2', 'end1', 'puz1', 'code2', 'shop2', 'code1', 'shop1', 'me1', 'me2', 'me3', 'dia1', 'dia2', 'dia3', 'dia4', 'dia5', 'ws2', 'ws1', 'about2', 'about1', 'digg', 'stum'];
v1.rnd_num = 0;
_global.WetDiamondsSplash.interface_lines = ['back', 'backtitle', 'back', 'button_play', 'button_more', 'button_about', 'button_shop', 'button_logout', 'button_code', 'button2_play', 'button2_more', 'button2_about', 'button2_shop', 'button2_logout', 'button2_code', 'solid_water', 'solid_air', 'solid_fire', 'solid_earth', 'solid_ether', 'mode', 'mode_puzzle', 'mode_endurance', 'mode_ws', 'play_ws', 'play_single', 'play_restart', 'play_menu', 'play_score1', 'play_counters', 'play', 'play_stage1', 'play_stage2', 'play_pass1', 'play_pass2', ''];
}
#endinitclip
}
movieClip 20518 __Packages.Swish {
#initclip
if (!Swish) {
_global.Swish = function (opts) {
if (opts) {
this.prepare(opts);
}
};
var v1 = _global.Swish.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.rnd_seed = function (n) {
this.rnd_num = n & 65535;
};
v1.rnd = function () {
this.rnd_num = ((this.rnd_num + 1) * 75 - 1) % 65537;
return this.rnd_num;
};
v1.prepare = function (opts) {
this.rnd_seed(getTimer() & 65535);
this.bms = [];
this.mcs = [];
this.w = 800;
this.h = 600;
this.cw = 8;
this.ch = 6;
this.style = 'fade';
this._xmouse = 0;
this._ymouse = 0;
if (opts.mc) {
this._xmouse = opts.mc._xmouse;
this._ymouse = opts.mc._ymouse;
}
if (opts.style) {
this.style = opts.style;
}
if (opts.w) {
this.w = opts.w;
}
if (opts.h) {
this.h = opts.h;
}
if (opts.cw) {
this.w = opts.cw;
}
if (opts.ch) {
this.h = opts.ch;
}
this.sw = this.w / this.cw;
this.sh = this.h / this.ch;
var v6 = new flash.geom.Matrix();
var v7 = 1;
var v8 = 1;
if (opts.sw) {
v7 = opts.sw;
}
if (opts.sh) {
v8 = opts.sh;
}
if (opts.s) {
v7 = opts.s;
v8 = opts.s;
}
v6.scale(v7, v8);
if (opts.mc) {
switch (this.style) {
case 'wait':
this.bms[0] = new flash.display.BitmapData(this.w, this.h, false, 0);
this.bms[0].draw(opts.mc, v6);
break;
case 'fade':
this.smul = 0.8;
this.bms[0] = new flash.display.BitmapData(this.w, this.h, false, 0);
this.bms[0].draw(opts.mc, v6);
break;
case 'slide_left':
case 'slide_down':
this.bms[0] = new flash.display.BitmapData(this.w, this.h, false, 0);
this.bms[0].draw(opts.mc, v6);
break;
case 'sqr_plode':
case 'sqr_shrink':
case 'sqr_rollup':
this.smul = 0.95;
var v3 = new flash.display.BitmapData(this.w, this.h, false, 0);
v3.draw(opts.mc, v6);
var v5 = 0;
goto 1999;
for (;;) {
++v5;
label 1999:
if (v5 >= this.ch) break;
var v4 = 0;
goto 2045;
for (;;) {
++v4;
label 2045:
if (v4 >= this.cw) break;
this.bms[v5 * this.cw + v4] = new flash.display.BitmapData(this.sw, this.sh, false, 0);
this.bms[v5 * this.cw + v4].copyPixels(v3, new flash.geom.Rectangle(v4 * this.sw, v5 * this.sh, this.sw, this.sh), new flash.geom.Point(0, 0));
}
}
}
}
if (opts.smul) {
this.smul = opts.smul;
}
this.setup_done = false;
};
v1.setup = function () {
if (!_root.mc_swish) {
_root.mc_swish = gfx.create_clip(_root, 16382);
_root.scalar.apply(_root.mc_swish);
}
if (!_root.mc_swish.mc) {
_root.mc_swish.mc = gfx.create_clip(_root.mc_swish);
MainStatic.apply_800x600_scale(_root.mc_swish.mc);
}
this.smc = _root.mc_swish.mc;
this.smc._alpha = 100;
this.frame = -2;
switch (this.style) {
this.update_do = this.delegate(this.check_update, null);
MainStatic.update_add(_root.updates, this.update_do);
this.setup_done = true;
return this;
case 'wait':
case 'fade':
case 'slide_left':
case 'slide_down':
this.mcs[0] = gfx.create_clip(this.smc, null, 800 / 2, 600 / 2);
this.mcs[1] = gfx.create_clip(this.mcs[0], null, -800 / 2, -600 / 2, 100 * 800 / this.w, 100 * 600 / this.h);
this.mcs[1].attachBitmap(this.bms[0], 0, 'auto', true);
this.update_do = this.delegate(this.check_update, null);
MainStatic.update_add(_root.updates, this.update_do);
this.setup_done = true;
return this;
case 'sqr_plode':
var v3 = 0;
goto 2977;
for (;;) {
++v3;
label 2977:
if (v3 >= this.ch) break;
var v2 = 0;
goto 3023;
for (;;) {
++v2;
label 3023:
if (v2 >= this.cw) break;
var v4 = gfx.create_clip(this.smc, null, (v2 + 0.5) * this.sw, (v3 + 0.5) * this.sw);
this.mcs[v3 * this.cw + v2] = v4;
v4.mc = gfx.create_clip(v4, null, -this.sw / 2, -this.sh / 2);
v4.mc.attachBitmap(this.bms[v3 * this.cw + v2], 0, 'always', false);
v4.vx = (this.rnd() / 32768 - 1) * 16;
v4.vy = -16 + (this.rnd() / 65536) * -16;
v4.vr = v4.vx * 0.5;
}
}
this.update_do = this.delegate(this.check_update, null);
MainStatic.update_add(_root.updates, this.update_do);
this.setup_done = true;
return this;
case 'sqr_shrink':
var v3 = 0;
goto 3433;
for (;;) {
++v3;
label 3433:
if (v3 >= this.ch) break;
var v2 = 0;
goto 3479;
for (;;) {
++v2;
label 3479:
if (v2 >= this.cw) break;
var v4 = gfx.create_clip(this.smc, null, (v2 + 0.5) * this.sw, (v3 + 0.5) * this.sw);
this.mcs[v3 * this.cw + v2] = v4;
v4.mc = gfx.create_clip(v4, null, -this.sw / 2, -this.sh / 2);
v4.mc.attachBitmap(this.bms[v3 * this.cw + v2], 0, 'always', false);
v4.vx = 0;
v4.vy = 0;
v4.vr = 4;
}
}
this.update_do = this.delegate(this.check_update, null);
MainStatic.update_add(_root.updates, this.update_do);
this.setup_done = true;
return this;
case 'sqr_rollup':
var v3 = 0;
goto 3815;
for (;;) {
++v3;
label 3815:
if (v3 >= this.ch) break;
var v5 = null;
if (v3 & 1) {
var v2 = 0;
goto 3887;
for (;;) {
++v2;
label 3887:
if (v2 >= this.cw) break;
if (v5) {
var v4 = gfx.create_clip(v5, null, this.sw, 0);
v5 = v4;
} else {
var v4 = gfx.create_clip(this.smc, null, v2 * this.sw, (v3 + 1) * this.sw);
v5 = v4;
}
this.mcs[v3 * this.cw + v2] = v4;
v4.mc = gfx.create_clip(v4, null, 0, -this.sh);
v4.mc.attachBitmap(this.bms[v3 * this.cw + v2], 0, 'always', false);
}
} else {
var v2 = this.cw - 1;
goto 4218;
for (;;) {
--v2;
label 4218:
if (v2 < 0) break;
if (v5) {
var v4 = gfx.create_clip(v5, null, -this.sw, 0);
v5 = v4;
} else {
var v4 = gfx.create_clip(this.smc, null, (v2 + 1) * this.sw, (v3 + 1) * this.sw);
v5 = v4;
}
this.mcs[v3 * this.cw + v2] = v4;
v4.mc = gfx.create_clip(v4, null, -this.sw, -this.sh);
v4.mc.attachBitmap(this.bms[v3 * this.cw + v2], 0, 'always', false);
}
}
}
this.update_do = this.delegate(this.check_update, null);
MainStatic.update_add(_root.updates, this.update_do);
this.setup_done = true;
return this;
}
this.update_do = this.delegate(this.check_update, null);
MainStatic.update_add(_root.updates, this.update_do);
this.setup_done = true;
return this;
};
v1.check_update = function () {
if (!this.update()) {
this.clean();
}
};
v1.clean = function () {
if (!this.setup_done) {
return false;
}
MainStatic.update_remove(_root.updates, this.update_do);
this.update_do = null;
this.setup_done = false;
var v2 = 0;
goto 4801;
for (;;) {
++v2;
label 4801:
if (v2 >= this.mcs.length) break;
if (this.mcs[v2]) {
this.mcs[v2].removeMovieClip();
}
}
this.bms = [];
this.mcs = [];
this.frame = 0;
_root.swish = null;
return true;
};
v1.update = function () {
if (!this.setup_done) {
return true;
}
++this.frame;
if (this.frame < 0) {
return true;
}
switch (this.style) {
case 'wait':
if (this.frame > 25) {
return false;
}
break;
case 'fade':
this.smc._alpha *= this.smul;
if (this.smc._alpha < 3 && this.smc._alpha > -1) {
this.smc._alpha = 0;
return false;
}
return true;
break;
case 'slide_left':
this.mcs[0]._x = -900 + (this.mcs[0]._x - -900) * 0.9;
if (this.mcs[0]._x < -800) {
return false;
}
return true;
break;
case 'slide_down':
this.mcs[0]._y = 300 + 700 + (this.mcs[0]._y - (300 + 700)) * 0.9;
if (this.mcs[0]._y > 300 + 600) {
return false;
}
return true;
break;
case 'sqr_plode':
if (this.frame > 200) {
return false;
}
var v6 = false;
var v4 = 0;
goto 5629;
for (;;) {
++v4;
label 5629:
if (v4 >= this.ch) break;
var v3 = 0;
goto 5675;
for (;;) {
++v3;
label 5675:
if (v3 >= this.cw) break;
var v5 = this.mcs[v4 * this.cw + v3];
v5._x += v5.vx;
v5._y += v5.vy;
v5._rotation += v5.vr;
v5.vy += 2;
if (this.frame > 10) {
v5._xscale *= this.smul;
v5._yscale *= this.smul;
}
if (v5._y < 1200) {
v6 = true;
}
}
}
if (!v6) {
return false;
}
return true;
break;
case 'sqr_shrink':
if (this.frame > 200) {
return false;
}
var v4 = 0;
goto 6008;
for (;;) {
++v4;
label 6008:
if (v4 >= this.ch) break;
var v3 = 0;
goto 6054;
for (;;) {
++v3;
label 6054:
if (v3 >= this.cw) break;
var v5 = this.mcs[v4 * this.cw + v3];
v5._x += v5.vx;
v5._y += v5.vy;
v5._rotation += v5.vr;
v5._xscale *= this.smul;
v5._yscale *= this.smul;
}
}
return true;
break;
case 'sqr_rollup':
var v2 = Math.floor(this.frame / 6);
if (v2 >= 8) {
return false;
}
var v4 = 0;
goto 6325;
for (;;) {
++v4;
label 6325:
if (v4 >= this.ch) break;
if (v4 & 1) {
if (v2 < 8) {
var v5 = this.mcs[v4 * this.cw + (this.cw - 1 - v2)];
v5._rotation -= 90 / 5;
}
} else {
if (v2 < 8) {
var v5 = this.mcs[v4 * this.cw + v2];
v5._rotation += 90 / 5;
}
}
}
return true;
}
};
ASSetPropFlags(v1, null, 1);
v1.rnd_num = 0;
}
#endinitclip
}
movieClip 20519 __Packages.Replay {
#initclip
if (!Replay) {
_global.Replay = function () {
this.setup();
};
var v1 = _global.Replay.prototype;
v1.setup = function () {
this.keymap = [];
this.keymap.fire = [];
this.keymap.left = [];
this.keymap.right = [];
this.keymap.up = [];
this.keymap.down = [];
this.keymap.fire[0] = Key.SPACE;
this.keymap.fire[1] = Key.CONTROL;
this.keymap.left[0] = Key.LEFT;
this.keymap.left[1] = 65;
this.keymap.right[0] = Key.RIGHT;
this.keymap.right[1] = 68;
this.keymap.up[0] = Key.UP;
this.keymap.up[1] = 87;
this.keymap.down[0] = Key.DOWN;
this.keymap.down[1] = 83;
this.prekey = new Array(64);
this.dat = new Array(1024);
this.str = '';
this.reset();
};
v1.reset = function () {
this.state = Replay.STATE_NONE;
this.key = 0;
this.key_on = 0;
this.key_off = 0;
this.prekey_idx = 0;
this.dat[0] = Clown.tostr(Replay.CODE_VERSION, 1) + Clown.tostr(Replay.VERSION, 2);
this.dat_idx = 0;
this.dat_idx_chunk = 64;
this.str_idx = 0;
this.frame = 0;
this.frame_recorded = 0;
this.frame_wait = 0;
this.premouse_x = 0;
this.premouse_y = 0;
this.mouse_x = 0;
this.mouse_y = 0;
this.play_mouse_x_old = 0;
this.play_mouse_y_old = 0;
this.play_mouse_f_old = 0;
this.play_mouse_x_new = 0;
this.play_mouse_y_new = 0;
this.play_mouse_f_new = 0;
};
v1.record_time = function () {
var v2 = this.frame - this.frame_recorded;
while (v2 > 0) {
if (v2 <= 64) {
this.dat[this.dat_idx] += Clown.tostr(Replay.CODE_TIME_64, 1) + Clown.tostr(v2 - 1, 1);
if (--this.dat_idx_chunk < 0) {
this.dat_idx_chunk = 64;
this.dat[++this.dat_idx] = '';
}
v2 = 0;
} else {
if (v2 <= 4096) {
this.dat[this.dat_idx] += Clown.tostr(Replay.CODE_TIME_4096, 1) + Clown.tostr(v2 - 1, 2);
if (--this.dat_idx_chunk < 0) {
this.dat_idx_chunk = 64;
this.dat[++this.dat_idx] = '';
}
v2 = 0;
} else {
this.dat[this.dat_idx] += Clown.tostr(Replay.CODE_TIME_4096, 1) + Clown.tostr(4096 - 1, 2);
if (--this.dat_idx_chunk < 0) {
this.dat_idx_chunk = 64;
this.dat[++this.dat_idx] = '';
}
v2 -= 4096;
}
}
}
this.frame_recorded = this.frame;
};
v1.prekey_on = function (k) {
this.prekey[this.prekey_idx++] = k;
};
v1.prekey_off = function (k) {
this.prekey[this.prekey_idx++] = 32 + k;
};
v1.prekey_update = function () {
if (this.state == Replay.STATE_RECORD) {
var v2 = 0;
goto 2877;
for (;;) {
++v2;
label 2877:
if (v2 >= this.prekey_idx) break;
var v3 = this.prekey[v2];
if (v3 >= 32) {
this.record_key_off(v3 - 32);
} else {
this.record_key_on(v3);
}
}
} else {
if (this.state == Replay.STATE_NONE) {
var v2 = 0;
goto 3043;
for (;;) {
++v2;
label 3043:
if (v2 >= this.prekey_idx) break;
var v3 = this.prekey[v2];
if (v3 >= 32) {
this.play_key_off(v3 - 32);
} else {
this.play_key_on(v3);
}
}
}
}
this.prekey_idx = 0;
};
v1.play_key_on = function (k) {
var v3 = 1 << k;
if ((this.key & v3) == 0) {
this.key |= v3;
this.key_on |= v3;
this.key_off &= v3 ^ -1;
}
};
v1.record_key_on = function (k) {
var v3 = 1 << k;
if ((this.key & v3) == 0) {
this.play_key_on(k);
this.record_time();
this.dat[this.dat_idx] += Clown.tostr(Replay.CODE_KEY, 1) + Clown.tostr(k, 1);
if (--this.dat_idx_chunk < 0) {
this.dat_idx_chunk = 64;
this.dat[++this.dat_idx] = '';
}
}
};
v1.play_key_off = function (k) {
var v3 = 1 << k;
if ((this.key & v3) != 0) {
this.key &= v3 ^ -1;
this.key_on &= v3 ^ -1;
this.key_off |= v3;
}
};
v1.record_key_off = function (k) {
var v3 = 1 << k;
if ((this.key & v3) == v3) {
this.play_key_off(k);
this.record_time();
this.dat[this.dat_idx] += Clown.tostr(Replay.CODE_KEY, 1) + Clown.tostr(32 + k, 1);
if (--this.dat_idx_chunk < 0) {
this.dat_idx_chunk = 64;
this.dat[++this.dat_idx] = '';
}
}
};
v1.record_mouse = function () {
if (this.state == Replay.STATE_RECORD) {
if (this.play_mouse_f_old != this.frame) {
this.record_time();
this.dat[this.dat_idx] += Clown.tostr(Replay.CODE_MOUSE_XY_4096, 1) + Clown.tostr(this.mouse_x + 2048, 2) + Clown.tostr(this.mouse_y + 2048, 2);
if (--this.dat_idx_chunk < 0) {
this.dat_idx_chunk = 64;
this.dat[++this.dat_idx] = '';
}
this.play_mouse_x_old = this.mouse_x;
this.play_mouse_y_old = this.mouse_y;
this.play_mouse_f_old = this.frame;
}
}
};
v1.start_play = function (_str) {
this.str = _str;
trace('start_play');
trace('replay str_length:' + this.str.length);
trace('replay str:' + this.str);
this.reset();
this.state = Replay.STATE_PLAY;
};
v1.end_play = function () {
trace('end_play');
this.state = Replay.STATE_NONE;
};
v1.start_record = function () {
trace('start_record');
this.reset();
this.find_next_mouse_pos();
this.state = Replay.STATE_RECORD;
};
v1.end_record = function () {
trace('end_record');
this.state = Replay.STATE_NONE;
this.str = this.dat_tostr();
trace(this.str);
};
v1.update = function () {
this.key_on = 0;
this.key_off = 0;
if (this.state == Replay.STATE_PLAY) {
++this.frame;
this.prekey_update();
this.play_update();
} else {
if (this.state == Replay.STATE_RECORD) {
++this.frame;
this.mouse_x = Math.floor(this.premouse_x);
this.mouse_y = Math.floor(this.premouse_y);
this.prekey_update();
} else {
if (this.state == Replay.STATE_NONE) {
this.mouse_x = Math.floor(this.premouse_x);
this.mouse_y = Math.floor(this.premouse_y);
this.prekey_update();
}
}
}
};
v1.dat_tostr = function () {
var v3 = '';
var v2 = 0;
goto 5015;
for (;;) {
++v2;
label 5015:
if (v2 > this.dat_idx) break;
v3 += this.dat[v2];
}
return v3;
};
v1.play_update = function () {
if (typeof this.str != 'string') {
return undefined;
}
while (this.frame_wait <= this.frame) {
if (this.str_idx > this.str.length) {
return undefined;
}
var v2 = Clown.tonum(this.str, this.str_idx++, 1);
switch (v2) {
case Replay.CODE_VERSION:
if (Clown.tonum(this.str, this.str_idx, 2) != Replay.VERSION) {
this.str_idx -= 1;
this.frame_wait += 64;
} else {
this.str_idx += 2;
}
break;
case Replay.CODE_TIME_64:
this.frame_wait += Clown.tonum(this.str, this.str_idx++, 1) + 1;
break;
case Replay.CODE_TIME_4096:
this.frame_wait += Clown.tonum(this.str, this.str_idx, 2) + 1;
this.str_idx += 2;
break;
case Replay.CODE_KEY:
var v3 = Clown.tonum(this.str, this.str_idx++, 1);
if (v3 >= 32) {
this.play_key_off(v3 - 32);
} else {
this.play_key_on(v3);
}
break;
case Replay.CODE_MOUSE_XY_4096:
this.play_mouse_x_old = Clown.tonum(this.str, this.str_idx, 2) - 2048;
this.str_idx += 2;
this.play_mouse_y_old = Clown.tonum(this.str, this.str_idx, 2) - 2048;
this.str_idx += 2;
this.play_mouse_f_old = this.frame;
this.find_next_mouse_pos();
}
}
if (this.play_mouse_f_old <= this.frame && this.play_mouse_f_new > this.frame) {
var v4 = this.frame - this.play_mouse_f_old;
v4 /= this.play_mouse_f_new - this.play_mouse_f_old;
this.mouse_x = this.play_mouse_x_old + (this.play_mouse_x_new - this.play_mouse_x_old) * v4;
this.mouse_y = this.play_mouse_y_old + (this.play_mouse_y_new - this.play_mouse_y_old) * v4;
} else {
this.mouse_x = this.play_mouse_x_new;
this.mouse_y = this.play_mouse_y_new;
}
};
v1.find_next_mouse_pos = function () {
this.play_mouse_x_new = this.play_mouse_x_old;
this.play_mouse_y_new = this.play_mouse_y_old;
this.play_mouse_f_new = this.play_mouse_f_old;
var v5 = this.str_idx;
var v4 = this.frame;
while (this.play_mouse_f_new == this.play_mouse_f_old) {
if (v5 > this.str.length) {
return undefined;
}
var v2 = Clown.tonum(this.str, v5++, 1);
switch (v2) {
case Replay.CODE_TIME_64:
v4 += Clown.tonum(this.str, v5++, 1) + 1;
break;
case Replay.CODE_TIME_4096:
v4 += Clown.tonum(this.str, v5, 2) + 1;
v5 += 2;
break;
case Replay.CODE_MOUSE_XY_4096:
this.play_mouse_x_new = Clown.tonum(this.str, v5, 2) - 2048;
v5 += 2;
this.play_mouse_y_new = Clown.tonum(this.str, v5, 2) - 2048;
v5 += 2;
this.play_mouse_f_new = v4;
return undefined;
break;
default:
v5 += this.code_data_sizes[v2];
}
}
};
v1.clean = function () {};
v1.apply_key_on_to_prekey = function (c, k) {
if (c == this.keymap.fire[0] || c == this.keymap.fire[1]) {
this.prekey_on(Replay.KEY_FIRE);
} else {
if (c == this.keymap.up[0] || c == this.keymap.up[1]) {
this.prekey_on(Replay.KEY_UP);
} else {
if (c == this.keymap.down[0] || c == this.keymap.down[1]) {
this.prekey_on(Replay.KEY_DOWN);
} else {
if (c == this.keymap.left[0] || c == this.keymap.left[1]) {
this.prekey_on(Replay.KEY_LEFT);
} else {
if (c == this.keymap.right[0] || c == this.keymap.right[1]) {
this.prekey_on(Replay.KEY_RIGHT);
}
}
}
}
}
};
v1.apply_key_off_to_prekey = function (c, k) {
if (c == this.keymap.fire[0] || c == this.keymap.fire[1]) {
this.prekey_off(Replay.KEY_FIRE);
} else {
if (c == this.keymap.up[0] || c == this.keymap.up[1]) {
this.prekey_off(Replay.KEY_UP);
} else {
if (c == this.keymap.down[0] || c == this.keymap.down[1]) {
this.prekey_off(Replay.KEY_DOWN);
} else {
if (c == this.keymap.left[0] || c == this.keymap.left[1]) {
this.prekey_off(Replay.KEY_LEFT);
} else {
if (c == this.keymap.right[0] || c == this.keymap.right[1]) {
this.prekey_off(Replay.KEY_RIGHT);
}
}
}
}
}
};
v1.apply_keys_to_prekey = function () {
if (Key.isDown(this.keymap.fire[0]) || Key.isDown(this.keymap.fire[1])) {
this.prekey_on(Replay.KEY_FIRE);
} else {
this.prekey_off(Replay.KEY_FIRE);
}
if (Key.isDown(this.keymap.up[0]) || Key.isDown(this.keymap.up[1])) {
this.prekey_on(Replay.KEY_UP);
} else {
this.prekey_off(Replay.KEY_UP);
}
if (Key.isDown(this.keymap.down[0]) || Key.isDown(this.keymap.down[1])) {
this.prekey_on(Replay.KEY_DOWN);
} else {
this.prekey_off(Replay.KEY_DOWN);
}
if (Key.isDown(this.keymap.left[0]) || Key.isDown(this.keymap.left[1])) {
this.prekey_on(Replay.KEY_LEFT);
} else {
this.prekey_off(Replay.KEY_LEFT);
}
if (Key.isDown(this.keymap.right[0]) || Key.isDown(this.keymap.right[1])) {
this.prekey_on(Replay.KEY_RIGHT);
} else {
this.prekey_off(Replay.KEY_RIGHT);
}
};
ASSetPropFlags(v1, null, 1);
_global.Replay.VERSION = 4;
_global.Replay.STATE_NONE = 0;
_global.Replay.STATE_RECORD = 1;
_global.Replay.STATE_PLAY = 2;
_global.Replay.CODE_VERSION = 0;
_global.Replay.CODE_TIME_64 = 1;
_global.Replay.CODE_TIME_4096 = 2;
_global.Replay.CODE_KEY = 3;
_global.Replay.CODE_MOUSE_XY_4096 = 4;
v1.code_data_sizes = [2, 1, 2, 1, 4];
_global.Replay.KEY_MBUTTON = 0;
_global.Replay.KEY_FIRE = 1;
_global.Replay.KEY_UP = 2;
_global.Replay.KEY_DOWN = 3;
_global.Replay.KEY_LEFT = 4;
_global.Replay.KEY_RIGHT = 5;
_global.Replay.KEY_MAX = 6;
_global.Replay.KEYM_MBUTTON = 1;
_global.Replay.KEYM_FIRE = 2;
_global.Replay.KEYM_UP = 4;
_global.Replay.KEYM_DOWN = 8;
_global.Replay.KEYM_LEFT = 16;
_global.Replay.KEYM_RIGHT = 32;
_global.Replay.KEYM_MAX = 64;
}
#endinitclip
}
movieClip 20520 __Packages.Clown {
#initclip
if (!Clown) {
_global.Clown = function () {};
var v1 = _global.Clown.prototype;
_global.Clown.tostr = function (num, len) {
var v6 = num;
var v7 = '';
var v4 = 0;
goto 382;
for (;;) {
++v4;
label 382:
if (v4 >= len) break;
var v5 = v6 & 63;
v7 += Clown.chars.charAt(v5);
v6 >>= 6;
}
return v7;
};
_global.Clown.tonum = function (str, base, len) {
var v8 = 1;
var v7 = 0;
var v6 = base;
goto 559;
for (;;) {
++v6;
label 559:
if (v6 >= base + len) break;
var v5 = str.charCodeAt(v6);
v7 += Clown.nums[v5] * v8;
v8 *= 64;
}
return v7;
};
_global.Clown.bits_to_str = function (arr, bits) {
if (bits % 6 != 0) {
return null;
}
var v4 = '';
var v5 = 0;
goto 756;
for (;;) {
++v5;
label 756:
if (v5 >= arr.length) break;
v4 += Clown.tostr(arr[v5], bits / 6);
}
return v4;
};
_global.Clown.str_to_bits = function (str, off, bits) {
if (bits % 6 != 0) {
return null;
}
var v7 = bits / 6;
var v6 = [];
var v8 = str.length;
var v5 = off;
goto 966;
for (;;) {
v5 += v7;
label 966:
if (v5 >= v8) break;
v6[v6.length] = Clown.tonum(str, v5, v7);
}
return v6;
};
_global.Clown.bytes_to_pak = function (aa) {
var v4 = aa.length;
var v8 = [];
var v5 = 0;
goto 1109;
for (;;) {
v5 += 3;
label 1109:
if (v5 >= v4) break;
if (v5 + 3 <= v4) {
var v7 = aa[v5 + 0] * 65536;
v7 += aa[v5 + 1] * 256;
v7 += aa[v5 + 2];
} else {
var v7 = aa[v5 + 0] * 65536;
if (v5 + 1 < v4) {
v7 += aa[v5 + 1] * 256;
}
if (v5 + 2 < v4) {
v7 += aa[v5 + 2];
}
}
var v9 = v7 >> 6 + 6 + 6 & 63;
var v10 = Clown.chars.charAt(v9);
v9 = v7 >> 6 + 6 & 63;
v10 += Clown.chars.charAt(v9);
v9 = v7 >> 6 & 63;
v10 += Clown.chars.charAt(v9);
v9 = v7 & 63;
v10 += Clown.chars.charAt(v9);
v8[v8.length] = v10;
}
return v8.join('');
};
_global.Clown.str_to_pak = function (str) {
var v4 = str.length;
var v3 = Clown.tostr(v4, 4);
var v5 = 0;
goto 1738;
for (;;) {
v5 += 3;
label 1738:
if (v5 >= v4) break;
if (v5 + 3 <= v4) {
var v7 = str.charCodeAt(v5 + 0);
v7 += str.charCodeAt(v5 + 1) * 256;
v7 += str.charCodeAt(v5 + 2) * 65536;
v3 += Clown.tostr(v7, 4);
} else {
var v7 = str.charCodeAt(v5 + 0);
if (v5 + 1 < v4) {
v7 += str.charCodeAt(v5 + 1) * 256;
}
if (v5 + 2 < v4) {
v7 += str.charCodeAt(v5 + 2) * 65536;
}
v3 += Clown.tostr(v7, 4);
}
}
return v3;
};
_global.Clown.pak_to_str = function (pak) {
var v3 = '';
var v4 = Clown.tonum(pak, 0, 4);
var v6 = 4;
var v5 = 0;
goto 2239;
for (;;) {
v5 += 3;
label 2239:
if (v5 >= v4) break;
if (v6 > pak.length) {
return v3;
}
if (v5 + 3 <= v4) {
var v8 = Clown.tonum(pak, v6, 4);
v6 += 4;
v3 += String.fromCharCode(v8 & 255, v8 >> 8 & 255, v8 >> 16 & 255);
} else {
var v8 = Clown.tonum(pak, v6, 4);
v6 += 4;
v3 += String.fromCharCode(v8 & 255);
if (v5 + 1 < v4) {
v3 += String.fromCharCode(v8 >> 8 & 255);
}
if (v5 + 2 < v4) {
v3 += String.fromCharCode(v8 >> 16 & 255);
}
}
}
return v3;
};
_global.Clown.clean_str = function (s) {
var v5 = '';
var v3 = 0;
goto 2718;
for (;;) {
++v3;
label 2718:
if (v3 >= s.length) break;
var v4 = s.charCodeAt(v3);
if (Clown.nums[v4] > 0 || v4 == 65) {
v5 += String.fromCharCode(v4);
}
}
return v5;
};
ASSetPropFlags(v1, null, 1);
_global.Clown.chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
_global.Clown.nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 63, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 62, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
#endinitclip
}
movieClip 20521 __Packages.PlayTurn {
#initclip
if (!PlayTurn) {
_global.PlayTurn = function (_up) {
this.up = _up;
};
var v1 = _global.PlayTurn.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function () {
_root.popup = this;
this.mcs = new Array();
this.mc = gfx.create_clip(_root.mc_popup, null);
this.mc.cacheAsBitmap = true;
gfx.dropshadow(this.mc, 5, 45, 0, 1, 20, 20, 2, 3);
this.mc._y = 0;
this.mc.dx = 0;
this.mc._x = -800;
this.mc.onEnterFrame = this.delegate(this.update, null);
this.done = false;
this.steady = false;
gfx.clear(this.mc);
this.mc.style.out = -16777216;
this.mc.style.fill = -2147483648;
gfx.draw_box(this.mc, 0, 100 + 16, +16, 600 - 32, 600 - 32);
var v5 = '<p align=\'center\'>Click here to close this menu and return to the game.</p>';
var v6 = gfx.create_clip(this.mc, null, 150, 50);
v6.tf = gfx.create_text_html(v6, null, 0, 0, 500, 100);
gfx.set_text_html(v6.tf, 24, 16777215, v5);
this.set_butt(v6, 'return');
this.mcs[0] = v6;
if (_root.pbem_id) {
v5 = '<p align=\'center\'>Click here to end your turn, you did make a move didn\'t you?</p>';
} else {
v5 = '<p align=\'center\'>Click here to QUIT the current game and go back to the main menu.</p>';
}
v6 = gfx.create_clip(this.mc, null, 150, 250);
v6.tf = gfx.create_text_html(v6, null, 0, 0, 500, 150);
gfx.set_text_html(v6.tf, 32, 16777215, v5);
this.set_butt(v6, 'quit');
this.mcs[1] = v6;
this.show_loaded();
this.thunk();
Mouse.addListener(this);
};
v1.show_loaded = function () {};
v1.thunk = function () {};
v1.clean = function () {
if (_root.popup != this) {
return undefined;
}
this.mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
_root.poker.clear_clicks();
};
v1.onMouseUp = function () {
if (_root.popup != this) {
return undefined;
}
if (this.steady) {
this.done = true;
this.mc.dx = _root.scalar.ox;
}
};
v1.update = function () {
this.show_loaded();
if (_root.popup != this || _root.pause) {
return undefined;
}
this.mc._x += (this.mc.dx - this.mc._x) / 4;
if ((this.mc._x - this.mc.dx) * (this.mc._x - this.mc.dx) < 16 * 16) {
this.steady = true;
if (this.done) {
this.clean();
}
} else {
this.steady = false;
}
};
v1.set_butt = function (b, id) {
b.onRollOver = this.delegate(this.butt_over, id);
b.onRollOut = this.delegate(this.butt_out, id);
b.onReleaseOutside = this.delegate(this.butt_out, id);
b.onRelease = this.delegate(this.butt_press, id);
};
v1.butt_over = function (id) {
if (id !== 'quit') {
} else {
if (_root.pbem_id) {
_root.poker.ShowFloat('End your turn. You will be emailed again when your opponent makes a move.', 25 * 10);
} else {
_root.poker.ShowFloat('You can rejoin this game, but you might want to let the other players know first so they do not leave as well.', 25 * 10);
}
}
};
v1.butt_out = function (id) {
_root.poker.ShowFloat(null, 0);
};
v1.butt_up = function (id) {};
v1.butt_press = function (id) {
if (id !== 'quit') {
} else {
this.up.up.state_next = 'splash';
_root.swish = new Swish({'style': 'sqr_plode', 'mc': this.up.mc});
_root.pbem_id = null;
}
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20522 __Packages.gfx {
#initclip
if (!gfx) {
_global.gfx = function () {};
var v1 = _global.gfx.prototype;
_global.gfx.create_text_edit = function (mc, depth, x, y, w, h) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
mc.createTextField('tf' + depth, depth, x, y, w, h);
var v8 = mc['tf' + depth];
v8.embedFonts = true;
v8.html = false;
v8.multiline = false;
v8.wordWrap = false;
v8.type = 'input';
v8.selectable = true;
v8.onSetFocus = function () {
var v2 = int;
Selection.getCaretIndex();
if (v2 < 0) {
v2 = 0;
}
Selection.setFocus(this);
Selection.setSelection(0, 0);
Selection.setSelection(v2, v2);
};
v8.setNewTextFormat(gfx.create_text_format(16, -1));
return v8;
};
_global.gfx.create_text = function (mc, depth, x, y, w, h) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
mc.createTextField('tf' + depth, depth, x, y, w, h);
var v8 = mc['tf' + depth];
v8.type = 'dynamic';
v8.embedFonts = true;
v8.html = false;
v8.multiline = true;
v8.selectable = true;
v8.wordWrap = false;
v8.setNewTextFormat(gfx.create_text_format(16, -1));
return v8;
};
_global.gfx.create_text_format = function (fntsiz, fntcol, boldit) {
var v5 = new TextFormat();
v5.font = 'Bitstream Vera Sans';
v5.color = fntcol & 16777215;
v5.size = fntsiz;
if (!boldit) {
v5.bold = false;
return v5;
}
v5.bold = true;
return v5;
};
_global.gfx.create_text_html = function (mc, depth, x, y, w, h) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
mc.createTextField('tf' + depth, depth, x, y, w, h);
var v8 = mc['tf' + depth];
v8.type = 'dynamic';
v8.embedFonts = true;
v8.html = true;
v8.multiline = true;
v8.selectable = false;
v8.wordWrap = true;
v8.setNewTextFormat(gfx.create_text_format(16, -1));
return v8;
};
_global.gfx.set_text_html = function (tf, fntsiz, fntcol, str) {
var v6 = '<font face="Bitstream Vera Sans" size="' + fntsiz + '" color="#' + alt.Sprintf.format('%06x', fntcol & 16777215) + '">';
v6 += str;
v6 += '</font>';
tf.htmlText = v6;
return v6;
};
_global.gfx.create_clip = function (mc, depth, px, py, sx, sy, rot) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
var v9 = mc.createEmptyMovieClip('mc' + depth, depth);
v9.newdepth = 0;
if (px != null) {
v9._x = px;
}
if (py != null) {
v9._y = py;
}
if (sx != null) {
v9._xscale = sx;
}
if (sy != null) {
v9._yscale = sy;
}
if (rot != null) {
v9._rotation = rot;
}
return v9;
};
_global.gfx.add_clip = function (mc, str, depth, px, py, sx, sy, rot) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
var v10 = mc.attachMovie(str, 'mc' + depth, depth);
v10.newdepth = 0;
if (px != null) {
v10._x = px;
}
if (py != null) {
v10._y = py;
}
if (sx != null) {
v10._xscale = sx;
}
if (sy != null) {
v10._yscale = sy;
}
if (rot != null) {
v10._rotation = rot;
}
return v10;
};
_global.gfx.clear = function (mc) {
mc.style = [];
mc.style.out = -1;
mc.style.fill = -1;
mc.clear();
};
_global.gfx.create_rounded_text_button = function (mc, depth, x, y, w, h, b, c, l) {
if (b == null) {
b = 3;
}
if (c == null) {
c = 8;
}
if (l == null) {
l = 2;
}
gfx.draw_rounded_rectangle(mc, b, c, l, x, y, w, h);
var v11 = gfx.create_text_html(mc, depth, x, y, w, h);
return v11;
};
_global.gfx.draw_rounded_rectangle = function (mc, b, c, l, x, y, w, h) {
if (l != 0) {
mc.lineStyle(l, mc.style.out & 16777215, (mc.style.out >> 24 & 255) * 100 / 255);
} else {
mc.lineStyle(undefined, undefined);
}
mc.moveTo(x + b + c, y + b);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.lineTo(x + w - b - c, y + b);
mc.curveTo(x + w - b, y + b, x + w - b, y + b + c);
mc.lineTo(x + w - b, y + h - b - c);
mc.curveTo(x + w - b, y + h - b, x + w - b - c, y + h - b);
mc.lineTo(x + b + c, y + h - b);
mc.curveTo(x + b, y + h - b, x + b, y + h - b - c);
mc.lineTo(x + b, y + b + c);
mc.curveTo(x + b, y + b, x + b + c, y + b);
mc.endFill();
};
_global.gfx.draw_box = function (mc, l, x, y, w, h) {
if (l != 0) {
mc.lineStyle(l, mc.style.out & 16777215, (mc.style.out >> 24 & 255) * 100 / 255);
} else {
mc.lineStyle(undefined, undefined);
}
mc.moveTo(x, y);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.lineTo(x + w, y);
mc.lineTo(x + w, y + h);
mc.lineTo(x, y + h);
mc.lineTo(x, y);
mc.endFill();
};
_global.gfx.draw_fcirc4 = function (mc, l, x1, y1, x2, y2, x3, y3, x4, y4) {
if (l != 0) {
mc.lineStyle(l, mc.style.out & 16777215, (mc.style.out >> 24 & 255) * 100 / 255);
} else {
mc.lineStyle(undefined, undefined);
}
mc.moveTo((x1 + x2) / 2, (y1 + y2) / 2);
mc.beginFill(mc.style.fill & 16777215, (mc.style.fill >> 24 & 255) * 100 / 255);
mc.curveTo(x2, y2, (x2 + x3) / 2, (y2 + y3) / 2);
mc.curveTo(x3, y3, (x3 + x4) / 2, (y3 + y4) / 2);
mc.curveTo(x4, y4, (x4 + x1) / 2, (y4 + y1) / 2);
mc.curveTo(x1, y1, (x1 + x2) / 2, (y1 + y2) / 2);
mc.endFill();
};
_global.gfx.adjust_allmovieclips = function (base, funk) {
for (var nam in base) {
var v4 = base[nam];
if (typeof v4 == 'movieclip') {
gfx.adjust_allmovieclips(v4, funk);
}
}
funk(base);
};
_global.gfx.setscroll = function (mc, minx, miny, sizx, sizy) {
mc.scrollRect = new flash.geom.Rectangle(minx, miny, sizx, sizy);
};
_global.gfx.dropshadow = function (mc, a, b, c, d, e, f, g, h) {
mc.filters = [new flash.filters.DropShadowFilter(a, b, c, d, e, f, g, h)];
};
_global.gfx.glow = function (mc, a, b, c, d, e, f, g, h) {
mc.filters = [new flash.filters.GlowFilter(a, b, c, d, e, f, g, h)];
};
_global.gfx.blur = function (mc, a, b, c) {
mc.filters = [new flash.filters.BlurFilter(a, b, c)];
};
_global.gfx.blurglow = function (mc, aa, bb, cc, a, b, c, d, e, f, g, h) {
mc.filters = [new flash.filters.BlurFilter(aa, bb, cc), new flash.filters.GlowFilter(a, b, c, d, e, f, g, h)];
};
_global.gfx.clear_filters = function (mc) {
mc.filters = null;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20523 __Packages.GizmoMaster {
#initclip
if (!GizmoMaster) {
_global.GizmoMaster = function (_up) {
this.up = _up;
this.setup();
};
var v1 = _global.GizmoMaster.prototype;
v1.setup_base = function () {
this.mc = gfx.create_clip(this.up.mc, null);
this.mc.style = this.up.mc.style;
this.gizmos = new Array();
this.active = true;
this.focus = null;
this.focus_data = null;
this.top = this.up.top;
if (this.top == null) {
this.top = this;
}
};
v1.clean_base = function () {
var v2 = 0;
goto 664;
for (;;) {
++v2;
label 664:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].clean();
}
}
this.mc.removeMovieClip();
this.mc = null;
};
v1.update_base = function () {
this.mc._x = this.x;
this.mc._y = this.y;
var v2 = 0;
goto 859;
for (;;) {
++v2;
label 859:
if (v2 >= this.gizmos.length) break;
if (this.gizmos[v2].active) {
this.gizmos[v2].mc._visible = true;
this.gizmos[v2].update();
} else {
this.gizmos[v2].mc._visible = false;
}
}
};
_global.GizmoMaster.dupe_snapshot = function (snapshot) {
var v3 = {};
v3.key = snapshot.key;
v3.key_on = snapshot.key_on;
v3.key_off = snapshot.key_off;
v3.x = snapshot.x;
v3.y = snapshot.y;
v3.frame = snapshot.frame;
return v3;
};
v1.input_base = function (snapshot) {
var v5 = GizmoMaster.dupe_snapshot(snapshot);
this.mc.localToGlobal(v5);
var v3 = 0;
goto 1231;
for (;;) {
++v3;
label 1231:
if (v3 >= this.gizmos.length) break;
if (this.gizmos[v3].active) {
this.gizmos[v3].mc.globalToLocal(v5);
this.gizmos[v3].input(v5);
this.gizmos[v3].mc.localToGlobal(v5);
}
}
return this.top.focus;
};
v1.child = function (g) {
var v3 = this.gizmos.length;
this.gizmos[v3] = g;
return g;
};
v1.set_area = function (_x, _y, _w, _h) {
this.x = _x;
this.y = _y;
this.w = _w;
this.h = _h;
};
v1.draw_mask = function (px, py) {
gfx.setscroll(this.mc, px, py, this.w, this.h);
};
v1.setup = function () {
this.setup_base();
};
v1.clean = function () {
this.clean_base();
};
v1.update = function () {
var v2 = (new Date()).getTime();
v2 = ((v2 & 16383) - 8192) / 8192;
if (v2 < 0) {
v2 = -v2;
}
var v3 = v2 * v2;
this.spine = v3 + v3 * 2 - v3 * v2 * 2;
this.update_base();
};
v1.input = function (snapshot) {
this.focus = this.input_base(snapshot);
return this.focus;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
movieClip 20524 __Packages.mochi.MochiServices {
#initclip
if (!mochi.MochiServices) {
if (!mochi) {
_global.mochi = new Object();
}
_global.mochi.MochiServices = function () {};
var v1 = _global.mochi.MochiServices.prototype;
_global.mochi.MochiServices.__get__id = function () {
return mochi.MochiServices._id;
};
_global.mochi.MochiServices.__get__clip = function () {
return mochi.MochiServices._container;
};
_global.mochi.MochiServices.getVersion = function () {
return '1.1';
};
_global.mochi.MochiServices.allowDomains = function (server) {
var v3 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v3);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v3);
}
}
return v3;
};
_global.mochi.MochiServices.__get__isNetworkAvailable = function () {
if (System.security) {
var v2 = System.security;
if (v2.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
_global.mochi.MochiServices.__set__comChannelName = function (val) {
if (val != undefined) {
if (val.length > 3) {
mochi.MochiServices._sendChannelName = val + '_fromgame';
mochi.MochiServices._rcvChannelName = val;
mochi.MochiServices.initComChannels();
}
}
return this.__get__comChannelName();
};
_global.mochi.MochiServices.__get__connected = function () {
return mochi.MochiServices._connected;
};
_global.mochi.MochiServices.connect = function (id, clip, onError) {
if (!mochi.MochiServices._connected && mochi.MochiServices._container == undefined) {
trace('MochiServices Connecting...');
mochi.MochiServices._connecting = true;
mochi.MochiServices.init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else {
if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
};
_global.mochi.MochiServices.disconnect = function () {
if (mochi.MochiServices._connected || mochi.MochiServices._connecting) {
mochi.MochiServices._connected = false;
mochi.MochiServices._connecting = mochi.MochiServices._connected;
if (mochi.MochiServices._sendChannel._queue != undefined) {
}
if (mochi.MochiServices._container != undefined) {
mochi.MochiServices._container.removeMovieClip();
delete mochi.MochiServices._container;
}
}
};
_global.mochi.MochiServices.init = function (id, clip) {
mochi.MochiServices._id = id;
if (clip != undefined) {
mochi.MochiServices._container = clip.createEmptyMovieClip('__mochiservicesMC', 16384);
} else {
mochi.MochiServices._container = _root.createEmptyMovieClip('__mochiservicesMC', _root.getNextHighestDepth());
}
mochi.MochiServices.loadCommunicator(id, mochi.MochiServices._container);
};
_global.mochi.MochiServices.loadCommunicator = function (id, clip) {
if (!mochi.MochiServices.isNetworkAvailable) {
return undefined;
}
mochi.MochiServices.allowDomains(mochi.MochiServices._gatewayURL);
mochi.MochiServices._loader = new MovieClipLoader();
mochi.MochiServices._loaderListener = {};
mochi.MochiServices._loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
mochi.MochiServices._loader.addListener(mochi.MochiServices._loaderListener);
mochi.MochiServices._loader.loadClip(mochi.MochiServices._gatewayURL, clip);
mochi.MochiServices._sendChannel = new LocalConnection();
mochi.MochiServices._sendChannel._queue = [];
mochi.MochiServices._rcvChannel = new LocalConnection();
mochi.MochiServices._rcvChannel.allowDomain = function (d) {
return true;
};
mochi.MochiServices._rcvChannel.allowInsecureDomain = mochi.MochiServices._rcvChannel.allowDomain;
mochi.MochiServices._rcvChannel._nextcallbackID = 0;
mochi.MochiServices._rcvChannel._callbacks = {};
mochi.MochiServices.listen();
};
_global.mochi.MochiServices.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.MochiServices._connected = false;
mochi.MochiServices._listenChannel.connect(mochi.MochiServices._listenChannelName);
}
};
_global.mochi.MochiServices.listen = function () {
mochi.MochiServices._listenChannel = new LocalConnection();
mochi.MochiServices._listenChannel.handshake = function (args) {
mochi.MochiServices.comChannelName = args.newChannel;
};
mochi.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.MochiServices._listenChannel.allowInsecureDomain = mochi.MochiServices._listenChannel.allowDomain;
mochi.MochiServices._listenChannel.connect(mochi.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
_global.mochi.MochiServices.initComChannels = function () {
if (!mochi.MochiServices._connected) {
mochi.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
mochi.MochiServices._sendChannel.send(mochi.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.MochiServices._sendChannel.send(mochi.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.MochiServices._id, 'clip': mochi.MochiServices._container, 'version': mochi.MochiServices.getVersion()});
mochi.MochiServices._rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
mochi.MochiServices._rcvChannel.onReceive = function (pkg) {
var v3 = pkg.callbackID;
var v4 = this._callbacks[v3];
if (!v4) {
return undefined;
}
var v5 = v4.callbackMethod;
var v6 = v4.callbackObject;
if (v6 && typeof v5 == 'string') {
v5 = v6[v5];
}
if (v5 != undefined) {
v5.apply(v6, pkg.args);
}
delete this._callbacks[v3];
};
mochi.MochiServices._rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ['IOError']);
};
mochi.MochiServices._rcvChannel.connect(mochi.MochiServices._rcvChannelName);
trace('connected!');
mochi.MochiServices._connecting = false;
mochi.MochiServices._connected = true;
mochi.MochiServices._listenChannel.close();
while (mochi.MochiServices._sendChannel._queue.length > 0) {
mochi.MochiServices._sendChannel.send(mochi.MochiServices._sendChannelName, 'onReceive', mochi.MochiServices._sendChannel._queue.shift());
}
}
};
_global.mochi.MochiServices.send = function (methodName, args, callbackObject, callbackMethod) {
if (mochi.MochiServices._connected) {
mochi.MochiServices._sendChannel.send(mochi.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.MochiServices._rcvChannel._nextcallbackID});
} else {
if (mochi.MochiServices._container == undefined) {
mochi.MochiServices.onError.apply(null, ['NotConnected']);
} else {
mochi.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.MochiServices._rcvChannel._nextcallbackID});
}
}
mochi.MochiServices._rcvChannel._callbacks[mochi.MochiServices._rcvChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.MochiServices._rcvChannel._nextcallbackID;
};
_global.mochi.MochiServices.addProperty('comChannelName', function () {}, _global.mochi.MochiServices.__set__comChannelName);
_global.mochi.MochiServices.addProperty('id', _global.mochi.MochiServices.__get__id, function () {});
_global.mochi.MochiServices.addProperty('isNetworkAvailable', _global.mochi.MochiServices.__get__isNetworkAvailable, function () {});
_global.mochi.MochiServices.addProperty('connected', _global.mochi.MochiServices.__get__connected, function () {});
_global.mochi.MochiServices.addProperty('clip', _global.mochi.MochiServices.__get__clip, function () {});
ASSetPropFlags(v1, null, 1);
_global.mochi.MochiServices._gatewayURL = 'http://www.mochiads.com/static/lib/services/services.swf';
_global.mochi.MochiServices._listenChannelName = '__mochiservices';
_global.mochi.MochiServices._connecting = false;
_global.mochi.MochiServices._connected = false;
}
#endinitclip
}
movieClip 20525 __Packages.PlayWon {
#initclip
if (!PlayWon) {
_global.PlayWon = function (_up) {
this.up = _up;
};
var v1 = _global.PlayWon.prototype;
v1.delegate = function (f, d) {
return com.dynamicflash.utils.Delegate.create(this, f, d);
};
v1.setup = function (_state) {
this.defuck = _root._highquality;
if (_state) {
this.state = _state;
} else {
this.state = 'won';
}
_root.popup = this;
this.mcs = new Array();
this.tfs = new Array();
this.mc = gfx.create_clip(_root.mc_popup, null);
this.mc.cacheAsBitmap = true;
gfx.dropshadow(this.mc, 5, 45, 0, 1, 20, 20, 2, 3);
this.mc._y = 0;
this.mc.dx = 0;
this.mc._x = -800;
this.mc.onEnterFrame = this.delegate(this.update, null);
this.finished = false;
this.steady = false;
gfx.clear(this.mc);
this.mc.style.out = -16777216;
this.mc.style.fill = 1610612736;
gfx.draw_box(this.mc, 0, 100 + 16, +16, 600 - 32, 600 - 32);
this.mcs[2] = gfx.create_clip(this.mc, null);
this.tfs[0] = gfx.create_text_html(this.mcs[2], null, 150, 50, 500, 100);
if (this.state != 'ws') {
var v6 = '';
v6 += '<p align="center"><font size="32"> You scored : <b>' + this.up.hud.points + '</b></font></p>';
v6 += '<p align="center"><font size="16">';
v6 += 'Click here or outside of this box to continue.<br>';
v6 += '</font></p>';
} else {
var v6 = '';
v6 += '<p align="center"><font size="32"> You scored : <b>';
if (this.up.player == 0) {
v6 += this.up.hud.points1;
} else {
v6 += this.up.hud.points2;
}
v6 += '</b></font></p>';
v6 += '<p align="center"><font size="16">';
if (this.up.player == 0) {
if (this.up.hud.points2 < this.up.hud.points1) {
v6 += 'Which beats ' + this.up.hud.points2 + ' Yay!<br>';
} else {
v6 += 'Unfortunately they scored ' + this.up.hud.points2 + '<br>';
}
} else {
if (this.up.hud.points1 < this.up.hud.points2) {
v6 += 'Which beats ' + this.up.hud.points1 + ' Yay!<br>';
} else {
v6 += 'Unfortunately they scored ' + this.up.hud.points1 + '<br>';
}
}
v6 += '</font></p>';
}
this.tfs[0].multiline = true;
this.tfs[0].wordWrap = true;
this.tfs[0].html = true;
this.tfs[0].selectable = false;
gfx.set_text_html(this.tfs[0], 22, 16777215, v6);
this.mcs[2].onRelease = this.delegate(this.click, 'top');
this.mcs[0] = gfx.create_clip(this.mc, null);
this.tfs[1] = gfx.create_text_html(this.mcs[0], null, 150, 50 + 100, 500, 500 - 100);
v6 = '';
v6 += '<p align="center"><font size="16">';
v6 += 'Thank you, please come again.<br>';
v6 += '</font></p>';
this.tfs[1].multiline = true;
this.tfs[1].wordWrap = true;
this.tfs[1].html = true;
this.tfs[1].selectable = false;
gfx.set_text_html(this.tfs[1], 22, 16777215, v6);
this.mcs[0].onRelease = this.delegate(this.click, 'text');
this.mcs[1] = gfx.create_clip(this.mc, null, 200, 150, 100 * 400 / 350, 100 * 400 / 350);
this.newad = true;
this.mc_whore = gfx.create_clip(this.mc, null, 150, 200);
MochiAd.showClickAwayAd({'id': '7cf11a23d99c1aef', 'clip': this.mc_whore, 'res': '500x350'});
this.thunk();
Mouse.addListener(this);
this.done = false;
this.notdone = false;
_root.signals.signal('diamonds', 'won', this);
};
v1.flagnewad = function () {
this.newad = true;
};
v1.thunk = function () {};
v1.click = function (s) {
switch (s) {
break;
case 'text':
case 'whore':
}
};
v1.clean = function () {
if (_root.popup != this) {
return undefined;
}
MochiAd.unload(this.mc_whore);
this.mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
this.up.up.high.setup();
this.up.gameover = true;
_root._highquality = this.defuck;
};
v1.onMouseUp = function () {
if (_root.popup != this) {
return undefined;
}
this.done = true;
};
v1.update = function () {
if (_root.popup != this || _root.pause) {
return undefined;
}
this.mc._x += (this.mc.dx - this.mc._x) / 4;
if ((this.mc._x - this.mc.dx) * (this.mc._x - this.mc.dx) < 16 * 16) {
this.steady = true;
if (this.finished) {
this.clean();
}
} else {
this.steady = false;
}
if (this.done && !this.notdone) {
if (this.steady) {
this.finished = true;
this.mc.dx = _root.scalar.ox;
}
}
this.done = false;
this.notdone = false;
};
ASSetPropFlags(v1, null, 1);
}
#endinitclip
}
frame 1 {
WetDiamonds.main(this);
}
movieClip 1632 auth_kriss {
}
movieClip 1635 auth_shi {
}
movieClip 1638 icon_day {
}
movieClip 1641 icon_rank {
}
movieClip 1644 icon_last {
}
movieClip 1647 icon_mochi {
}
movieClip 1650 icon_guest {
}
movieClip 1653 icon_registered {
}
movieClip 1656 icon_close {
}
movieClip 1659 icon_digg {
}
movieClip 1662 icon_stumble {
}
movieClip 1665 {
}
movieClip 1667 {
}
movieClip 1669 {
}
movieClip 1671 {
}
movieClip 1673 back {
frame 1 {
stop();
}
}
movieClip 1676 obj_fire0 {
}
movieClip 1679 obj_fire1 {
}
movieClip 1682 obj_fire2 {
}
movieClip 1685 obj_fire3 {
}
movieClip 1688 obj_fire4 {
}
movieClip 1691 obj_fire5 {
}
movieClip 1694 obj_fire6 {
}
movieClip 1697 obj_fire7 {
}
movieClip 1700 obj_fire8 {
}
movieClip 1703 obj_fire9 {
}
movieClip 1706 obj_fire {
}
movieClip 1707 obj_earth0 {
}
movieClip 1710 obj_earth1 {
}
movieClip 1713 obj_earth2 {
}
movieClip 1716 obj_earth3 {
}
movieClip 1719 obj_earth4 {
}
movieClip 1722 obj_earth {
}
movieClip 1723 obj_air0 {
}
movieClip 1726 obj_air1 {
}
movieClip 1729 obj_air2 {
}
movieClip 1732 obj_air3 {
}
movieClip 1735 obj_air4 {
}
movieClip 1738 obj_air {
}
movieClip 1739 obj_water0 {
}
movieClip 1742 obj_water1 {
}
movieClip 1745 obj_water2 {
}
movieClip 1748 obj_water3 {
}
movieClip 1751 obj_water4 {
}
movieClip 1754 obj_water5 {
}
movieClip 1757 obj_water6 {
}
movieClip 1760 obj_water7 {
}
movieClip 1763 obj_water8 {
}
movieClip 1766 obj_water9 {
}
movieClip 1769 obj_water {
}
movieClip 1770 obj_meta0 {
}
movieClip 1773 obj_meta1 {
}
movieClip 1776 obj_meta2 {
}
movieClip 1779 obj_meta3 {
}
movieClip 1782 obj_meta4 {
}
movieClip 1785 obj_meta5 {
}
movieClip 1788 obj_meta6 {
}
movieClip 1791 obj_meta7 {
}
movieClip 1794 obj_meta8 {
}
movieClip 1797 obj_meta9 {
}
movieClip 1800 obj_meta {
}
movieClip 1801 swf_splash {
frame 23 {
stop();
}
}
movieClip 2093 swf_interface {
frame 35 {
stop();
}
}