Frame 1
WetDiamonds.main(this);
Symbol 3 MovieClip [register] Frame 49
stop();
Symbol 20480 MovieClip [__Packages.bmcache_item] Frame 0
class bmcache_item
{
var up, idstr, callback, cb_data, bmp, bmp_mc;
function bmcache_item (_up, _idstr, _callback, _cb_data) {
up = _up;
idstr = _idstr;
callback = _callback;
cb_data = _cb_data;
}
function delegate(f, i) {
return(com.dynamicflash.utils.Delegate.create(this, f, i));
}
function loaded_mc() {
if (!bmp) {
var _local2 = (cb_data.bmpw ? (cb_data.bmpw) : 100);
var _local3 = (cb_data.bmph ? (cb_data.bmph) : 100);
var _local4 = (cb_data.bmpt ? (cb_data.bmpt) : true);
bmp = new flash.display.BitmapData(_local2, _local3, _local4, 0);
bmp.draw(bmp_mc.loadhere);
bmp_mc.removeMovieClip();
bmp_mc = null;
}
if (cb_data.onload) {
cb_data.onload(this);
}
}
function chop(from, px, py, sx, sy) {
cb_data = from.cb_data;
var _local7 = (cb_data.bmpt ? (cb_data.bmpt) : true);
bmp = new flash.display.BitmapData(sx, sy, _local7, 0);
bmp.copyPixels(from.bmp, new flash.geom.Rectangle(px, py, sx, sy), new flash.geom.Point(0, 0));
}
function create(mc, idstr, depth) {
if (bmp) {
var _local6 = (cb_data.hx ? (cb_data.hx) : 0);
var _local7 = (cb_data.hy ? (cb_data.hy) : 0);
var _local8 = (cb_data.px ? (cb_data.px) : 0);
var _local9 = (cb_data.py ? (cb_data.py) : 0);
var _local10 = (cb_data.sx ? (cb_data.sx) : 100);
var _local11 = (cb_data.sy ? (cb_data.sy) : 100);
var _local12 = (cb_data.rot ? (cb_data.rot) : 0);
var _local5 = up.create(mc, null, depth);
_local5.createEmptyMovieClip("loadhere", 0);
_local5.loadhere.attachBitmap(bmp, 0, "auto", true);
_local5.loadhere._x = _local6;
_local5.loadhere._y = _local7;
_local5._x = _local8;
_local5._y = _local9;
_local5._xscale = _local10;
_local5._yscale = _local11;
_local5._rotation = _local12;
} else {
var _local5 = callback(mc, idstr, depth, cb_data, this);
}
return(_local5);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20481 MovieClip [__Packages.MainStatic] Frame 0
class MainStatic
{
function MainStatic () {
}
static function choose_and_apply_scalar(me) {
if ((Stage.width / Stage.height) > (((800 / 600) + (1200 / 600)) / 2)) {
if (_root.scalar.ox != 1200) {
gfx.setscroll(me.mc, 0, 0, 1200, 600);
_root.scalar.ox = 1200;
_root.scalar.oy = 600;
}
} else if (_root.scalar.ox != 800) {
gfx.setscroll(me.mc, 0, 0, 800, 600);
_root.scalar.ox = 800;
_root.scalar.oy = 600;
}
_root.scalar.apply(me.mc);
_root.scalar.apply(_root.mc_popup);
_root.scalar.apply(_root.mc_swish);
_root.scalar.apply(_root.__mochiservicesMC);
_root.__mochiservicesMC._xscale = _root.__mochiservicesMC._xscale * 1.5;
_root.__mochiservicesMC._yscale = _root.__mochiservicesMC._yscale * 1.5;
_root.__mochiservicesMC.swapDepths(16385);
}
static function get_base_context_menu(me, ncm) {
if (ncm) {
var _local4 = ncm;
} else {
var _local4 = new ContextMenu();
_local4.hideBuiltInItems();
}
var _local6 = function () {
if (Stage.displayState == "normal") {
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 800, 600);
Stage.displayState = "fullScreen";
} else {
Stage.displayState = "normal";
}
};
var _local5 = new ContextMenuItem("Toggle fullscreen mode.", _local6);
_local4.customItems.push(_local5);
_local6 = function () {
if (Stage.displayState == "normal") {
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, 400, 300);
Stage.displayState = "fullScreen";
} else {
Stage.displayState = "normal";
}
};
_local5 = new ContextMenuItem("Toggle lowscreen mode.", _local6);
_local4.customItems.push(_local5);
_local6 = function () {
this.state_next = "menu";
};
_local5 = new ContextMenuItem("Quit to Main Menu.", com.dynamicflash.utils.Delegate.create(me, _local6));
_local4.customItems.push(_local5);
_local6 = function () {
this.state_next = "login";
};
_local5 = new ContextMenuItem("Logout.", com.dynamicflash.utils.Delegate.create(me, _local6));
_local4.customItems.push(_local5);
return(_local4);
}
static function update_setup() {
return(new Array());
}
static function update_add(tab, func) {
tab[tab.length] = func;
}
static function update_remove(tab, func) {
var _local4 = 0;
for ( ; _local4 < tab.length ; _local4++) {
if (tab[_local4] == func) {
tab.splice(_local4, 1);
return(undefined);
}
}
}
static function update_do(tab) {
var _local3 = 0;
for ( ; _local3 < tab.length ; _local3++) {
tab[_local3]();
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20482 MovieClip [__Packages.BetaComms] Frame 0
class BetaComms
{
var up, php, sending_scores, get_high_after_sending, datas, sent_score, sent_stamp, lv_score, get_high_after_sending_cmd, get_high_after_sending_filter, get_high_after_sending_callback, lv_high, lv_pbem;
function BetaComms (_up) {
up = _up;
php = ("http://" + _root.host) + "/swf/beta.php";
sending_scores = false;
get_high_after_sending = false;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function delegate2(f, d1, d2) {
return(com.dynamicflash.utils.Delegate.create(this, f, d1, d2));
}
function send_score_check() {
if (sent_score < datas.score) {
send_score();
}
}
function send_score_wait_and_check() {
var _local2 = new Date();
if ((_local2.getTime() - sent_stamp) > (1000 * 60)) {
send_score_check();
}
}
function reset_sent_stamp() {
var _local2 = new Date();
sent_stamp = _local2.getTime();
sent_score = datas.score;
return(sent_stamp);
}
function send_score() {
if (_root.skip_wetscore) {
return(undefined);
}
lv_score = new LoadVars();
lv_score.S = _root.Login_Session;
lv_score.name = _root.Login_Name;
lv_score.game = datas.game;
lv_score.host = datas.host;
lv_score.seed = datas.seed;
lv_score.state = datas.state;
lv_score.score = datas.score;
lv_score.moves = datas.moves;
lv_score.time = datas.time;
lv_score.start_time = datas.start_time;
lv_score.replay_str = datas.replay_str;
lv_score.timestamp = reset_sent_stamp();
fbsig.copy_fb_sigs(_root, lv_score);
lv_score.onLoad = delegate(send_score_post, lv_score);
lv_score.sendAndLoad(php + "?cmd=submit", lv_score, "POST");
sending_scores = true;
}
function send_score_post(success, lv) {
sending_scores = false;
if (success) {
if (lv.score != 0) {
_root.talk.chat_status("Sent Score: " + lv.score);
}
}
if (get_high_after_sending) {
get_high(get_high_after_sending_cmd, get_high_after_sending_filter, get_high_after_sending_callback);
get_high_after_sending = false;
}
}
function get_high(cmd, filter, callback) {
if (_root.skip_wetscore) {
return(undefined);
}
if (sending_scores) {
get_high_after_sending_cmd = cmd;
get_high_after_sending_filter = filter;
get_high_after_sending_callback = callback;
get_high_after_sending = true;
return(undefined);
}
lv_high = new LoadVars();
lv_high.S = _root.Login_Session;
lv_high.name = _root.Login_Name;
lv_high.game = datas.game;
lv_high.host = datas.host;
lv_high.seed = datas.seed;
lv_high.state = datas.state;
lv_high.filter = filter;
lv_high.min = 1;
lv_high.max = 10;
fbsig.copy_fb_sigs(_root, lv_high);
lv_high.onLoad = delegate2(get_high_post, lv_high, callback);
lv_high.sendAndLoad((php + "?cmd=") + cmd, lv_high, "POST");
}
function get_high_post(success, lv, callback) {
var _local6 = new Array();
var _local7 = false;
var _local5 = 1;
for ( ; _local5 <= 10 ; _local5++) {
if (lv["name" + _local5] != undefined) {
_local6[_local5 - 1] = (((lv["score" + _local5] + ";") + lv["name" + _local5]) + ";") + lv["seed" + _local5];
_local7 = true;
} else {
_local6[_local5 - 1] = "0;...";
}
}
if (_local7) {
callback(_local6);
}
}
function send_audit(a_scoreid, a_score) {
}
function send_audit_post(success, lv) {
}
function send_pbemstart(game, em1, em2) {
if (_root.skip_wetscore) {
return(undefined);
}
lv_pbem = new LoadVars();
lv_pbem.S = _root.Login_Session;
lv_pbem.name = _root.Login_Name;
lv_pbem.game = game;
lv_pbem.em1 = em1;
lv_pbem.em2 = em2;
lv_pbem.onLoad = delegate(send_pbemstart_post, lv_pbem);
lv_pbem.sendAndLoad(php + "?cmd=pbemstart", lv_pbem, "POST");
}
function send_pbemstart_post(success, lv) {
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20483 MovieClip [__Packages.bmcache] Frame 0
class bmcache
{
var aa, aa_loading, mc, available;
function bmcache () {
aa = new Array();
aa_loading = new Array();
mc = create(_root, null, null);
mc._visible = false;
available = (flash.display.BitmapData ? true : false);
}
function delegate(f, i) {
return(com.dynamicflash.utils.Delegate.create(this, f, i));
}
function clear_loading() {
check_loading();
aa_loading = new Array();
}
function check_loading() {
var _local6 = 0;
var _local7 = 0;
var _local2 = 0;
for ( ; _local2 < aa_loading.length ; _local2++) {
var _local3 = aa_loading[_local2];
if (_local3.bmp_mc) {
var _local4 = _local3.bmp_mc.loadhere.getBytesTotal();
if (Math.floor(_local4) == 0) {
_local4 = 1024 * 16;
}
var _local5 = _local3.bmp_mc.loadhere.getBytesLoaded();
if ((_local5 >= _local4) && (_local3.bmp_mc.loadhere._width > 0)) {
_local3.loaded_mc();
} else {
_local6 = _local6 + _local4;
_local7 = _local7 + _local5;
}
}
}
if (_local6) {
return(_local7 / _local6);
}
return(1);
}
function isloading(idstr) {
if (aa[idstr]) {
return(1);
}
return(0);
}
function isloaded(idstr) {
var _local5 = aa[idstr];
if (!_local5) {
return(0);
}
if (_local5.bmp_mc) {
var _local4 = _local5.bmp_mc.loadhere.getBytesLoaded();
var _local3 = _local5.bmp_mc.loadhere.getBytesTotal();
if (Math.floor(_local3) == 0) {
_local3 = 1024 * 16;
}
if ((_local4 >= _local3) && (_local5.bmp_mc.loadhere._width > 0)) {
_local5.loaded_mc();
}
}
return((_local5.bmp ? 1 : 0));
}
function remember(idstr, callback, cb_data) {
if (aa[idstr] == null) {
aa[idstr] = new bmcache_item(this, idstr, callback, cb_data);
aa[idstr].bmp_mc = callback(mc, idstr, null, cb_data, aa[idstr]);
if (!aa[idstr].bmp) {
aa_loading[aa_loading.length] = aa[idstr];
}
}
}
function forget(idstr) {
aa[idstr] = null;
}
function getbmp(idstr) {
return(aa[idstr].bmp);
}
function create(_mc, idstr, depth, px, py, sx, sy, rot) {
if (_mc.newdepth == undefined) {
_mc.newdepth = 0;
}
if (depth == null) {
depth = ++_mc.newdepth;
}
if ((idstr == null) || (aa[idstr] == null)) {
var _local10 = _mc.createEmptyMovieClip("mc" + depth, depth);
_local10.newdepth = 0;
} else {
var _local10 = aa[idstr].create(_mc, idstr, depth);
}
_local10.newdepth = 0;
if (px != null) {
_local10._x = px;
}
if (py != null) {
_local10._y = py;
}
if (sx != null) {
_local10._xscale = sx;
}
if (sy != null) {
_local10._yscale = sy;
}
if (rot != null) {
_local10._rotation = rot;
}
return(_local10);
}
static function create_generic(mc, idstr, depth, cb_data, item) {
var _local13 = (cb_data.hx ? (cb_data.hx) : 0);
var _local14 = (cb_data.hy ? (cb_data.hy) : 0);
var _local8 = (cb_data.px ? (cb_data.px) : 0);
var _local9 = (cb_data.py ? (cb_data.py) : 0);
var _local10 = (cb_data.sx ? (cb_data.sx) : 100);
var _local11 = (cb_data.sy ? (cb_data.sy) : 100);
var _local12 = (cb_data.rot ? (cb_data.rot) : 0);
var _local7 = item.up.create(mc, null, null, _local8, _local9, _local10, _local11, _local12);
_local7.createEmptyMovieClip("loadhere", 0);
_local7.loadhere._x = _local13;
_local7.loadhere._y = _local14;
return(_local7);
}
static function create_null(mc, idstr, depth, cb_data, item) {
var _local7 = create_generic(mc, idstr, depth, cb_data, item);
item.bmp_mc = _local7;
item.call_loaded_mc = true;
item.loaded_mc();
return(null);
}
static function create_img(mc, idstr, depth, cb_data, item) {
var _local7 = create_generic(mc, idstr, depth, cb_data, item);
var _local8 = gfx.add_clip(_local7.loadhere, cb_data.url, null);
item.bmp_mc = _local7;
item.call_loaded_mc = true;
item.loaded_mc();
return(null);
}
static function create_url(mc, idstr, depth, cb_data, item) {
var _local7 = create_generic(mc, idstr, depth, cb_data, item);
_local7.loadhere.loadMovie(cb_data.url);
return(_local7);
}
function bmp_chop(from, to, px, py, sx, sy) {
if (aa[to] == null) {
if (aa[from]) {
aa[to] = new bmcache_item(this, to, null, null);
aa[to].chop(aa[from], px, py, sx, sy);
}
}
}
function bmp_blit(from, to, fx, fy, sx, sy, tx, ty) {
if (aa[to].bmp && (aa[from].bmp)) {
aa[to].bmp.copyPixels(aa[from].bmp, new flash.geom.Rectangle(fx, fy, sx, sy), new flash.geom.Point(tx, ty));
}
}
function bmp_fill(to, fx, fy, sx, sy, argb) {
if (aa[to].bmp) {
aa[to].bmp.fillRect(new flash.geom.Rectangle(fx, fy, sx, sy), argb);
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20484 MovieClip [__Packages.FieldItem] Frame 0
class FieldItem
{
var up, mc, locked, type, flags, x, y, vx, vy, score, mc2, _x, _y;
function FieldItem (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup(nam) {
mc = gfx.create_clip(up.mc, null);
locked = false;
type = nam;
flags = 0;
x = 0;
y = 0;
vx = 0;
vy = 0;
score = 0;
draw();
}
function draw(src) {
var _local3 = 2;
gfx.clear(mc);
mc2.removeMovieClip();
mc2 = null;
switch (type) {
case null :
break;
case "fire" :
if (_root._highquality <= 1) {
render(mc, 0, 0, 100);
} else {
render(mc, 0, 0, 100);
mc2 = gfx.add_clip(mc, "obj_fire", 1);
mc2._xscale = 100 * _local3;
mc2._yscale = 100 * _local3;
}
break;
case "earth" :
if (_root._highquality <= 1) {
render(mc, 0, 0, 100);
} else {
render(mc, 0, 0, 100);
mc2 = gfx.add_clip(mc, "obj_earth", 1);
mc2._xscale = 100 * _local3;
mc2._yscale = 100 * _local3;
}
break;
case "air" :
if (_root._highquality <= 1) {
render(mc, 0, 0, 100);
} else {
render(mc, 0, 0, 100);
mc2 = gfx.add_clip(mc, "obj_air", 1);
mc2._xscale = 100 * _local3;
mc2._yscale = 100 * _local3;
}
break;
case "water" :
if (_root._highquality <= 1) {
render(mc, 0, 0, 100);
} else {
render(mc, 0, 0, 100);
mc2 = gfx.add_clip(mc, "obj_water", 1);
mc2._xscale = 100 * _local3;
mc2._yscale = 100 * _local3;
}
break;
case "ether" :
if (_root._highquality <= 1) {
render(mc, 0, 0, 100);
} else {
render(mc, 0, 0, 100);
mc2 = gfx.add_clip(mc, "obj_meta", 1);
mc2._xscale = 100 * _local3;
mc2._yscale = 100 * _local3;
}
}
if (_root._highquality == 2) {
gfx.dropshadow(mc, 5, 45, 0, 1, 10, 10, 2, 3);
} else {
mc.filters = null;
mc.cacheAsBitmap = true;
}
if ((src != undefined) && (src != this)) {
mc2.gotoAndStop(1);
mc2.gotoAndStop(src.mc2._currentframe);
mc2._rotation = src.mc2._rotation;
} else {
mc2.gotoAndStop(1);
mc2.gotoAndStop((up.rnd() % 20) + 1);
mc2._rotation = up.rnd() % 360;
}
}
function render(_mc, dx, dy, siz) {
if (_root._highquality <= 1) {
switch (type) {
case null :
break;
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);
}
}
}
function setxy(setx, sety) {
_x = setx;
_y = sety;
if (mc) {
mc._x = setx;
mc._y = sety;
}
}
function launch(_vx, _vy, pts) {
var _local5 = new FieldItem(up.over);
_local5.setup(type);
_local5.draw(this);
_local5.setxy(_x, _y);
_local5.vx = _vx;
_local5.vy = _vy;
gfx.clear(mc);
_local5.mc.filters = null;
_local5.mc.cacheAsBitmap = true;
_local5.mc._xscale = 125;
_local5.mc._yscale = 125;
_local5.mc2.play();
up.launches.push(_local5);
if (pts && (pts != 0)) {
var _local6 = {x:0, y:0};
_local5.mc.localToGlobal(_local6);
up.up.up.over.mc.globalToLocal(_local6);
up.up.up.over.add_floater(("<b>" + pts) + "</b><font size=\"12\">pts</font>", _local6.x, _local6.y);
_root.wetplay.PlaySFX("sfx_jar", 1);
}
up.over.bounces = 0;
return(_local5);
}
function update_launch() {
vy = vy + 8;
setxy(_x + vx, _y + vy);
var _local2 = up.mc._xmouse - _x;
if (up.up.state == "menu") {
if ((_local2 * _local2) < (32 * 32)) {
if (((_y - vy) < up.mc._ymouse) && (_y >= up.mc._ymouse)) {
if (vy > 0) {
setxy(_x, up.mc._ymouse);
vy = -vy;
up.bounces++;
_root.wetplay.PlaySFX("sfx_boing", 0);
}
}
}
}
mc._rotation = mc._rotation + vx;
if (mc._y > 1200) {
return(true);
}
return(false);
}
function clean() {
mc2.removeMovieClip();
mc.removeMovieClip();
}
function update() {
}
function nextframe() {
mc2.gotoAndStop(((mc2._currentframe + 0) % 20) + 1);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20485 MovieClip [__Packages.fbsig] Frame 0
class fbsig
{
function fbsig () {
}
static function copy_fb_sigs(f, t) {
t.fb_sig_time = f.fb_sig_time;
t.fb_sig_added = f.fb_sig_added;
t.fb_sig_user = f.fb_sig_user;
t.fb_sig_profile_update_time = f.fb_sig_profile_update_time;
t.fb_sig_session_key = f.fb_sig_session_key;
t.fb_sig_expires = f.fb_sig_expires;
t.fb_sig_api_key = f.fb_sig_api_key;
t.fb_sig = f.fb_sig;
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20486 MovieClip [__Packages.PlayField] Frame 0
class PlayField
{
var up, mc_scalar, mc, over, tab_w, tab_h, types, launches, tab, available_moves, focus, state, freeze_count, ripple_wait, ripple_idx, chain, mcptop, mcptop_depth, mctop, mctop_depth, swish_from, swish_to, swish_t;
function PlayField (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function setup(nam) {
mc_scalar = gfx.create_clip(up.mc, null);
mc = gfx.create_clip(mc_scalar, null);
over = new Object();
over.up = up;
over.mc = gfx.create_clip(mc_scalar, null);
tab_w = 8;
tab_h = 8;
types = new Array("fire", "earth", "air", "water", "ether");
var _local7 = 0;
for ( ; _local7 < 5 ; _local7++) {
types[types[_local7]] = _local7;
}
launches = new Array();
tab = new Array();
available_moves = new Array(0, 0, 0, 0, 0, 0);
build_board();
focus = null;
state = "user";
freeze_count = 0;
ripple_wait = 0;
ripple_idx = 15;
_root.poker.clear_clicks();
}
function build_board() {
chain = 0;
var _local5 = 0;
for ( ; _local5 < tab_h ; _local5++) {
var _local4 = 0;
for ( ; _local4 < tab_w ; _local4++) {
var _local2 = tab[(_local5 * tab_w) + _local4];
_local2.clean();
tab[(_local5 * tab_w) + _local4] = null;
}
}
_local5 = 0;
for ( ; _local5 < tab_h ; _local5++) {
var _local4 = 0;
for ( ; _local4 < tab_w ; _local4++) {
var _local2 = new FieldItem(this);
_local2.setup(types[up.rnd() % types.length]);
_local2.x = 50 + (100 * _local4);
_local2.y = 50 + (100 * _local5);
_local2.setxy(50 + (100 * _local4), 50 + (100 * _local5));
_local2.mc._xscale = 0;
_local2.mc._yscale = 0;
tab[(_local5 * tab_w) + _local4] = _local2;
_local2.idx = (_local5 * tab_w) + _local4;
}
}
for ( ; check_clears() > 0 ; for ( ; _local6 < tab.length ; _local6++) {
if (tab[_local6].flags) {
tab[_local6].flags = 0tab[_local6].score = 0tab[_local6].type = nulltab[_local6].draw()}
}
, fill_holes()) {
var _local6 = 0;
}
chain = 0;
if (up.gamemode == "puzzle") {
var _local6 = 0;
for ( ; _local6 < 8 ; _local6++) {
var _local4 = up.rnd() % 8;
_local5 = up.rnd() % 8;
var _local2 = tab[(_local5 * tab_w) + _local4];
_local2.locked = true;
gfx.blur(_local2.mc, 4, 4, 4);
}
}
mcptop = gfx.create_clip(mc, null);
mcptop_depth = mc.newdepth;
mctop = gfx.create_clip(mc, null);
mctop_depth = mc.newdepth;
}
function fill_holes() {
var _local3 = 0;
for ( ; _local3 < tab_h ; _local3++) {
var _local2 = 0;
for ( ; _local2 < tab_w ; _local2++) {
var _local4 = tab[(_local3 * tab_w) + _local2];
if (_local4.type == null) {
_local4.type = types[up.rnd() % types.length];
_local4.draw();
}
}
}
}
function check_clears() {
var _local14 = 0;
for ( ; _local14 <= 5 ; _local14++) {
available_moves[_local14] = 0;
}
var _local13 = 0;
var _local10 = 0;
var _local3 = tab_h - 1;
for ( ; _local3 >= 0 ; _local3--) {
var _local2 = tab_w - 1;
for ( ; _local2 >= 0 ; _local2--) {
var _local4 = (_local3 * tab_w) + _local2;
if (tab[_local4].type != null) {
available_moves[types[tab[_local4].type]]++;
var _local15 = false;
var _local11 = 1;
var _local6 = 1;
var _local7 = _local2;
var _local8 = _local3 - 1;
for ( ; _local8 >= 0 ; _local8--) {
var _local9 = (_local8 * tab_w) + _local7;
if ((tab[_local9].type == tab[_local4].type) && (!_local15)) {
_local11++;
_local6++;
} else {
if (_local13 >= 3) {
break;
}
if (tab[_local9].type != null) {
_local11++;
_local15 = true;
} else {
break;
}
}
}
if (_local13 < _local11) {
_local13 = _local11;
}
_local15 = false;
var _local12 = 1;
var _local5 = 1;
_local8 = _local3;
_local7 = _local2 - 1;
for ( ; _local7 >= 0 ; _local7--) {
var _local9 = (_local8 * tab_w) + _local7;
if ((tab[_local9].type == tab[_local4].type) && (!_local15)) {
_local12++;
_local5++;
} else {
if (_local13 >= 3) {
break;
}
if (tab[_local9].type != null) {
_local12++;
_local15 = true;
} else {
break;
}
}
}
if (_local13 < _local12) {
_local13 = _local12;
}
var _local17 = 0;
if (_local6 >= 3) {
_local10 = _local10 + _local6;
_local7 = _local2;
_local8 = _local3;
for ( ; _local8 > (_local3 - _local6) ; _local8--) {
var _local9 = (_local8 * tab_w) + _local7;
if (!(tab[_local9].flags & 3)) {
_local17 = _local17 + 100;
}
tab[_local9].flags = tab[_local9].flags | 1;
var _local16 = tab[_local9];
}
_local16.score = _local16.score + _local17;
if (chain > 0) {
_local16.score = _local16.score + (10 * chain);
}
if (_local6 >= 4) {
_local16.score = _local16.score + (10 * (chain + 1));
}
}
_local17 = 0;
if (_local5 >= 3) {
_local10 = _local10 + _local5;
_local8 = _local3;
_local7 = _local2;
for ( ; _local7 > (_local2 - _local5) ; _local7--) {
var _local9 = (_local8 * tab_w) + _local7;
if (!(tab[_local9].flags & 3)) {
_local17 = _local17 + 100;
}
tab[_local9].flags = tab[_local9].flags | 2;
var _local16 = tab[_local9];
}
_local16.score = _local16.score + _local17;
if (chain > 0) {
_local16.score = _local16.score + (10 * chain);
}
if (_local5 >= 4) {
_local16.score = _local16.score + (10 * (chain + 1));
}
}
}
}
}
available_moves[5] = _local13;
if (_local10 > 0) {
chain++;
}
return(_local10);
}
function do_clears() {
var _local3 = 0;
var _local2 = 0;
for ( ; _local2 < tab.length ; _local2++) {
if (tab[_local2].flags) {
_local3 = _local3 + 1;
var _local4 = 1;
if (tab[_local2].flags == 3) {
_local4 = 2;
}
up.score(tab[_local2].score);
tab[_local2].launch(((up.rnd() & 255) - 128) / 4, ((up.rnd() & 255) - 512) / 4, tab[_local2].score);
tab[_local2].flags = 0;
tab[_local2].type = null;
tab[_local2].draw();
tab[_local2].locked = false;
tab[_local2].mc.filters = null;
tab[_local2].score = 0;
}
}
return(_local3);
}
function check_drops() {
var _local6 = 0;
var _local3 = tab_h - 2;
for ( ; _local3 >= 0 ; _local3--) {
var _local2 = tab_w - 1;
for ( ; _local2 >= 0 ; _local2--) {
var _local4 = (_local3 * tab_w) + _local2;
if ((tab[_local4].type != null) && (!tab[_local4].locked)) {
var _local5 = ((_local3 + 1) * tab_w) + _local2;
if ((tab[_local5].type == null) || (tab[_local5].flags)) {
tab[_local4].flags = 4;
_local6 = _local6 + 1;
}
}
}
}
if (up.gamemode == "endurance") {
_local3 = 0;
var _local2 = tab_w - 1;
for ( ; _local2 >= 0 ; _local2--) {
var _local4 = (_local3 * tab_w) + _local2;
if (tab[_local4].type == null) {
tab[_local4].mc._xscale = 0;
tab[_local4].mc._yscale = 0;
tab[_local4].type = types[up.rnd() % types.length];
tab[_local4].draw();
_local6 = _local6 + 1;
}
}
}
return(_local6);
}
function inject_line() {
var _local3 = 0;
var _local2 = tab_w - 1;
for ( ; _local2 >= 0 ; _local2--) {
var _local4 = (_local3 * tab_w) + _local2;
if (tab[_local4].type == null) {
tab[_local4].mc._xscale = 100;
tab[_local4].mc._yscale = 100;
tab[_local4].type = tab[_local4 + (tab_w * tab_h)].type;
tab[_local4].draw();
var _local6 = _local6 + 1;
tab[_local4 + (tab_w * tab_h)].type = types[up.rnd() % types.length];
tab[_local4 + (tab_w * tab_h)].draw();
tab[_local4 + (tab_w * tab_h)].setxy(tab[_local4 + (tab_w * tab_h)].x, tab[_local4 + (tab_w * tab_h)].y);
}
}
return(_local6);
}
function do_drops() {
var _local5 = 0;
var _local2 = tab.length - 1;
for ( ; _local2 >= 0 ; _local2--) {
var _local3 = tab[_local2];
if (_local3.flags) {
_local3.nextframe();
_local3.nextframe();
_local5 = _local5 + 1;
_local3.setxy(_local3._x, _local3._y + 20);
var _local6 = _local3._y - _local3.y;
if (_local6 >= (100 - 20)) {
var _local4 = tab[_local2 + tab_w];
_local4.type = _local3.type;
_local4.draw(_local3);
_local3.setxy(_local3._x, _local3.y);
_local3.type = null;
_local3.draw();
_local3.flags = 0;
}
}
}
return(_local5);
}
function do_swish() {
var _local5 = Math.sqrt(((swish_to.x - swish_from.x) * (swish_to.x - swish_from.x)) + ((swish_to.y - swish_from.y) * (swish_to.y - swish_from.y)));
_local5 = ((_local5 < 200) ? 0.2 : 0.1);
swish_t = swish_t + _local5;
var _local3 = swish_t;
_local3 = _local3 * 0.5;
var _local4 = _local3 * _local3;
var _local2 = ((_local4 + (_local4 * 2)) - ((_local4 * _local3) * 2)) * 2;
if (swish_t >= 1) {
swish_from.setxy(swish_from.x, swish_from.y);
swish_to.setxy(swish_to.x, swish_to.y);
return(0);
}
swish_from.nextframe();
swish_to.nextframe();
swish_from.mc._xscale = 150;
swish_from.mc._yscale = 150;
swish_to.mc._xscale = 150;
swish_to.mc._yscale = 150;
swish_from.setxy(swish_from.x + ((swish_to.x - swish_from.x) * _local2), swish_from.y + ((swish_to.y - swish_from.y) * _local2));
swish_to.setxy(swish_to.x + ((swish_from.x - swish_to.x) * _local2), swish_to.y + ((swish_from.y - swish_to.y) * _local2));
return(1);
}
function clean() {
while (launches.length) {
launches[0].clean();
launches.splice(0, 1);
}
mc.removeMovieClip();
}
function update_user() {
if (focus.type == null) {
focus = null;
}
if (focus) {
if (focus.locked) {
focus = null;
}
}
if (focus) {
focus.nextframe();
}
if (up.turnactive) {
var _local10 = 0;
for ( ; _local10 < (_root.poker.clicks.length + 1) ; _local10++) {
var _local11 = _root.poker.clicks[_local10];
if (_local11) {
mc.globalToLocal(_local11);
var _local2 = _local11.x;
var _local3 = _local11.y;
var _local4 = _local11.click;
} else {
var _local4 = 0;
var _local2 = mc._xmouse;
var _local3 = mc._ymouse;
}
if ((_local2 >= 0) && ((_local2 < 800) && ((_local3 > 0) && (_local3 < 800)))) {
var _local2 = Math.floor(_local2 / 100);
var _local3 = Math.floor(_local3 / 100);
var _local5 = _local2 + (_local3 * tab_w);
if (tab[_local5] != focus) {
if ((tab[_local5].type != null) && (!tab[_local5].locked)) {
tab[_local5].mc._xscale = 150;
tab[_local5].mc._yscale = 150;
tab[_local5].nextframe();
}
}
if (!focus) {
tab[_local5].mc.swapDepths(mctop_depth);
} else if (tab[_local5] != focus) {
tab[_local5].mc.swapDepths(mcptop_depth);
}
if (_local4 == 1) {
if (tab[_local5] != focus) {
if ((tab[_local5].type != null) && (!tab[_local5].locked)) {
if (focus == null) {
tab[_local5].mc._xscale = 150;
tab[_local5].mc._yscale = 150;
focus = tab[_local5];
}
}
} else {
focus = null;
}
}
if (_local4 == -1) {
if (tab[_local5] != focus) {
if ((tab[_local5].type != null) && (!tab[_local5].locked)) {
if (focus != null) {
swish_from = focus;
swish_to = tab[_local5];
tab[_local5].mc._xscale = 150;
tab[_local5].mc._yscale = 150;
focus = null;
swish_t = 0;
state = "swish";
_root.wetplay.PlaySFX("sfx_swish", 3);
freeze_count = freeze_count + 1;
up.next_turn((swish_from.idx + "/") + swish_to.idx);
up.choose_color(swish_from.type);
up.choose_color(swish_to.type);
up.score(-1);
}
}
}
}
}
}
} else {
focus = null;
var _local12 = up.next_turn();
if (_local12) {
if (_local12 == "-1/-1") {
focus = null;
up.next_turn(_local12);
} else if (_local12 == "-2/-2") {
focus = null;
up.next_turn(_local12);
} else {
var _local13 = _local12.split("/");
var _local14 = Math.floor(_local13[0]);
var _local15 = Math.floor(_local13[1]);
swish_from = tab[_local14];
swish_to = tab[_local15];
tab[_local14].mc._xscale = 150;
tab[_local14].mc._yscale = 150;
tab[_local15].mc._xscale = 150;
tab[_local15].mc._yscale = 150;
focus = null;
swish_t = 0;
state = "swish";
_root.wetplay.PlaySFX("sfx_swish", 3);
freeze_count = freeze_count + 1;
up.next_turn(_local12);
up.choose_color(swish_from.type);
up.choose_color(swish_to.type);
up.score(-1);
}
}
}
_root.poker.clear_clicks();
}
function update() {
switch (state) {
case "check" :
if (check_clears() > 0) {
clear_sfx_chan++;
}
if (do_clears() > 0) {
state = "fall_check";
} else {
state = "user";
ripple_wait = 0;
ripple_idx = 0;
}
if (up.gamemode == "endurance") {
update_user();
}
break;
case "fall_check" :
if (check_drops() > 0) {
do_drops();
state = "fall";
} else {
state = "check";
}
if (up.gamemode == "endurance") {
update_user();
}
break;
case "fall" :
if (do_drops() == 0) {
if (check_clears() > 0) {
clear_sfx_chan++;
}
do_clears();
state = "fall_check";
}
if (up.gamemode == "endurance") {
update_user();
}
break;
case "swish" :
if (do_swish() == 0) {
chain = 0;
var _local9 = swish_from.type;
swish_from.type = swish_to.type;
swish_to.type = _local9;
swish_to.draw(swish_from);
swish_from.draw();
if (check_clears() > 0) {
clear_sfx_chan++;
}
do_clears();
state = "fall_check";
}
break;
case "user" :
var _local4 = 0;
for ( ; _local4 < freeze_count ; _local4++) {
if (up.gamemode == "endurance") {
var _local6 = up.rnd() % 8;
var _local7 = up.rnd() % 8;
var _local5 = tab[(_local7 * tab_w) + _local6];
if (_local5.type != null) {
_local5.locked = true;
gfx.blur(_local5.mc, 4, 4, 4);
}
}
}
freeze_count = 0;
update_user();
if (ripple_wait > 0) {
ripple_wait--;
ripple_idx = 15;
} else if (ripple_idx <= 0) {
ripple_wait = (up.rnd() % (30 * 15)) + (30 * 5);
} else {
ripple_idx--;
var _local7 = 0;
// unexpected jump
for(;;){
_local7++;
if (_local7 >= tab_h) {
break;
}
var _local6 = 0;
for ( ; _local6 < tab_w ; _local6++) {
if ((_local6 + _local7) == ripple_idx) {
var _local8 = (_local7 * tab_w) + _local6;
if ((tab[_local8].type != null) && (!tab[_local8].locked)) {
if (tab[_local8].mc._xscale < 125) {
tab[_local8].mc._xscale = 125;
tab[_local8].mc._yscale = 125;
}
}
}
}
};
}
}
_local4 = 0;
for ( ; _local4 < (tab_w * tab_h) ; _local4++) {
if (tab[_local4].locked) {
if (tab[_local4].mc._xscale != 50) {
var _local10 = Math.ceil((50 + tab[_local4].mc._xscale) / 2);
tab[_local4].mc._xscale = _local10;
tab[_local4].mc._yscale = _local10;
}
} else if (tab[_local4].mc._xscale != 100) {
if (tab[_local4] != focus) {
var _local10 = Math.ceil((100 + tab[_local4].mc._xscale) / 2);
tab[_local4].mc._xscale = _local10;
tab[_local4].mc._yscale = _local10;
}
}
}
_local4 = 0;
for ( ; _local4 < launches.length ; _local4++) {
if (launches[_local4].update_launch()) {
launches[_local4].clean();
launches.splice(_local4, 1);
_local4--;
}
}
if (launches.length == 0) {
if ((available_moves[5] < 3) || ((available_moves[0] < 3) && ((available_moves[1] < 3) && ((available_moves[2] < 3) && ((available_moves[3] < 3) && (available_moves[4] < 3)))))) {
up.stage_end();
}
}
}
function render_all() {
var _local2 = 0;
for ( ; _local2 < (tab_w * tab_h) ; _local2++) {
tab[_local2].render(mc, tab[_local2]._x, tab[_local2]._y, tab[_local2].mc._xscale);
}
}
function redraw_all() {
var _local2 = 0;
for ( ; _local2 < (tab_w * tab_h) ; _local2++) {
tab[_local2].draw(tab[_local2]);
}
}
//ASSetPropFlags(_local1, null, 1);
var rnd_num = 0;
var clear_sfx_chan = 0;
}
Symbol 20487 MovieClip [__Packages.WetDiamondsPlay] Frame 0
class WetDiamondsPlay
{
var gamemode, gameskill, gamecomms, up, turn, stage_turn, player, stage, noscore, acts, turnactive, choosen, done_adds, mc, mc_back, mc_ads, won, turnmenu, field, hud, lastmsg;
function WetDiamondsPlay (_up) {
gamemode = "endurance";
gameskill = "normal";
gamecomms = null;
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function setup() {
turn = 0;
stage_turn = 0;
player = 0;
stage = 0;
noscore = false;
acts = null;
turnactive = true;
gamecomms = null;
if (up.lobby.gamedata) {
gamecomms = up.lobby.gamedata;
up.lobby.gamedata = null;
up.game_seed = Math.floor(gamecomms.styles.seed);
gamemode = "puzzle";
player = gamecomms.player_idx - 1;
choosen = new Array({t:"", used:false}, {t:"", used:false}, {t:"", used:false}, {t:"", used:false});
}
rnd_seed(up.game_seed);
_root.signals.signal("diamonds", "start", this);
done_adds = false;
mc = gfx.create_clip(up.mc, null);
mc_back = gfx.add_clip(mc, "back", null);
mc_ads = gfx.create_clip(mc, null);
gfx.dropshadow(mc_ads, 2, 45, 0, 1, 4, 4, 2, 3);
won = new PlayWon(this);
turnmenu = new PlayTurn(this);
field = new PlayField(this);
field.setup();
field.mc_scalar._x = 200;
field.mc_scalar._y = 100 - 20;
field.mc_scalar._xscale = 100 * (400 / 800);
field.mc_scalar._yscale = field.mc_scalar._xscale;
hud = new PlayHUD(this);
hud.setup();
if (!skip_high) {
if (!gamecomms) {
up.high.setup();
}
}
skip_high = false;
setup_ads();
thunk();
if (player == -1) {
gmsgsend({gcmd:"acts", gnam:gamecomms.gamename, gtim:0, gtyp:"watch"});
} else {
gmsgsend({gcmd:"acts", gnam:gamecomms.gamename, gtim:0, gtyp:"play"});
}
}
function clean() {
_root.signals.signal("diamonds", "end", this);
field.clean();
mc.removeMovieClip();
_root.poker.ShowFloat(null, 0);
}
function thunk() {
if (!gamecomms) {
return(undefined);
}
if (acts == null) {
hud.turn_str("<p align=\"center\">Please wait for network connection.</p>");
turnactive = false;
} else if (acts[turn]) {
hud.turn_str("<p align=\"center\"><font color=\"#ffffff\"><b>Please wait whilst the recorded turns are replayed.</font></b></p>");
turnactive = false;
hud.butt_ids.pass1._visible = false;
hud.butt_ids.pass2._visible = false;
} else if ((turn & 1) == player) {
hud.turn_str("<p align=\"center\"><font color=\"#88ff88\"><b>You have no chance to survive make your time.</font></b></p>");
turnactive = true;
hud.butt_ids.pass1._visible = true;
hud.butt_ids.pass2._visible = true;
} else {
hud.turn_str("<p align=\"center\"><font color=\"#ff8888\"><b>Waiting for the other player.</font></b></p>");
turnactive = false;
hud.butt_ids.pass1._visible = false;
hud.butt_ids.pass2._visible = false;
}
}
function next_turn(msg) {
if (!gamecomms) {
return(null);
}
if (msg == null) {
if (acts[turn]) {
return(acts[turn]);
}
return(null);
}
if (!acts[turn]) {
gmsgsend({gcmd:"act", gnam:gamecomms.gamename, gtim:turn, gdat:msg});
}
turn++;
stage_turn++;
if ((stage_turn > 1) && ((msg == "-1/-1") && (acts[turn - 2] == "-1/-1"))) {
stage_end();
}
if (turn & 1) {
hud.mc2._xscale = 200;
hud.mc2._yscale = 200;
} else {
hud.mc4._xscale = 200;
hud.mc4._yscale = 200;
}
thunk();
return(null);
}
function choose_update() {
if (gamecomms) {
var _local2 = 0;
for ( ; _local2 < 4 ; _local2++) {
if (choosen[_local2].t != "") {
var _local3 = field.types[choosen[_local2].t];
if (field.available_moves[_local3] == 0) {
if (!choosen[_local2].used) {
choosen[_local2].used = true;
if (_local2 < 2) {
hud.points1 = hud.points1 + 1000;
} else {
hud.points2 = hud.points2 + 1000;
}
var _local4 = {x:0, y:0};
hud.choosen[_local2].mc.localToGlobal(_local4);
up.over.mc.globalToLocal(_local4);
up.over.add_floater(("<b>" + 1000) + "</b><font size=\"12\">pts</font>", _local4.x, _local4.y);
}
}
}
}
}
}
function choose_color(t) {
if (gamecomms) {
var _local3 = 0;
for ( ; _local3 < 4 ; _local3++) {
if (choosen[_local3].t == t) {
return(undefined);
}
}
if (((turn - 1) & 1) == 0) {
if (choosen[0].t == "") {
choosen[0].t = t;
hud.choosen[0].type = t;
hud.choosen[0].draw();
hud.choosen[0].mc._visible = true;
} else if (choosen[1].t == "") {
choosen[1].t = t;
hud.choosen[1].type = t;
hud.choosen[1].draw();
hud.choosen[1].mc._visible = true;
}
} else if (choosen[2].t == "") {
choosen[2].t = t;
hud.choosen[2].type = t;
hud.choosen[2].draw();
hud.choosen[2].mc._visible = true;
} else if (choosen[3].t == "") {
choosen[3].t = t;
hud.choosen[3].type = t;
hud.choosen[3].draw();
hud.choosen[3].mc._visible = true;
}
}
}
function stage_end() {
if (!gamecomms) {
won.setup();
} else if (stage == 0) {
stage++;
hud.butt_changed("stage");
stage_turn = 0;
noscore = true;
rnd_seed(up.game_seed);
field.build_board();
if (((turn & 1) == 0) && ((stage & 1) == 1)) {
turn++;
stage_turn++;
}
choosen = new Array({t:"", used:false}, {t:"", used:false}, {t:"", used:false}, {t:"", used:false});
hud.choosen[0].mc._visible = false;
hud.choosen[1].mc._visible = false;
hud.choosen[2].mc._visible = false;
hud.choosen[3].mc._visible = false;
noscore = false;
} else if (player != -1) {
gmsgsend({gcmd:"start", gnam:gamecomms.gamename, garg:(hud.points1 + ",") + hud.points2, gtyp:"finish"});
won.setup("ws");
} else {
won.setup("ws");
}
}
function update() {
setup_ads();
if (_root.popup || (_root.pause)) {
return(undefined);
}
_root.signals.signal("diamonds", "update", this);
field.update();
choose_update();
hud.update();
}
function score(p) {
if (gamecomms) {
if (!noscore) {
if (((turn - 1) & 1) == 0) {
hud.points1 = hud.points1 + p;
} else {
hud.points2 = hud.points2 + p;
}
}
} else {
hud.points = hud.points + p;
}
}
function setup_ads() {
if (up.wonderfulls && (!done_adds)) {
if (gamecomms) {
var _local3 = Math.floor((800 - (147 * 5)) / 2);
var _local4 = 500 - 4;
var _local2 = 0;
for ( ; _local2 < 8 ; _local2++) {
var _local6 = up.wonderfulls[_local2];
var _local5 = gfx.create_clip(mc_ads, null);
var _local7 = gfx.create_clip(_local5, null);
_local7._lockroot = true;
_local5.onRelease = delegate(goad, _local6);
_local5.onRollOver = delegate(onad, _local6);
_local5.onRollOut = delegate(offad, _local6);
_local5._x = _local3;
_local5._y = _local4;
_local5._xscale = (100 * 600) / 480;
_local5._yscale = (100 * 600) / 480;
_local7.loadMovie(_local6.img);
_local3 = _local3 + 147;
if (_local2 == 3) {
_local3 = _local3 - (147 * 3);
_local4 = _local4 + 39;
}
}
} else {
var _local3 = (800 + 10) - 180;
var _local4 = 120;
var _local2 = 0;
for ( ; _local2 < 8 ; _local2++) {
var _local6 = up.wonderfulls[_local2];
var _local5 = gfx.create_clip(mc_ads, null);
var _local7 = gfx.create_clip(_local5, null);
_local7._lockroot = true;
_local5.onRelease = delegate(goad, _local6);
_local5.onRollOver = delegate(onad, _local6);
_local5.onRollOut = delegate(offad, _local6);
_local5._x = _local3;
_local5._y = _local4;
_local5._xscale = (100 * 600) / 480;
_local5._yscale = (100 * 600) / 480;
_local7.loadMovie(_local6.img);
_local4 = _local4 + 45;
}
}
done_adds = true;
}
}
function goad(w) {
if (!_root.popup) {
getURL (w.url, w.target);
}
}
function onad(w) {
if (!_root.popup) {
_root.poker.ShowFloat(w.txt, 25 * 10);
}
}
function offad(w) {
if (!_root.popup) {
_root.poker.ShowFloat(null, 0);
}
}
function do_str(str) {
switch (str) {
case "won" :
if (gamecomms) {
up.state_next = "splash";
} else {
up.do_str("restart");
}
break;
default :
up.do_str(str);
}
}
function gmsgsend(msg) {
if (_root.sock) {
_root.sock.gmsg(msg, delegate(gmsgback, msg));
lastmsg = msg;
_root.sock.gmsg(null, delegate(gmsgback, null));
}
}
function gmsgback(msg, sentmsg) {
if (!sentmsg) {
switch (msg.gcmd) {
case "act" :
acts[Math.floor(msg.gtim)] = msg.gdat;
thunk();
break;
default :
}
} else {
switch (sentmsg.gcmd) {
case "acts" :
acts = new Array();
var _local6 = msg.gret.split(";");
var _local7 = 0;
for ( ; _local7 < _local6.length ; _local7++) {
_local6[_local7] = _local6[_local7].split(",");
}
if (_local6[0][0] == "OK") {
_local6[0].splice(0, 1);
_local7 = 0;
for ( ; _local7 < _local6.length ; _local7++) {
var _local9 = 0;
for ( ; _local9 < _local6[_local7].length ; _local9++) {
var _local8 = _local6[_local7][_local9].split(":");
if (_local8[0] != "") {
acts[Math.floor(_local8[0])] = _local8[1];
}
}
}
}
thunk();
break;
default :
}
}
}
//ASSetPropFlags(_local1, null, 1);
var skip_high = false;
var rnd_num = 0;
}
Symbol 20488 MovieClip [__Packages.Login] Frame 0
class Login
{
var up, user_php, viewYdest, viewY, frame, file_name, file_lines, dat, mc, zmc, omc, mcs, parallax, mcs_max, topmc, over, timeout_lv, timeout_time, timeout_func;
function Login (_up) {
up = _up;
_root.login = this;
}
function delegate(f, d, i) {
return(com.dynamicflash.utils.Delegate.create(this, f, d, i));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function setup() {
if (_root.skip_wetlogin) {
so_load();
_root.Login_Name = "me";
_root.Login_Done = true;
_root.Login_Session = 0;
up.state_next = "menu";
return(undefined);
}
user_php = ("http://" + _root.host) + "/swf/users.php";
viewYdest = 0;
viewY = 0;
frame = 0;
file_name = "register";
file_lines = register_lines;
dat.saves_reset_temps();
mc.removeMovieClip();
mc = gfx.create_clip(up.mc, null);
zmc = gfx.create_clip(mc, null);
omc = gfx.create_clip(mc, null, 400, 300);
mcs = new Array();
parallax = new Array();
var _local8 = 0;
var _local9 = null;
mcs_max = file_lines.length - 1;
var _local2 = 0;
for ( ; _local2 < mcs_max ; _local2++) {
var _local3 = file_lines[_local2];
var _local4 = _local3.split(",");
if (_local4[0] == "") {
_local4[0] = null;
}
if (_local4[1] == "") {
_local4[1] = null;
}
if (_local4[2] == "") {
_local4[2] = null;
}
_local9 = parallax[_local4[1]];
if (_local9 == null) {
_local9 = gfx.create_clip(zmc, null, 400, 300);
_local9.zoom = 1;
parallax[_local4[1]] = _local9;
_local9.cacheAsBitmap = true;
switch (_local4[1]) {
case "login" :
_local9._y = _local9._y - 600;
break;
case "signup" :
_local9._y = _local9._y + 600;
}
}
if (_local4[0] == "circ") {
mcs[_local2] = gfx.create_clip(_local9, null);
mcs[_local2].mc = gfx.add_clip(mcs[_local2], file_name, null);
mcs[_local2].mc.gotoAndStop(_local2 + 1);
mcs[_local2].cacheAsBitmap = true;
var _local5 = mcs[_local2].mc.getBounds(mcs[_local2]);
_local5.fx = (_local5.xMax + _local5.xMin) / 2;
_local5.fy = (_local5.yMax + _local5.yMin) / 2;
mcs[_local2]._x = mcs[_local2]._x + (_local5.fx - 400);
mcs[_local2].mc._x = mcs[_local2].mc._x - _local5.fx;
mcs[_local2]._y = mcs[_local2]._y + (_local5.fy - 300);
mcs[_local2].mc._y = mcs[_local2].mc._y - _local5.fy;
} else {
mcs[_local2] = gfx.add_clip(_local9, file_name, null);
var _local6 = mcs[_local2];
_local6._x = -400;
_local6._y = -300;
_local6.gotoAndStop(_local2 + 1);
_local6.cacheAsBitmap = true;
}
_local6.active = true;
_local6.onPress = delegate(press, _local6);
_local6.onRelease = delegate(click, _local6);
_local6.onRollOver = delegate(hover_on, _local6);
_local6.onRollOut = delegate(hover_off, _local6);
_local6.onReleaseOutside = delegate(hover_off, _local6);
_local6.tabEnabled = false;
_local6.useHandCursor = false;
var _local6 = mcs[_local2];
_local6.idx = _local2;
_local6.nam = _local4[0];
_local6.group = _local4[1];
_local6.nams = _local6.nam.split("_");
_local6._visible = true;
switch (_local6.nams[0]) {
case "but" :
_local6._alpha = 25;
if (_local6.nams[1] == "flag") {
_local6._visible = false;
}
_local6.useHandCursor = true;
break;
case "text" :
var _local5 = _local6.getBounds(_local9);
_local5.w = _local5.xMax - _local5.xMin;
_local5.h = _local5.yMax - _local5.yMin;
_local6.tf = gfx.create_text_html(_local9, null, _local5.xMin, _local5.yMin, _local5.w, _local5.h);
gfx.set_text_html(_local6.tf, 16, 0, _local6.nam);
break;
case "edit" :
_local5 = _local6.getBounds(_local9);
_local5.w = _local5.xMax - _local5.xMin;
_local5.h = _local5.yMax - _local5.yMin;
_local6.tf = gfx.create_text_edit(_local9, null, _local5.xMin, _local5.yMin, _local5.w, _local5.h);
_local6.tf.setNewTextFormat(gfx.create_text_format(40, -16777216));
_local6.tf.text = "me";
_local6.tf.onKillFocus = delegate(lostfocus, _local6);
}
mcs[_local6.nam] = _local6;
topmc = _local9;
}
mcs.but_skiplogin._visible = false;
mcs.edit_pass2.tf.password = true;
mcs.edit_pass3.tf.password = true;
mcs.edit_pass2.tf.text = "";
mcs.edit_pass3.tf.text = "";
thunk();
update();
if (_root.name != undefined) {
name_set(_root.name);
} else if (_root.ng_username != undefined) {
name_set(_root.ng_username);
} else if ((_root.kongregate_username != undefined) && (_root.kongregate_username.toLowerCase() != "guest")) {
name_set(_root.kongregate_username);
} else {
reroll();
}
info_show("");
info_unlock("");
so_load();
thunk();
}
function logindone() {
_root.wtf.logindone();
_root.wetplay.logindone();
}
function clean() {
if (_root.skip_wetlogin) {
logindone();
return(undefined);
}
if (!_root.swish) {
_root.swish.clean();
_root.swish = new Swish({style:"slide_left", mc:mc}).setup();
}
zmc._x = 0;
zmc._y = 0;
mc.removeMovieClip();
mc = null;
_root.Login_Name = name_text;
_root.Login_Done = true;
_root.Login_Session = session;
so_save();
autologin = false;
logindone();
}
function so_load() {
so = SharedObject.getLocal("wetlogin");
var _local2 = so.data;
if (_local2.version == VERSION) {
if (_local2.name) {
name_set(_local2.name);
}
if (_local2.session) {
session = _local2.session;
}
if (_local2.opt_chat) {
opt_chat = ((_local2.opt_chat == 1) ? true : false);
}
if (_local2.opt_sound) {
opt_sound = ((_local2.opt_sound == 1) ? true : false);
}
}
if (_root.S) {
session = _root.S;
}
if ((session != null) && ((session != 0) && (autologin))) {
do_session();
}
}
function so_save() {
var _local2 = so.data;
_local2.version = VERSION;
_local2.name = name_text;
_local2.session = session;
_local2.opt_chat = (opt_chat ? 1 : 2);
_local2.opt_sound = (opt_sound ? 1 : 2);
so.flush();
}
function hover_off(me) {
if (_root.popup | locked) {
return(undefined);
}
if (over == me) {
do_this(me, "off");
over = null;
}
}
function hover_on(me) {
if (_root.popup | locked) {
return(undefined);
}
if (over != me) {
do_this(me, "on");
over = me;
}
}
function press(me) {
if (_root.popup | locked) {
return(undefined);
}
do_this(me, "press");
}
function click(me) {
if (_root.popup | locked) {
return(undefined);
}
do_this(me, "click");
}
function lostfocus(nmc, me) {
if (_root.popup | locked) {
return(undefined);
}
switch (me.nam) {
case "edit_name1" :
case "edit_name2" :
case "edit_name3" :
name_set(me.tf.text);
}
}
function thunk() {
if (opt_chat) {
mcs.but_chat_on._alpha = 100;
mcs.but_chat_off._alpha = 25;
} else {
mcs.but_chat_on._alpha = 25;
mcs.but_chat_off._alpha = 100;
}
if (opt_sound) {
mcs.but_sound_on._alpha = 100;
mcs.but_sound_off._alpha = 25;
} else {
mcs.but_sound_on._alpha = 25;
mcs.but_sound_off._alpha = 100;
}
}
function update() {
if (_root.skip_wetlogin) {
return(undefined);
}
if (timeout_lv) {
timeout_time--;
if (timeout_time <= 0) {
timeout_lv.err = "Network TimeOut! Try again or click on the SKIP LOGIN button below.";
timeout_func(false, timeout_lv);
timeout_lv = null;
timeout_time = null;
timeout_func = null;
mcs.but_skiplogin._visible = true;
}
}
if (_root.popup) {
return(undefined);
}
frame++;
if (viewYdest != viewY) {
viewY = viewY + (((viewYdest - viewY) * 1) / 8);
if (((viewY - viewYdest) * (viewY - viewYdest)) < 0.5) {
viewY = viewYdest;
}
parallax.guest._y = viewY + 300;
parallax.login._y = (viewY + 300) + 600;
parallax.signup._y = (viewY + 300) - 600;
mcs.circ._rotation = (viewY * 360) / 600;
}
var _local2 = Math.floor(frame / 8) % 4;
if (_local2 == 3) {
_local2 = 1;
}
switch (_local2) {
case 0 :
mcs.anim1a._visible = true;
mcs.anim1b._visible = true;
mcs.anim2a._visible = false;
mcs.anim2b._visible = false;
mcs.anim3a._visible = false;
mcs.anim3b._visible = false;
break;
case 1 :
mcs.anim1a._visible = false;
mcs.anim1b._visible = false;
mcs.anim2a._visible = true;
mcs.anim2b._visible = true;
mcs.anim3a._visible = false;
mcs.anim3b._visible = false;
break;
case 2 :
mcs.anim1a._visible = false;
mcs.anim1b._visible = false;
mcs.anim2a._visible = false;
mcs.anim2b._visible = false;
mcs.anim3a._visible = true;
mcs.anim3b._visible = true;
}
}
function do_this(me, act) {
if (me.nams[0] == "but") {
if (act == "on") {
me._alpha = 100;
switch (me.nams[1]) {
case "login" :
info_pop("Goto login page.");
break;
case "signup" :
info_pop("Goto signup page.");
break;
case "back" :
info_pop("Back to guest login page.");
break;
case "no" :
info_pop("Get a new random name.");
break;
case "yes" :
info_pop("Shall we play a game?");
break;
case "chat" :
info_pop("In game chat?");
break;
case "sound" :
info_pop("In game sound?");
}
} else if (act == "off") {
me._alpha = 25;
thunk();
info_pop();
} else if (act == "press") {
me._alpha = 75;
} else if (act == "click") {
me._alpha = 100;
switch (me.nams[1]) {
case "login" :
viewYdest = -600;
break;
case "signup" :
viewYdest = 600;
break;
case "back" :
viewYdest = 0;
break;
case "no" :
reroll();
break;
case "chat" :
if (me.nams[2] == "on") {
opt_chat = true;
} else {
opt_chat = false;
}
thunk();
break;
case "sound" :
if (me.nams[2] == "on") {
opt_sound = true;
_root.wp_vol = 50;
} else {
opt_sound = false;
_root.wp_vol = 0;
}
thunk();
break;
case "yes" :
do_guest();
break;
case "dosignup" :
do_signup();
break;
case "dologin" :
do_login();
break;
case "skiplogin" :
session = 0;
name_set("me");
up.state_next = "menu";
}
}
}
}
function reroll() {
var _local2 = new Date();
_local2 = Math.floor(_local2.getTime() / 1);
rnd_seed(_local2);
var _local3 = _local2 % (txt_adjectives.length - 1);
var _local4 = rnd() % (txt_nouns.length - 1);
name_set((txt_adjectives[_local3] + "_") + txt_nouns[_local4]);
}
function name_set(nam) {
mcs.edit_name1.tf.text = nam;
mcs.edit_name2.tf.text = nam;
mcs.edit_name3.tf.text = nam;
name_text = nam;
}
function info_lock() {
locked = true;
}
function info_unlock() {
locked = false;
}
function info_show(s) {
info_text = s;
info_pop(s);
}
function info_pop(s) {
if (!s) {
s = info_text;
}
gfx.set_text_html(mcs.text_tip.tf, 16, 0, s);
if (s == "") {
mcs.back_tooltip._visible = false;
} else {
mcs.back_tooltip._visible = true;
}
}
function do_guest() {
if (timeout_lv) {
return(undefined);
}
var _local2 = new LoadVars();
_local2.name = name_text;
fbsig.copy_fb_sigs(_root, _local2);
_local2.sendAndLoad(user_php + "?cmd=guest", _local2, "POST");
_local2.onLoad = delegate(do_guest_post, _local2);
info_lock();
info_show((("Trying " + _local2.name) + " guest account on ") + _root.host);
timeout_lv = _local2;
timeout_time = 25 * 10;
timeout_func = delegate(do_guest_post, null);
}
function do_guest_post(success, lv) {
if (timeout_lv != lv) {
return(undefined);
}
timeout_lv = null;
name_set(lv.name);
session = 0;
if (lv.err == "OK") {
_root.Login_Img = lv.img;
up.state_next = "menu";
} else {
mcs.but_skiplogin._visible = true;
session = null;
info_show((lv.err ? (lv.err) : "Unknown ERROR :)"));
info_unlock();
}
}
function do_signup() {
if (timeout_lv) {
return(undefined);
}
var _local2 = new LoadVars();
_local2.name = name_text;
_local2.pass = mcs.edit_pass3.tf.text;
_local2.email = mcs.edit_email3.tf.text;
fbsig.copy_fb_sigs(_root, _local2);
_local2.sendAndLoad(user_php + "?cmd=create", _local2, "POST");
_local2.onLoad = delegate(do_signup_post, _local2);
info_lock();
info_show("Creating new account on " + _root.host);
timeout_lv = _local2;
timeout_time = 25 * 10;
timeout_func = delegate(do_signup_post, null);
}
function do_signup_post(success, lv) {
if (timeout_lv != lv) {
return(undefined);
}
timeout_lv = null;
name_set(lv.name);
session = lv.S;
if (lv.err == "OK") {
_root.Login_Img = lv.img;
up.state_next = "menu";
} else {
mcs.but_skiplogin._visible = true;
session = null;
info_show((lv.err ? (lv.err) : "Unknown ERROR :)"));
info_unlock();
}
}
function do_login() {
if (timeout_lv) {
return(undefined);
}
var _local2 = new LoadVars();
_local2.name = name_text;
_local2.pass = mcs.edit_pass2.tf.text;
fbsig.copy_fb_sigs(_root, _local2);
_local2.sendAndLoad(user_php + "?cmd=login", _local2, "POST");
_local2.onLoad = delegate(do_login_post, _local2);
info_lock();
info_show((("Logging on as " + _local2.name) + " at ") + _root.host);
timeout_lv = _local2;
timeout_time = 25 * 10;
timeout_func = delegate(do_login_post, null);
}
function do_login_post(success, lv) {
if (timeout_lv != lv) {
return(undefined);
}
timeout_lv = null;
name_set(lv.name);
session = lv.S;
if (lv.err == "OK") {
_root.Login_Img = lv.img;
up.state_next = "menu";
} else {
mcs.but_skiplogin._visible = true;
session = null;
info_show((lv.err ? (lv.err) : "Unknown ERROR :)"));
info_unlock();
}
}
function do_session() {
if (timeout_lv) {
return(undefined);
}
var _local2 = new LoadVars();
_local2.session = session;
fbsig.copy_fb_sigs(_root, _local2);
_local2.sendAndLoad(user_php + "?cmd=session", _local2, "POST");
_local2.onLoad = delegate(do_session_post, _local2);
info_lock();
info_show("attempting to auto log in to " + _root.host);
timeout_lv = _local2;
timeout_time = 25 * 10;
timeout_func = delegate(do_session_post, null);
}
function do_session_post(success, lv) {
if (timeout_lv != lv) {
return(undefined);
}
timeout_lv = null;
name_set(lv.name);
session = lv.S;
if (lv.err == "OK") {
_root.Login_Img = lv.img;
up.state_next = "menu";
} else {
mcs.but_skiplogin._visible = true;
session = null;
info_show((lv.err ? (lv.err) : "Unknown ERROR :)"));
info_unlock();
}
}
//ASSetPropFlags(_local1, null, 1);
var name_text = "me";
var session = 0;
var locked = false;
var saves = null;
var opt_chat = true;
var opt_sound = true;
var rnd_num = 0;
var autologin = true;
var so = null;
var VERSION = 17;
var info_text = "";
static var 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_back,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_back,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", ""];
static var 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", ""];
static var 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", ""];
}
Symbol 20489 MovieClip [__Packages.BetaSignals] Frame 0
class BetaSignals
{
var up, score, replay_str, moves, game, score_last, sent_stamp, score_name, base, state, seed, ranksys, start_time, time, total;
function BetaSignals (_up) {
up = _up;
mochi.MochiServices.connect("7cf11a23d99c1aef");
mochi.MochiScores.setBoardID("b3105f8d1c76397d");
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup() {
}
function clean() {
}
function set_score_check(new_score, new_replay, new_moves) {
if (new_score > score) {
score = new_score;
if (new_replay) {
replay_str = new_replay;
}
if (new_moves) {
moves = new_moves;
}
}
}
function mochi_score_sent() {
}
function send_start() {
if ((_root._url.toLowerCase().indexOf("gamegarage") >= 0) && (_root.game_id && (_root.user_id))) {
var _local2 = new LoadVars();
_local2.game_id = _root.game_id;
_local2.user_id = _root.user_id;
_local2.sendAndLoad("http://www.gamegarage.co.uk/scripts/tracking.php", _local2, "POST");
}
}
function send_final(nam, num) {
if ((_root._url.toLowerCase().indexOf("gamegarage") >= 0) && (_root.game_id && (_root.user_id))) {
var _local4 = new LoadVars();
_local4.game_id = _root.game_id;
_local4.user_id = _root.user_id;
_local4.score = num;
_local4.alg = ((_root.game_id + _root.user_id) + num) + "a83l9xj";
_local4.sendAndLoad("http://www.gamegarage.co.uk/scripts/score.php", _local4, "POST");
}
if (_root.com_mindjolt_api) {
var _local5 = new LocalConnection();
_local5.send(_root.com_mindjolt_api, "submitScore", num);
}
if (_root.kongregateServices != undefined) {
if (game != "wetdike") {
_root.kongregateScores.setMode(nam);
}
_root.kongregateScores.submit(num);
}
mochi.MochiScores.submit(num, _root.Login_Name, this, "mochi_score_sent");
}
function send_spesh(nam, num) {
if (_root.kongregateServices != undefined) {
if (game != "wetdike") {
_root.kongregateScores.setMode(nam);
}
_root.kongregateScores.submit(num);
}
if (_root.HPScoreService != undefined) {
_root.HPScoreService.postScore(num, nam);
}
if (_root.pepere != undefined) {
var _local5 = new Date();
var _local4 = new LoadVars();
_local4.params = _root.pepere;
_local4.score = score;
_local4.sendAndLoad("record.php", _local4, "POST");
}
}
function send_score() {
var _local2 = new Date();
score_last = score;
sent_stamp = _local2.getTime();
send_spesh(score_name, score);
}
function send_score_check() {
if (score > score_last) {
send_score();
}
}
function send_score_wait_and_check() {
var _local2 = new Date();
if ((_local2.getTime() - sent_stamp) > (1000 * 60)) {
send_score_check();
}
}
function signal(_base, event, t, num) {
base = _base;
switch (base) {
case "diamonds" :
if (up.play.gamecomms) {
break;
}
switch (event) {
case "start" :
state = "start";
var _local6 = new Date();
seed = up.game_seed;
game = "diamonds.puz.3";
score_name = "Puzzle";
ranksys = "add";
if (up.play.gamemode == "endurance") {
game = "diamonds.end.3";
score_name = "Endurance";
ranksys = "max";
}
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.hud.points);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "high";
set_score_check(up.play.hud.points);
moves = 0;
_root.comms.send_score_check();
send_score_check();
break;
case "won" :
state = "won";
set_score_check(up.play.hud.points);
moves = 0;
_root.comms.send_score();
send_score();
break;
case "end" :
if (state == "won") {
state = "end";
set_score_check(up.play.hud.points);
moves = 0;
send_final("high", score);
} else {
state = "end";
set_score_check(up.play.hud.points);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
}
break;
case "adventisland" :
switch (event) {
case "start" :
state = "start";
_local6 = new Date();
seed = up.game_seed;
game = "adventisland";
score_name = "Advent";
ranksys = "max";
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.isplay.advent.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "high";
set_score_check(up.isplay.advent.score);
moves = 0;
_root.comms.send_score_check();
send_score_check();
break;
case "won" :
state = "won";
set_score_check(up.isplay.advent.score);
moves = 0;
_root.comms.send_score();
send_score();
break;
case "end" :
if (state == "won") {
state = "end";
set_score_check(up.isplay.advent.score);
moves = 0;
send_final("high", score);
} else {
state = "end";
set_score_check(up.isplay.advent.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
}
break;
case "batwsball" :
switch (event) {
case "start" :
state = "start";
_local6 = new Date();
seed = up.game_seed;
game = "batwsball";
score_name = "Endurance";
ranksys = "max";
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
score = Math.floor((up.play.tims + (up.play.timf / 25)) * 100);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "end" :
state = "end";
score = Math.floor((up.play.tims + (up.play.timf / 25)) * 100);
moves = 0;
_root.comms.send_score();
send_score();
if (score <= 400) {
break;
}
send_final("high", score);
}
break;
case "gojirama" :
switch (event) {
case "set" :
game = "gojirama";
score_name = "Endurance";
ranksys = "max";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
_local6 = new Date();
seed = up.game_seed;
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "high";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_check();
send_score_check();
break;
case "end" :
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
break;
case "romzom" :
switch (event) {
case "start" :
state = "start";
_local6 = new Date();
seed = up.game_seed;
game = "romzom";
score_name = "RomZom";
ranksys = "max";
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "end" :
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
break;
case "ASUE1" :
switch (event) {
case "set" :
game = "ASUE1";
score_name = "ASUE1";
ranksys = "max";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
seed = up.game_seed;
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "end" :
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
break;
case "EsTension" :
case "estension" :
switch (event) {
case "set" :
game = "estension";
score_name = "EsTension";
ranksys = "max";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
seed = up.game_seed;
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "update";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_check();
send_score_check();
break;
case "end" :
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
break;
case "BowWow" :
case "bowwow" :
switch (event) {
case "set" :
game = "bowwow";
score_name = "BowWow";
ranksys = "add";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
seed = up.game_seed;
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
time++;
state = "update";
set_score_check(up.play.score, up.play.get_replay_str(), up.play.get_replay_moves());
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "update";
set_score_check(up.play.score, up.play.get_replay_str(), up.play.get_replay_moves());
_root.comms.send_score_check();
send_score_check();
break;
case "won" :
state = "won";
set_score_check(up.play.score, up.play.get_replay_str(), up.play.get_replay_moves());
_root.comms.send_score();
send_score();
send_final("high", score);
break;
case "end" :
if (state == "won") {
break;
}
state = "end";
set_score_check(up.play.score, up.play.get_replay_str(), up.play.get_replay_moves());
_root.comms.send_score();
send_score();
send_final("high", score);
}
break;
case "WetBasement" :
case "WetBaseMent" :
switch (event) {
case "set" :
if (up.play.gameskill == "hard") {
game = "basement.4";
} else {
game = "basement.2";
}
score_name = "Race";
ranksys = "add";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "high";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_check();
send_score_check();
break;
case "won" :
state = "won";
set_score_check(up.play.score);
moves = 0;
total = up.play.get_rank_score(score);
_root.comms.send_score();
send_score();
if (up.play.gameskill == "hard") {
send_final("TotalHard", total);
} else {
send_final("Total", total);
}
break;
case "end" :
if (state != "won") {
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("total", total);
} else {
send_final("total", total);
}
}
break;
case "Mute" :
case "mute" :
switch (event) {
case "set" :
game = "mute";
score_name = "Smash";
ranksys = "max";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "high";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_check();
send_score_check();
break;
case "won" :
state = "won";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
break;
case "end" :
if (state != "won") {
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
} else {
send_final("high", score);
}
}
break;
case "WetDike" :
case "wetdike" :
switch (event) {
case "set" :
game = "wetdike";
score_name = "Puzzle";
ranksys = "add";
seed = up.dikeplay.seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time = Math.floor(up.dikeplay.game_time / 1000);
set_score_check(up.dikeplay.table.score, up.dikeplay.table.create_playback_str());
moves = up.dikeplay.table.moves;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "high" :
state = "high";
set_score_check(up.dikeplay.table.score, up.dikeplay.table.create_playback_str());
moves = up.dikeplay.table.moves;
_root.comms.send_score_check();
send_score_check();
break;
case "won" :
state = "won";
set_score_check(up.dikeplay.table.score, up.dikeplay.table.create_playback_str());
moves = up.dikeplay.table.moves;
_root.comms.send_score();
send_score();
break;
case "end" :
if (state != "won") {
state = "end";
set_score_check(up.dikeplay.table.score, up.dikeplay.table.create_playback_str());
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
} else {
send_final("high", score);
}
}
break;
case "ASUE2" :
case "asue2" :
switch (event) {
case "set" :
game = "ASUE2";
score_name = "ASUE2";
ranksys = "max";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
seed = up.game_seed;
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "end" :
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
break;
case "Take1" :
case "take1" :
switch (event) {
case "set" :
game = "take1";
score_name = "take1";
ranksys = "max";
seed = up.game_seed;
_root.comms.datas = this;
break;
case "start" :
state = "start";
seed = up.game_seed;
_local6 = new Date();
start_time = _local6.getTime();
time = 0;
score = 0;
moves = 0;
replay_str = "";
_root.comms.datas = this;
_root.comms.send_score();
send_score();
send_start();
break;
case "update" :
state = "update";
time++;
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score_wait_and_check();
send_score_wait_and_check();
break;
case "end" :
state = "end";
set_score_check(up.play.score);
moves = 0;
_root.comms.send_score();
send_score();
send_final("high", score);
}
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20490 MovieClip [__Packages.GizmoList] Frame 0
class GizmoList
{
var up, mc, gizmos, active, focus, focus_data, top, x, y, w, h, tf_fmt, lp, lh, xp, yp, base_alpha, selected, items, lines, lc, vgizmo;
function GizmoList (_up) {
up = _up;
setup();
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function setup() {
setup_base();
tf_fmt = gfx.create_text_format(16, 16777215);
lp = 0;
lh = 20;
xp = 0;
yp = 0;
base_alpha = 50;
selected = -1;
items = new Array();
lines = new Array();
}
function clean() {
clean_base();
}
function update() {
lc = Math.floor(((h + lh) - 1) / lh) + 1;
if (lc != lines.length) {
var _local2 = 0;
for ( ; _local2 < lc ; _local2++) {
var _local3 = child(new GizmoLine(this));
_local3.base_alpha = base_alpha;
_local3.set_area(0, _local2 * lh, w, lh);
_local3.str = "";
_local3.tf_fmt.size = tf_fmt.size;
_local3.tf_fmt.color = tf_fmt.color;
lines[_local2] = _local3;
}
draw_mask(0, 0);
}
var _local6 = (items.length * lh) - h;
if (vgizmo) {
if (_local6 > 0) {
yp = Math.floor(vgizmo.y_knob * _local6);
} else {
yp = 0;
}
}
lp = Math.floor(yp / lh);
var _local2 = lp;
for ( ; _local2 < (lp + lc) ; _local2++) {
var _local4 = lines[_local2 - lp];
if ((_local2 < 0) || (_local2 >= items.length)) {
_local4.str = "";
_local4.item = -1;
_local4.state = "";
} else {
var _local5 = items[_local2];
_local4.str = _local5.str;
_local4.item = _local2;
_local4.state = "";
if (_local2 == selected) {
_local4.state = "selected";
}
}
_local4.set_area(0, (_local2 * lh) - yp, w, lh);
}
update_base();
}
function input(snapshot) {
input_base(snapshot);
return(top.focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20491 MovieClip [__Packages.alt.Sprintf] Frame 0
class alt.Sprintf
{
function Sprintf () {
}
static function trace() {
trace(format.apply(null, arguments));
}
static function format(format) {
if (format == null) {
return("");
}
var _local3 = "";
var _local4 = 0;
var _local5 = 0;
while (_local5 < format.length) {
var _local6 = format.indexOf("%", _local5);
if (_local6 == -1) {
_local3 = _local3 + format.substr(_local5);
_local5 = format.length;
} else {
_local3 = _local3 + format.substring(_local5, _local6);
var _local14 = ("** sprintf: invalid format at " + _local4) + " **";
var _local13 = false;
var _local12 = 0;
var _local11 = _local12;
var _local9 = _local11;
var _local10 = -1;
_local5 = _local6 + 1;
_local4++;
var _local8 = arguments[_local4];
while ((_local13 != true) && (_local5 < format.length)) {
var _local7 = format.charAt(_local5++);
switch (_local7) {
case "#" :
if (_local12 == 0) {
_local11 = _local11 | kALT_FORM;
} else {
_local14 = "** sprintf: \"#\" came too late **";
}
break;
case "-" :
if (_local12 == 0) {
_local11 = _local11 | kLEFT_ALIGN;
} else {
_local14 = "** sprintf: \"-\" came too late **";
}
break;
case "+" :
if (_local12 == 0) {
_local11 = _local11 | kSHOW_SIGN;
} else {
_local14 = "** sprintf: \"+\" came too late **";
}
break;
case " " :
if (_local12 == 0) {
_local11 = _local11 | kPAD_POS;
} else {
_local14 = "** sprintf: \" \" came too late **";
}
break;
case "." :
if (_local12 < 2) {
_local12 = 2;
_local10 = 0;
} else {
_local14 = "** sprintf: \".\" came too late **";
}
break;
case "0" :
if (_local12 == 0) {
_local11 = _local11 | kPAD_ZEROES;
break;
}
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
if (_local12 == 3) {
_local14 = "** sprintf: shouldn't have a digit after h,l,L **";
} else if (_local12 < 2) {
_local12 = 1;
_local9 = (_local9 * 10) + Number(_local7);
} else {
_local10 = (_local10 * 10) + Number(_local7);
}
break;
case "d" :
case "i" :
_local13 = true;
_local3 = _local3 + formatD(Number(_local8), _local11, _local9, _local10);
break;
case "o" :
_local13 = true;
_local3 = _local3 + formatO(Number(_local8), _local11, _local9, _local10);
break;
case "x" :
case "X" :
_local13 = true;
_local3 = _local3 + formatX(Number(_local8), _local11, _local9, _local10, _local7 == "X");
break;
case "e" :
case "E" :
_local13 = true;
_local3 = _local3 + formatE(Number(_local8), _local11, _local9, _local10, _local7 == "E");
break;
case "f" :
_local13 = true;
_local3 = _local3 + formatF(Number(_local8), _local11, _local9, _local10);
break;
case "g" :
case "G" :
_local13 = true;
_local3 = _local3 + formatG(Number(_local8), _local11, _local9, _local10, _local7 == "G");
break;
case "c" :
case "C" :
_local10 = 1;
case "s" :
case "S" :
_local13 = true;
_local3 = _local3 + formatS(String(_local8), _local11, _local9, _local10);
break;
case "%" :
_local13 = true;
_local3 = _local3 + "%";
_local4--;
break;
default :
_local14 = ("** sprintf: " + _local7) + " not supported **";
}
}
if (_local13 != true) {
if (DEBUG) {
_local3 = _local3 + _local14;
}
if (TRACE) {
trace(_local14);
}
}
}
}
return(_local3);
}
static function finish(output, value, properties, length, precision, prefix) {
if (prefix == null) {
prefix = "";
}
if (value < 0) {
prefix = "-" + prefix;
} else if (properties & kSHOW_SIGN) {
prefix = "+" + prefix;
} else if (properties & kPAD_POS) {
prefix = " " + prefix;
}
if ((length == 0) && (precision > -1)) {
length = precision;
properties = properties | kPAD_ZEROES;
}
while ((output.length + prefix.length) < length) {
if (properties & kLEFT_ALIGN) {
output = output + " ";
} else if (properties & kPAD_ZEROES) {
output = "0" + output;
} else {
prefix = " " + prefix;
}
}
return(prefix + output);
}
static function formatD(value, properties, length, precision) {
var _local6 = "";
if ((precision != 0) || (value != 0)) {
_local6 = String(Math.floor(Math.abs(value)));
}
while (_local6.length < precision) {
_local6 = "0" + _local6;
}
return(finish(_local6, value, properties, length, precision));
}
static function formatO(value, properties, length, precision) {
var _local6 = "";
var _local7 = "";
if ((precision != 0) && (value != 0)) {
_local6 = value.toString(8);
}
if (properties & kALT_FORM) {
_local7 = "0";
}
while (_local6.length < precision) {
_local6 = "0" + _local6;
}
return(finish(_local6, value, properties, length, precision, _local7));
}
static function formatX(value, properties, length, precision, upper) {
var _local7 = "";
var _local8 = "";
if ((precision != 0) && (value != 0)) {
_local7 = value.toString(16);
}
if (properties & kALT_FORM) {
_local8 = "0x";
}
while (_local7.length < precision) {
_local7 = "0" + _local7;
}
if (upper) {
_local8 = _local8.toUpperCase();
_local7 = _local7.toUpperCase();
} else {
_local7 = _local7.toLowerCase();
}
return(finish(_local7, value, properties, length, precision, _local8));
}
static function formatE(value, properties, length, precision, upper) {
var _local7 = "";
var _local8 = 0;
if (Math.abs(value) > 1) {
while (Math.abs(value) > 10) {
value = value / 10;
_local8++;
}
} else {
while (Math.abs(value) < 1) {
value = value * 10;
_local8--;
}
}
var _local9 = format("%c%+.2d", (upper ? "E" : "e"), _local8);
if (properties & kLEFT_ALIGN) {
_local7 = formatF(value, properties, 1, precision) + _local9;
while (_local7.length < length) {
_local7 = _local7 + " ";
}
} else {
_local7 = formatF(value, properties, Math.max(length - _local9.length, 0), precision) + _local9;
}
return(_local7);
}
static function formatF(value, properties, length, precision) {
var _local6 = "";
var _local7 = "";
var _local8 = "";
if (precision == -1) {
precision = 6;
}
var _local9 = new String(value.toString());
if (_local9.indexOf(".") == -1) {
_local7 = Math.abs(Number(_local9)).toString();
_local8 = "0";
} else {
_local7 = Math.abs(Number(_local9.substring(0, _local9.indexOf(".")))).toString();
_local8 = _local9.substr(_local9.indexOf(".") + 1);
}
if (Number(_local8) == 0) {
_local8 = new String();
while (_local8.length < precision) {
_local8 = _local8 + "0";
}
} else {
if (_local8.length > precision) {
var _local10 = Math.round(Math.pow(10, precision) * Number("0." + _local8));
if ((String(_local10).length > precision) && (_local10 != 0)) {
_local8 = "0";
_local7 = ((Math.abs(Number(_local7)) + 1) * ((Number(_local7) >= 0) ? 1 : -1)).toString();
} else {
_local8 = new String(_local10.toString());
}
}
if (_local8.length < precision) {
_local8 = new String(_local8);
while (_local8.length < precision) {
_local8 = _local8 + "0";
}
}
}
if (precision == 0) {
_local6 = _local7;
if (properties & kALT_FORM) {
_local6 = _local6 + ".";
}
} else {
_local6 = (_local7 + ".") + _local8;
}
return(finish(_local6, value, properties, length, precision, ""));
}
static function formatG(value, properties, length, precision, upper) {
var _local7 = formatE(value, properties, 1, precision, upper);
var _local8 = formatF(value, properties, 1, precision);
if (_local7.length < _local8.length) {
return(formatE(value, properties, length, precision, upper));
}
return(formatF(value, properties, length, precision));
}
static function formatS(value, properties, length, precision) {
var _local6 = new String(value);
if ((precision > 0) && (precision < _local6.length)) {
_local6 = _local6.substring(0, precision);
}
properties = properties & ((((kPAD_ZEROES | kSHOW_SIGN) | kPAD_POS) | kALT_FORM) ^ -1);
return(finish(_local6, value, properties, length, precision, ""));
}
static var kPAD_ZEROES = 1;
static var kLEFT_ALIGN = 2;
static var kSHOW_SIGN = 4;
static var kPAD_POS = 8;
static var kALT_FORM = 16;
static var kLONG_VALUE = 32;
static var kUSE_SEPARATOR = 64;
static var DEBUG = false;
static var TRACE = false;
}
Symbol 20492 MovieClip [__Packages.GizmoLine] Frame 0
class GizmoLine
{
var up, str, str_disp, state, state_disp, xp, yp, xs, ys, base_alpha, mc, gizmos, active, focus, focus_data, top, x, y, w, h, tf, tf_fmt, onClick;
function GizmoLine (_up) {
up = _up;
setup();
str = "";
str_disp = "";
state = "";
state_disp = "";
xp = 0;
yp = 0;
xs = 0;
ys = 0;
base_alpha = 100;
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function setup() {
setup_base();
tf = gfx.create_text_html(mc, null, 0, 0, 0, 0);
tf.multiline = false;
tf_fmt = gfx.create_text_format(16, 16777215);
tf.setNewTextFormat(tf_fmt);
}
function clean() {
clean_base();
}
function update() {
if ((str != str_disp) || (state != state_disp)) {
if (state == "selected") {
tf_fmt.bold = true;
} else {
tf_fmt.bold = false;
}
var _local2 = tf_fmt.getTextExtent(str);
xs = _local2.width;
ys = _local2.height;
tf._width = xs + 100;
tf._height = ys + 8;
tf.setNewTextFormat(tf_fmt);
tf.text = str;
str_disp = str;
state_disp = state;
}
if ((tf.textWidth + 4) > w) {
tf._x = xp - (top.spine * ((tf.textWidth + 4) - w));
} else {
tf._x = xp;
}
tf._y = yp;
mc._alpha = mc._alpha - 5;
if (mc._alpha < base_alpha) {
mc._alpha = base_alpha;
}
update_base();
}
function input(snapshot) {
if ((top.focus == null) && ((snapshot.x > 0) && ((snapshot.y > 0) && ((snapshot.x < w) && (snapshot.y < h))))) {
mc._alpha = 100;
up.hover = this;
if (snapshot.key_on & 1) {
if (onClick) {
onClick(this);
} else if (up.onClick) {
up.onClick(this);
}
}
}
input_base(snapshot);
return(top.focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20493 MovieClip [__Packages.Scalar] Frame 0
class Scalar
{
var ox, oy, mc, tf_stats, scale, t_old, t_new, t_ms, t_samples, rot, dx, dy, sx, sy, t_fps;
function Scalar (_ox, _oy) {
ox = _ox;
oy = _oy;
mc = gfx.create_clip(_root, null);
mc.onEnterFrame = delegate(update);
tf_stats = gfx.create_text_html(mc, null, 0, 0, ox, 32);
gfx.dropshadow(tf_stats, 2, 45, 0, 1, 4, 4, 2, 3);
scale = 1;
if (scale > _root.maxs) {
scale = _root.maxs;
}
update();
Key.addListener(this);
t_old = getTimer();
t_new = t_old;
t_ms = 0;
t_samples = 0;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function update() {
Stage.scaleMode = "noScale";
Stage.align = "TL";
rot = 0;
var _local2 = Stage.width / ox;
if (_root.maxw) {
if ((_local2 * ox) > _root.maxw) {
_local2 = _root.maxw / ox;
}
}
if (_root.maxh) {
if ((_local2 * oy) > _root.maxh) {
_local2 = _root.maxh / oy;
}
}
if ((_local2 * oy) > Stage.height) {
_local2 = Stage.height / oy;
}
_local2 = _local2 * scale;
dx = Math.floor((Stage.width - (_local2 * ox)) / 2);
dy = Math.floor((Stage.height - (_local2 * oy)) / 2);
sx = _local2 * 100;
sy = _local2 * 100;
t_samples++;
if (t_samples >= 10) {
t_old = t_new;
t_new = getTimer();
t_ms = (t_new - t_old) / t_samples;
t_fps = Math.floor(1000 / t_ms);
t_samples = 0;
if (scale < 1) {
var _local3 = (((" " + Math.floor(t_ms)) + "ms : ") + Math.floor(1000 / t_ms)) + "fps";
gfx.set_text_html(tf_stats, 13, 16777215, _local3);
}
}
if (scale < 1) {
tf_stats._visible = true;
} else {
tf_stats._visible = false;
}
}
function apply(tomc, bmmc) {
if (_root.scale == "no") {
tomc._rotation = rot;
tomc._x = 0;
tomc._y = 0;
tomc._xscale = 100;
tomc._yscale = 100;
return(undefined);
}
tomc._rotation = rot;
tomc._x = dx;
tomc._y = dy;
tomc._xscale = sx;
tomc._yscale = sy;
}
function onKeyDown() {
}
function onKeyUp() {
var _local3 = Key.getCode();
var _local2 = String.fromCharCode(Key.getAscii());
if (Selection.getCaretIndex() == -1) {
if ((_local2 == "+") || (_local2 == "=")) {
scale = scale * 1.1;
if (scale > 1) {
scale = 1;
}
} else if ((_local2 == "_") || (_local2 == "-")) {
scale = scale / 1.1;
if (scale < 0.1) {
scale = 0.1;
}
} else if (_local3 == 27) {
if (scale < 1) {
scale = 1;
} else {
scale = 0.1;
}
}
}
if (scale > _root.maxs) {
scale = _root.maxs;
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20494 MovieClip [__Packages.GizmoText] Frame 0
class GizmoText
{
var up, mc, gizmos, active, focus, focus_data, top, x, y, w, h, fntsiz, fntcol, tf_fmt, tf, str, vgizmo;
function GizmoText (_up) {
up = _up;
setup();
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function setup() {
setup_base();
fntsiz = 16;
fntcol = 16777215 /* 0xFFFFFF */;
tf_fmt = gfx.create_text_format(fntsiz, fntcol);
tf = null;
}
function clean() {
clean_base();
}
function clear_tf() {
tf.removeTextField();
tf = null;
tf.cachestr = "";
}
function update() {
if (tf == null) {
tf = gfx.create_text_html(mc, null, 0, 0, w, h);
tf.setNewTextFormat(tf_fmt);
}
if (tf.cachestr != str) {
tf.cachestr = str;
gfx.set_text_html(tf, fntsiz, fntcol, str);
}
if (vgizmo) {
var _local2 = Math.floor(tf.maxscroll * vgizmo.y_knob);
if (_local2 < 1) {
_local2 = 1;
}
if (_local2 != tf.scroll) {
tf.scroll = _local2;
}
}
update_base();
}
function input(snapshot) {
input_base(snapshot);
return(top.focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20495 MovieClip [__Packages.dbg] Frame 0
class dbg
{
function dbg () {
}
static function print(s) {
var _local3 = ("" + s).split("\"");
s = _local3.join("'");
getURL (("javascript:if(console){console.log(\"" + s) + "\");}", "_self");
}
static function dump(a) {
for (var _local3 in a) {
print((("" + _local3) + " = ") + a[_local3]);
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20496 MovieClip [__Packages.WetPlayMP3] Frame 0
class WetPlayMP3
{
var up, mc, sfxs, sfxidx, mc_back, mc_back_image, mc_back_colour, w, h, row_size, x, y, foreground, xspf, mcs1, sfx, mcs2, sfx_next, sfx_master, sfx_on, sfx_load_stall_counter, image_url, mc_image, gizmo, gizmo_backward, gizmo_play, gizmo_pause, gizmo_forward, gizmo_position, gizmo_position_knob, gizmo_volume, gizmo_volume_knob, gizmo_scroll, gizmo_scroll_knob, gizmo_title, gizmo_list1, gizmo_list2, xspfs, force, auto, so, shuffle, loop, got_creator, track_id, xspf_id, state, options, tracks, view, menu_mp3_name, menu_mp3_link, tracks1, tracks2, mc_image3, mc_image2, tracks_url;
function WetPlayMP3 (_up) {
rnd_seed(new Date().getTime());
up = _up;
mc = gfx.create_clip(up.mc, null);
setmenu(mc);
sfxs = new Array();
var _local3 = 0;
for ( ; _local3 < 4 ; _local3++) {
sfxs[_local3] = gfx.create_clip(up.mc, null);
sfxs[_local3].sfx = new Sound(sfxs[_local3]);
}
sfxidx = 0;
mc_back = gfx.create_clip(mc, null);
if ((_root.wp_jpg != undefined) && (_root.wp_jpg != "")) {
load_back_image(_root.wp_jpg);
} else {
mc_back_image = gfx.add_clip(mc, "WetPlayBack", null);
}
mc_back_colour = gfx.create_clip(mc, null);
mc_back_image.onRelease = delegate(catchclicks);
mc_back_colour.onRelease = delegate(catchclicks);
if ((_root.wp_w != undefined) && (_root.wp_w != "")) {
w = int(_root.wp_w);
} else {
w = 380;
}
if ((_root.wp_h != undefined) && (_root.wp_h != "")) {
h = int(_root.wp_h);
} else {
h = 200;
}
if ((_root.wp_x != undefined) && (_root.wp_x != "")) {
mc._x = int(_root.wp_x);
} else {
mc._x = 10;
}
if ((_root.wp_y != undefined) && (_root.wp_y != "")) {
mc._y = int(_root.wp_y);
} else {
mc._y = 10;
}
if ((_root.wp_s != undefined) && (_root.wp_s != "")) {
row_size = int(_root.wp_s);
} else {
row_size = 20;
}
x = mc._x;
y = mc._y;
mc_back_image._x = -mc._x;
mc_back_image._y = -mc._y;
if ((_root.wp_fore != undefined) && (_root.wp_fore != "")) {
foreground = int(_root.wp_fore) & 16777215;
} else {
foreground = 16777215 /* 0xFFFFFF */;
}
if (_root.wp_jpg == undefined) {
if ((_root.wp_back == undefined) || (_root.wp_back == "")) {
_root.wp_back = 1073741952 /* 0x40000080 */;
}
}
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);
}
do_tint();
xspf = new XML();
xspf.ignoreWhite = true;
xspf.onLoad = null;
mcs1 = gfx.create_clip(mc, null);
sfx = new Sound(mcs1);
mcs2 = gfx.create_clip(mc, null);
sfx_next = new Sound(mcs2);
sfx_master = new Sound();
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function PlaySFX(nam, chan, loops, vol) {
if (sfx_on == 0) {
return(undefined);
}
if ((chan != undefined) && (chan != null)) {
var _local6 = sfxs[chan % 4].sfx;
} else {
var _local6 = sfxs[sfxidx].sfx;
sfxidx = (sfxidx + 1) % 4;
}
if (nam == null) {
if (vol == undefined) {
_local6.stop();
} else {
_local6.setVolume(vol * 100);
}
} else {
_local6.stop();
_local6.attachSound(nam);
if (loops) {
_local6.start(0, loops);
} else {
_local6.start();
}
if (vol == undefined) {
_local6.setVolume(100);
} else {
_local6.setVolume(vol * 100);
}
}
return(_local6);
}
function catchclicks() {
}
function setup() {
var _local2 = _root.cacheAsBitmap;
so_load();
_root.cacheAsBitmap = false;
var _local7 = row_size;
var _local8 = Math.floor(w / _local7);
var _local9 = Math.floor(h / _local7);
if (_local9 >= 2) {
var _local10 = 1;
} else {
var _local10 = 0;
}
sfx_load_stall_counter = 0;
image_url = "";
mc_image = gfx.create_clip(mc, null);
gfx.clear(mc_image);
mc_image._alpha = 25;
gizmo = new GizmoMaster(this);
gizmo.top = gizmo;
var _local4 = gizmo;
_local4.set_area(0, 0, w, h);
var _local5 = gizmo;
var _local11 = 0;
if (_local8 >= 4) {
_local4 = _local5.child(new GizmoButt(_local5));
_local4.set_area(_local7 * _local11, _local7 * _local10, _local7, _local7);
var _local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_backward(_local6, 0, 0, _local7, _local7);
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_backward(_local6, 0, 0, _local7, _local7);
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_backward(_local6, _local7 * 0.1, _local7 * 0.1, _local7 * 0.8, _local7 * 0.8);
_local4.mc_down = _local6;
_local4.id = "backward";
_local4.onClick = delegate(onClick, _local4);
gizmo_backward = _local4;
_local11++;
}
_local4 = _local5.child(new GizmoButt(_local5));
_local4.set_area(_local7 * _local11, _local7 * _local10, _local7, _local7);
var _local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_play(_local6, 0, 0, _local7, _local7);
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_play(_local6, 0, 0, _local7, _local7);
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_play(_local6, _local7 * 0.1, _local7 * 0.1, _local7 * 0.8, _local7 * 0.8);
_local4.mc_down = _local6;
_local4.id = "play";
_local4.onClick = delegate(onClick, _local4);
gizmo_play = _local4;
_local4 = _local5.child(new GizmoButt(_local5));
_local4.set_area(_local7 * _local11, _local7 * _local10, _local7, _local7);
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_pause(_local6, 0, 0, _local7, _local7);
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_pause(_local6, 0, 0, _local7, _local7);
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_pause(_local6, _local7 * 0.1, _local7 * 0.1, _local7 * 0.8, _local7 * 0.8);
_local4.mc_down = _local6;
_local4.id = "pause";
_local4.onClick = delegate(onClick, _local4);
gizmo_pause = _local4;
_local11++;
if (_local8 >= 3) {
_local5 = gizmo;
_local4 = _local5.child(new GizmoButt(_local5));
_local4.set_area(_local7 * _local11, _local7 * _local10, _local7, _local7);
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_forward(_local6, 0, 0, _local7, _local7);
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_forward(_local6, 0, 0, _local7, _local7);
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_forward(_local6, _local7 * 0.1, _local7 * 0.1, _local7 * 0.8, _local7 * 0.8);
_local4.mc_down = _local6;
_local4.id = "forward";
_local4.onClick = delegate(onClick, _local4);
gizmo_forward = _local4;
_local11++;
}
if (_local8 >= 5) {
_local5 = gizmo;
_local4 = _local5.child(new Gizmo(_local5));
_local4.set_area(_local7 * _local11, _local7 * _local10, w - (_local7 * (_local11 + 1)), _local7);
_local4.mc.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_boxen(_local4.mc, 0, 0, w - (_local7 * 4), _local7);
gizmo_position = _local4;
_local5 = _local4;
_local4 = _local5.child(new GizmoKnob(_local5));
if (_local8 > 5) {
_local4.set_area(0, 0, _local7, _local7);
} else {
_local4.set_area(0, 0, _local7 / 2, _local7);
}
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_puck(_local6, 0, 0, _local4.w, _local7);
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_puck(_local6, 0, 0, _local4.w, _local7);
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_puck(_local6, 0, 0, _local4.w, _local7);
_local4.mc_down = _local6;
_local4.id = "position_knob";
_local4.onClick = delegate(onClick, _local4);
gizmo_position_knob = _local4;
}
_local5 = gizmo;
_local4 = _local5.child(new Gizmo(_local5));
if (_local9 >= 2) {
_local4.set_area(w - (_local7 * 1), 0, _local7, _local7 * 2);
} else {
_local4.set_area(w - (_local7 * 1), 0, _local7, _local7 * 1);
}
_local4.mc.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
gfx.draw_box(_local4.mc, undefined, (_local7 * 7) / 16, (_local7 * 1) / 16, (_local7 * 2) / 16, _local4.h - ((_local7 * 2) / 16));
gizmo_volume = _local4;
_local5 = _local4;
_local4 = _local5.child(new GizmoKnob(_local5));
_local4.set_area(0, 0, _local7, (_local7 * 10) / 16);
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
gfx.draw_box(_local6, undefined, (_local7 * 3) / 16, (_local7 * 3) / 16, (_local7 * 10) / 16, _local4.h - ((_local7 * 6) / 16));
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
gfx.draw_box(_local6, undefined, (_local7 * 3) / 16, (_local7 * 3) / 16, (_local7 * 10) / 16, _local4.h - ((_local7 * 6) / 16));
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
gfx.draw_box(_local6, undefined, (_local7 * 3) / 16, (_local7 * 3) / 16, (_local7 * 10) / 16, _local4.h - ((_local7 * 6) / 16));
_local4.mc_down = _local6;
gizmo_volume_knob = _local4;
if (_local8 == 1) {
gizmo_volume.active = false;
}
if (_local9 > 2) {
_local5 = gizmo;
_local4 = _local5.child(new Gizmo(_local5));
_local4.set_area(w - (_local7 * 1), _local7 * 2, _local7, h - (_local7 * 2));
_local4.mc.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_boxen(_local4.mc, 0, 0, _local4.w, _local4.h);
gizmo_scroll = _local4;
_local5 = _local4;
_local4 = _local5.child(new GizmoKnob(_local5));
_local4.set_area(0, 0, _local7, _local7);
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_puck(_local6, 0, 0, _local7, _local7);
_local4.mc_base = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_puck(_local6, 0, 0, _local7, _local7);
_local4.mc_over = _local6;
_local6 = gfx.create_clip(_local4.mc, null, 0, 0, 100, 100);
_local6.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_puck(_local6, 0, 0, _local7, _local7);
_local4.mc_down = _local6;
gizmo_scroll_knob = _local4;
}
if (_local9 >= 2) {
_local5 = gizmo;
_local4 = _local5.child(new GizmoLine(_local5));
_local4.set_area(_local7 * 0, _local7 * 0, w - _local7, _local7);
_local4.tf_fmt.size = _local7 - 4;
_local4.tf_fmt.color = -16777216 + foreground;
_local4.str = "";
_local4.draw_mask();
gizmo_title = _local4;
}
if (_local9 > 2) {
_local5 = gizmo;
_local4 = _local5.child(new GizmoList(_local5));
_local4.set_area(_local7 * 0, _local7 * 2, w - _local7, h - (_local7 * 2));
_local5 = _local4;
_local4 = _local5.child(new GizmoList(_local5));
_local4.set_area(0, 0, (2 * _local5.w) / 3, _local5.h);
_local4.lh = _local7;
_local4.tf_fmt.size = _local7 - 6;
_local4.tf_fmt.color = -16777216 + foreground;
_local4.base_alpha = 50;
_local4.vgizmo = gizmo_scroll_knob;
gizmo_list1 = _local4;
_local4 = _local5.child(new GizmoList(_local5));
_local4.set_area((2 * _local5.w) / 3, 0, (1 * _local5.w) / 3, _local5.h);
_local4.lh = _local7;
_local4.tf_fmt.size = _local7 - 6;
_local4.tf_fmt.color = -16777216 + foreground;
_local4.base_alpha = 30;
_local4.vgizmo = gizmo_scroll_knob;
gizmo_list2 = _local4;
}
gizmo_play.active = true;
gizmo_pause.active = false;
xspfs = new Array();
if ((_root.wp_mp3 != undefined) && (_root.wp_mp3 != "")) {
xspfs[0] = {url:"MP3", str:_root.wp_mp3};
} else if ((_root.wp_xspf != undefined) && (_root.wp_xspf != "")) {
xspfs[0] = {url:_root.wp_xspf, str:_root.wp_xspf};
}
if (!_root.kidsafe) {
xspfs.push({url:"http://swf.wetgenes.com/swf/WetDike.xspf", str:"WetDike ProjectOpus Playlist"});
xspfs.push({url:"http://www.last.fm/music/+charts/free/", str:"Top free tracks from Last.FM"});
xspfs.push({url:"http://grabb.it/charts/activity.xspf", str:"Random tracks from grabb.it"});
xspfs.push({url:"grabb.it", str:"Your favorite tracks on grabb.it"});
xspfs.push({url:"http://swf.wetgenes.com/swf/hourofslack.php", str:"Listen to a recent hour of slack."});
}
var _local3 = 0;
for ( ; _local3 < xspfs.length ; _local3++) {
var _local12 = xspfs[_local3].str.split("/");
if (_local12.length > 1) {
if (_local12[_local12.length - 1] == "") {
xspfs[_local3].str = _local12[_local12.length - 2];
} else {
xspfs[_local3].str = _local12[_local12.length - 1];
}
}
}
xspfs[xspfs.length] = {url:"", str:"Options"};
force = 0;
if ((_root.wp_force != undefined) && (_root.wp_force != "")) {
force = (int(_root.wp_force) ? 1 : 0);
}
auto = 0;
if ((so.data.auto != undefined) && (!force)) {
auto = (int(so.data.auto) ? 1 : 0);
} else if ((_root.wp_auto != undefined) && (_root.wp_auto != "")) {
auto = (int(_root.wp_auto) ? 1 : 0);
}
shuffle = 0;
if ((_root.wp_shuffle != undefined) && (_root.wp_shuffle != "")) {
shuffle = (int(_root.wp_shuffle) ? 1 : 0);
}
loop = 1;
if ((_root.wp_loop != undefined) && (_root.wp_loop != "")) {
loop = (int(_root.wp_loop) ? 1 : 0);
}
sfx_on = 1;
if ((_root.wp_sfx != undefined) && (_root.wp_sfx != "")) {
sfx_on = (int(_root.wp_loop) ? 1 : 0);
}
show_xspfs();
got_creator = 1;
track_id = -1;
xspf_id = -1;
gizmo_title.str = "Select a playlist to play.";
if ((so.data.vol != undefined) && (!force)) {
var _local13 = so.data.vol / 100;
if (_local13 <= 0) {
_local13 = 0;
auto = 0;
}
if (_local13 > 1) {
_local13 = 1;
}
gizmo_volume_knob.set_knob(0, 1 - _local13);
} else if (_root.wp_vol != undefined) {
var _local14 = _root.wp_vol / 100;
if (_local14 <= 0) {
_local14 = 0;
auto = 0;
}
if (_local14 > 1) {
_local14 = 1;
}
gizmo_volume_knob.set_knob(0, 1 - _local14);
} else {
gizmo_volume_knob.set_knob(0, 1 - 0.5);
}
if (auto) {
xspf_id = 0;
load_xml(xspfs[0].url);
state = "pause";
} else if (xspfs.length == 2) {
xspf_id = 0;
load_xml(xspfs[0].url);
state = "pause";
}
options = new Array();
var _local15 = options;
_local15.push({str:".. (click to go back)"});
_local15.push({str:"This is WetPlay 1.11 : www.WetGenes.com", url:"http://www.WetGenes.com"});
_local15.push({str:"(c) Kriss Daniels 2007 : XIXs.com", url:"http://XIXs.com"});
_local15.push({str:"Powered by project opus / XSPF : ProjectOpus.com", url:"http://www.projectopus.com"});
_local15.push({opt:"shuffle"});
_local15.push({opt:"autoplay"});
_local15.push({opt:"repeat"});
_local15.push({opt:"sfx"});
_root.cacheAsBitmap = _local2;
throbe = 0;
}
function premenu(obj, cm) {
var _local4 = true;
var _local5 = gizmo_list1.hover;
if (!_local5) {
_local5 = gizmo_list2.hover;
}
if (_local5.item > 0) {
_local5 = tracks[_local5.item];
} else {
_local5 = null;
}
if ((view == "tracks") && (_local5)) {
_local4 = true;
} else {
_local4 = false;
}
if (_local4 == false) {
cm.customItems[0].enabled = false;
cm.customItems[0].caption = "Download MP3";
cm.customItems[1].enabled = false;
cm.customItems[1].caption = "Remember MP3";
} else {
menu_mp3_name = "" + _local5.title;
menu_mp3_link = "" + _local5.location;
cm.customItems[0].enabled = true;
cm.customItems[0].caption = "Download " + menu_mp3_name;
cm.customItems[1].enabled = false;
cm.customItems[1].caption = "Remember " + menu_mp3_name;
}
}
function setmenu(mc) {
var _local3 = new ContextMenu(delegate(premenu));
_local3.hideBuiltInItems();
var _local5 = delegate(menu_download);
var _local4 = new ContextMenuItem("Download this MP3", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_remember);
_local4 = new ContextMenuItem("Remember this MP3", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_do, "pp");
_local4 = new ContextMenuItem("Play / Pause", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_do, "forward");
_local4 = new ContextMenuItem("Next Track", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_do, "backward");
_local4 = new ContextMenuItem("Previous Track / Rewind", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_vol, 100);
_local4 = new ContextMenuItem("Set Volume to 100%", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_vol, 75);
_local4 = new ContextMenuItem("Set Volume to 75%", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_vol, 50);
_local4 = new ContextMenuItem("Set Volume to 50%", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_vol, 25);
_local4 = new ContextMenuItem("Set Volume to 25%", _local5);
_local3.customItems.push(_local4);
_local5 = delegate(menu_vol, 0);
_local4 = new ContextMenuItem("Set Volume to 0%", _local5);
_local3.customItems.push(_local4);
mc.menu = _local3;
}
function menu_download() {
getURL (menu_mp3_link, "_blank");
}
function menu_remember() {
}
function menu_vol(a, b, c) {
gizmo_volume_knob.set_knob(0, 1 - (c / 100));
}
function set_vol(v) {
gizmo_volume_knob.set_knob(0, 1 - (v / 100));
}
function set_vol_start(v, g) {
gizmo_volume_knob.set_knob(0, 1 - (v / 100));
if (g) {
if (state == "pause") {
onClick_id("play");
}
auto = 1;
} else {
if (state == "play") {
onClick_id("pause");
}
auto = 0;
}
}
function menu_do(a, b, c) {
if (c == "pp") {
if (state == "play") {
onClick_id("pause");
} else {
onClick_id("play");
}
} else {
onClick_id(c);
}
}
function split_list_view() {
var _local2 = gizmo_list1.up.w;
if ((view == "xspfs") || ((got_creator < (tracks.length / 2)) || (view == "options"))) {
gizmo_list1.w = _local2;
gizmo_list2.w = 0;
} else if (got_creator) {
gizmo_list1.w = (_local2 * 2) / 3;
gizmo_list2.x = gizmo_list1.w;
gizmo_list2.w = (_local2 * 1) / 3;
}
gizmo_list1.draw_mask();
gizmo_list2.draw_mask();
}
function show_options() {
view = "options";
var _local2 = 0;
for ( ; _local2 < options.length ; _local2++) {
var _local3 = options[_local2];
if (_local3.opt) {
_local3.str = get_option_str(_local3.opt);
}
}
gizmo_list1.items = options;
gizmo_list1.onClick = delegate(select_option);
gizmo_list2.items = [];
gizmo_list2.onClick = null;
split_list_view();
}
function get_option_str(s) {
switch (s) {
case "shuffle" :
return("Shuffle is " + (shuffle ? "ON" : "OFF"));
case "autoplay" :
return("Autoplay is " + (auto ? "ON" : "OFF"));
case "repeat" :
return("Repeat is " + (loop ? "ON" : "OFF"));
case "sfx" :
return("Sound effects are " + (sfx_on ? "ON" : "OFF"));
}
return("");
}
function toggle_option(s) {
switch (s) {
case "shuffle" :
shuffle = (shuffle ? 0 : 1);
break;
case "autoplay" :
auto = (auto ? 0 : 1);
break;
case "repeat" :
loop = (loop ? 0 : 1);
break;
case "sfx" :
sfx_on = (sfx_on ? 0 : 1);
}
show_options();
}
function show_xspfs() {
view = "xspfs";
gizmo_list1.items = xspfs;
gizmo_list1.onClick = delegate(select_xspf);
gizmo_list2.items = [];
gizmo_list2.onClick = null;
split_list_view();
}
function show_tracks() {
view = "tracks";
gizmo_list1.items = tracks1;
gizmo_list2.items = tracks2;
gizmo_list1.onClick = delegate(select_mp3);
gizmo_list2.onClick = delegate(select_mp3_artist);
split_list_view();
}
function select_option(ln) {
var _local3 = ln.item;
if (_local3 == 0) {
show_xspfs();
return(undefined);
}
var _local4 = options[_local3];
if (_local4.url) {
getURL (_local4.url, "BOT");
} else if (_local4.opt) {
toggle_option(_local4.opt);
}
}
function select_xspf(ln) {
var _local3 = ln.item;
if ((_local3 >= (xspfs.length - 1)) || (_local3 < 0)) {
show_options();
} else {
xspf_id = _local3;
load_xml(xspfs[_local3].url);
state = "pause";
}
}
function select_mp3(ln) {
select_mp3_id(ln.item);
}
function select_mp3_id(id) {
if (id == 0) {
show_xspfs();
} else {
track_id = id;
play_mp3(tracks[track_id]);
gizmo_play.active = false;
gizmo_pause.active = true;
state = "play";
}
}
function select_mp3_artist(ln) {
var _local3 = ln.item;
show_artist(tracks[_local3]);
}
function play_mp3(t) {
if (t == undefined) {
return(undefined);
}
load_image(t.image);
if (t.creator == "") {
set_title(t.title);
} else {
set_title((t.title + " (by) ") + t.creator);
}
disp_title = t.title;
disp_creator = t.creator;
disp_info = t.info;
sfx.stop();
sfx.start(0);
sfx.stop();
sfx.loadSound(t.location, true);
gizmo_position_knob.set_knob(0, 0);
sfx_load_stall_counter = 0;
}
function stop_mp3() {
sfx.stop();
sfx_next.stop();
gizmo_position_knob.set_knob(0, 0);
gizmo_play.active = true;
gizmo_pause.active = false;
state = "pause";
}
function show_artist(t) {
getURL (t.info, "BOT");
}
function set_title(str) {
gizmo_title.str = str;
}
function load_back_image(url) {
mc_back_image.removeMovieClip();
mc_back_image = gfx.create_clip(mc_back);
mc_back_image._lockroot = true;
mc_back_image.loadMovie(url);
}
function do_tint() {
if ((_root.wp_back != undefined) && (_root.wp_back != "")) {
gfx.clear(mc_back_colour);
mc_back_colour.style.fill = int(_root.wp_back);
gfx.draw_box(mc_back_colour, undefined, -x, -y, w + (x * 2), h + (y * 2));
}
}
function load_image(url) {
if (image_url == url) {
return(undefined);
}
if (image_url == "") {
return(undefined);
}
if (image_url == "undefined") {
return(undefined);
}
if (image_url == undefined) {
return(undefined);
}
image_url = url;
mc_image3 = gfx.create_clip(mc_image);
mc_image3._lockroot = true;
mc_image3.loadMovie(url);
mc_image.onEnterFrame = delegate(load_image_check);
mc_image2.removeMovieClip();
mc_image2 = mc_image3;
mc_image3 = null;
}
function load_image_check() {
var _local2 = mc_image2.getBytesTotal();
var _local3 = mc_image2.getBytesLoaded();
if (_local2 == -1) {
mc_image.onEnterFrame = null;
return(undefined);
}
if ((_local3 != _local2) || ((_local2 == 0) || ((mc_image2._width == 0) || (mc_image2._height == 0)))) {
return(undefined);
}
mc_image.onEnterFrame = null;
var _local4 = (100 * w) / mc_image2._width;
var _local5 = (100 * h) / mc_image2._height;
var _local6 = _local4;
if (_local5 < _local6) {
_local6 = _local5;
}
var _local7 = (_local6 * mc_image2._width) / 100;
var _local8 = (_local6 * mc_image2._height) / 100;
_local7 = (w - _local7) / 2;
_local8 = (h - _local8) / 2;
mc_image2._xscale = _local6;
mc_image2._yscale = _local6;
mc_image2._x = _local7;
mc_image2._y = _local8;
}
function clean() {
}
function onClick(g) {
onClick_id(g.id);
}
function onClick_id(g_id) {
switch (g_id) {
case "forward" :
gizmo_play.active = false;
gizmo_pause.active = true;
click_forward();
state = "play";
break;
case "backward" :
gizmo_play.active = false;
gizmo_pause.active = true;
click_backward();
state = "play";
break;
case "play" :
if (state != "play") {
gizmo_play.active = false;
gizmo_pause.active = true;
sfx.start(((sfx.played_frac / sfx.loaded_frac) * sfx.duration) / 1000);
state = "play";
}
break;
case "pause" :
if (state != "pause") {
gizmo_play.active = true;
gizmo_pause.active = false;
sfx.stop();
state = "pause";
}
break;
case "position_knob" :
gizmo_play.active = false;
gizmo_pause.active = true;
sfx.stop();
var _local3 = (gizmo_position_knob.x_knob / sfx.loaded_frac) * sfx.duration;
if (_local3 > (sfx.duration - 500)) {
_local3 = sfx.duration - 500;
}
if (_local3 < 0) {
_local3 = 0;
}
sfx.start(_local3 / 1000);
state = "play";
}
}
function update() {
var _local2 = ((sfx.getBytesTotal() > 0) ? (sfx.getBytesLoaded() / sfx.getBytesTotal()) : 0);
var _local3 = ((sfx.duration > 0) ? ((sfx.position / sfx.duration) * sfx.loaded_frac) : 0);
if (mc._visible) {
var _local4 = row_size;
if (view == "tracks") {
gizmo_list1.selected = track_id;
gizmo_list2.selected = track_id;
} else if (view == "xspfs") {
gizmo_list1.selected = xspf_id;
gizmo_list2.selected = xspf_id;
}
var _local6 = _root.poker.snapshot();
_root.localToGlobal(_local6);
gizmo.mc.globalToLocal(_local6);
gizmo.focus = gizmo.input(_local6);
gizmo.update();
sfx.played_frac_last = sfx.played_frac;
sfx.loaded_frac_last = sfx.loaded_frac;
sfx.loaded_frac = _local2;
sfx.played_frac = _local3;
if (sfx.played_frac != sfx.played_frac_last) {
gizmo_position_knob.set_knob(sfx.played_frac, 0);
}
if (sfx.loaded_frac != sfx.loaded_frac_last) {
var _local5 = gizmo_position;
_local5.mc.clear();
_local5.mc.style = {fill:536870912 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
gfx.draw_box(_local5.mc, undefined, (_local4 * 1) / 16, (_local4 * 1) / 16, (_local5.w - ((_local4 * 2) / 16)) * sfx.loaded_frac, _local5.h - ((_local4 * 2) / 16));
_local5.mc.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
up.wetplayGFX.draw_boxen(_local5.mc, 0, 0, _local5.w, _local5.h);
sfx_load_stall_counter = 0;
} else if ((sfx.loaded_frac != 1) && (sfx.played_frac == sfx.played_frac_last)) {
sfx_load_stall_counter++;
} else {
sfx_load_stall_counter = 0;
}
}
if (state == "play") {
throbe = throbe * (1 - (0.05 * (1 - gizmo_volume_knob.y_knob)));
if (throbe <= 0.05) {
throbe = 1 - gizmo_volume_knob.y_knob;
}
if ((((_local2 == 1) && (sfx.getBytesTotal() != undefined)) && (sfx.position >= (sfx.duration - 1))) || (sfx_load_stall_counter > (31 * 5))) {
if (gizmo_volume_knob.y_knob != 1) {
sfx_load_stall_counter = 0;
play_next_track();
} else {
throbe = 0;
}
}
} else {
throbe = 0;
}
sfx_master.setVolume((1 - gizmo_volume_knob.y_knob) * 100);
so_save();
}
function click_forward() {
play_next_track();
}
function play_next_track() {
if (tracks.length == 0) {
return(undefined);
}
track_id++;
if (track_id >= tracks.length) {
track_id = 1;
if (shuffle) {
shuffle_tracks();
}
if (!loop) {
play_mp3(tracks[track_id]);
stop_mp3();
return(undefined);
}
} else if (track_id <= 0) {
track_id = 1;
if (shuffle) {
shuffle_tracks();
}
}
play_mp3(tracks[track_id]);
}
function click_backward() {
if (sfx.position < 2000) {
play_prev_track();
} else {
sfx.start(0);
}
}
function play_prev_track() {
track_id--;
if ((track_id <= 0) || (track_id >= tracks.length)) {
track_id = tracks.length - 1;
if (shuffle) {
shuffle_tracks();
}
}
play_mp3(tracks[track_id]);
state = "play";
}
function do_str(str) {
up.do_str(str);
}
function load_xml(s) {
if (xspf.onLoad) {
return(undefined);
}
if (tracks_url == s) {
show_tracks();
return(undefined);
}
tracks_url = s;
var _local4 = tracks_url.split("/");
var _local5 = _local4[_local4.length - 1].split(".");
if (s == "MP3") {
var _local6 = ((("<?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";
xspf.parseXML(_local6);
loaded_xml();
} else if (_local5[_local5.length - 1].toLowerCase() == "mp3") {
var _local7 = ((("<?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";
xspf.parseXML(_local7);
loaded_xml();
} else if (_local4[2] == "www.last.fm") {
var _local3 = s.split("%20");
s = _local3.join("+");
_local3 = s.split(" ");
s = _local3.join("+");
dbg.print(s);
xspf.noData = xspf.onData;
xspf.onData = delegate(loaded_html);
xspf.onLoad = delegate(loaded_html);
xspf.load(s);
set_title("scraping html");
} else if (s == "grabb.it") {
xspf.onData = delegate(loaded_grabbit);
xspf.load("http://grabb.it/sessions.js");
set_title("Getting username");
} else {
xspf.onLoad = delegate(loaded_xml);
xspf.load(s);
set_title("Loading Playlist");
}
}
function loaded_html(txt) {
track_preload();
var _local9 = null;
xspf.onData = xspf.noData;
xspf.onLoad = null;
var _local3 = txt.split(".mp3");
var _local7 = 0;
for ( ; _local7 < _local3.length ; _local7++) {
var _local4 = _local3[_local7].split("http:");
var _local6 = _local4[_local4.length - 1];
if (_local6.substring(0, 2) == "//") {
var _local5 = _local6.split("/");
if (_local5[3] == "download") {
var _local10 = ("http:" + _local6) + ".mp3";
if (_local9 != _local10) {
_local9 = _local10;
var _local11 = new Object();
_local11.location = _local10;
_local11.creator = " on Last.FM";
add_tr(_local11);
_local11.info = "http://www.last.fm/music/?m=tracks&q=" + _local11.titleurl;
}
}
}
}
track_postload();
}
function track_preload() {
tracks = new Array();
tracks1 = new Array();
tracks2 = new Array();
tracks[0] = {str:".. (click to go back)"};
tracks1[0] = {str:".. (click to go back)"};
tracks2[0] = {str:""};
got_creator = 0;
}
function track_postload() {
show_tracks();
stop_mp3();
set_title(("Loaded " + (tracks.length - 1)) + " tracks.");
show_tracks();
track_id = -1;
if (shuffle) {
shuffle_tracks();
}
if (auto) {
select_mp3_id(1);
}
}
function loaded_grabbit(src) {
var _local3 = src.split("\"")[3];
xspf = new XML();
xspf.ignoreWhite = true;
xspf.onLoad = delegate(loaded_xml);
if (_local3) {
xspf.load(("http://grabb.it/users/" + _local3) + ".xspf");
} else {
xspf.load("http://grabb.it/charts/activity.xspf");
}
set_title("Loading Playlist");
}
function loaded_xml() {
xspf.onLoad = null;
track_preload();
parse_xml(xspf);
track_postload();
}
function parse_xml(n) {
if (n.nodeName == "track") {
add_track_from_xml(n);
} else {
var _local4 = n.childNodes;
var _local3 = 0;
for ( ; _local3 < _local4.length ; _local3++) {
parse_xml(_local4[_local3]);
}
}
}
function add_tr(tr) {
var _local7 = tr.location;
var _local10 = _local7.split("/");
if (_local10.length > 1) {
if (_local10[_local10.length - 1] == "") {
_local7 = _local10[_local10.length - 2];
} else {
_local7 = _local10[_local10.length - 1];
}
}
_local7 = _global.unescape(_local7);
_local10 = _local7.split("+");
_local7 = _local10.join(" ");
_local10 = _local7.split("%");
var _local4 = 1;
for ( ; _local4 < _local10.length ; _local4++) {
_local10[_local4] = _local10[_local4].substr(2);
}
_local7 = _local10.join(" ");
_local10 = _local7.split(".mp3");
_local7 = _local10.join(" ");
_local10 = _local7.split(" ");
var _local3 = 1;
for ( ; _local3 < _local10.length ; _local3++) {
if ((_local10[_local3] == "") && (_local10[_local3 - 1] == "")) {
_local10.splice(_local3, 1);
_local3--;
}
}
_local7 = _local10.join(" ");
tr.titleurl = _local7;
if (tr.title == undefined) {
tr.title = tr.annotation;
}
if (tr.title == undefined) {
tr.title = tr.titleurl;
}
_local7 = tr.title;
_local10 = _local7.split(newline);
_local7 = _local10.join(" ");
_local10 = _local7.split(" ");
_local3 = 1;
for ( ; _local3 < _local10.length ; _local3++) {
if ((_local10[_local3] == "") && (_local10[_local3 - 1] == "")) {
_local10.splice(_local3, 1);
_local3--;
}
}
_local7 = _local10.join(" ");
tr.title = _local7;
if (tr.creator == undefined) {
tr.creator = "";
} else {
got_creator++;
}
var _local8 = "" + tr.title;
var _local9 = "" + tr.creator;
tracks[tracks.length] = tr;
tracks1[tracks1.length] = {str:_local8};
tracks2[tracks2.length] = {str:_local9};
}
function add_track_from_xml(n) {
var _local5 = new Object();
var _local4 = n.childNodes;
var _local3 = 0;
for ( ; _local3 < _local4.length ; _local3++) {
var _local6 = _local4[_local3];
if (_local6.nodeName && (_local6.firstChild.nodeValue)) {
_local5[_local6.nodeName] = _local6.firstChild.nodeValue;
}
}
add_tr(_local5);
}
function shuffle_tracks() {
var _local4 = tracks.length - 1;
var _local2 = 0;
for ( ; _local2 < _local4 ; _local2++) {
var _local3 = rnd() % _local4;
tracks.splice(1, 0, tracks[_local3 + 1]);
tracks.splice(_local3 + 2, 1);
tracks1.splice(1, 0, tracks1[_local3 + 1]);
tracks1.splice(_local3 + 2, 1);
tracks2.splice(1, 0, tracks2[_local3 + 1]);
tracks2.splice(_local3 + 2, 1);
}
}
function so_load() {
so = SharedObject.getLocal("www.wetgenes.com/WetPlay");
var _local2 = so.data;
so_loaded = false;
if (_local2.sfx != undefined) {
sfx_on = _local2.sfx;
so_loaded = true;
}
}
function so_save() {
var _local2 = false;
var _local3 = so.data;
var _local4 = Math.floor((1 - gizmo_volume_knob.y_knob) * 100);
if (_local3.vol != _local4) {
_local2 = true;
_local3.vol = _local4;
}
if (_local3.sfx != sfx_on) {
_local2 = true;
_local3.sfx = sfx_on;
}
if (_local3.auto != auto) {
_local2 = true;
_local3.auto = auto;
}
if (_local2) {
so.flush();
}
}
//ASSetPropFlags(_local1, null, 1);
var disp_title = "";
var disp_creator = "";
var disp_info = "";
var throbe = 0;
var rnd_num = 0;
var so_loaded = false;
}
Symbol 20497 MovieClip [__Packages.WetPlayGFX] Frame 0
class WetPlayGFX
{
var up;
function WetPlayGFX () {
}
function WetPlayMP3(_up) {
up = _up;
}
function draw_play(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.moveTo(x + (_local7 * 5), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 5), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local7 * 11), y + (_local8 * 8));
mc.endFill();
}
function draw_back(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.moveTo(x + (_local7 * 11), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 11), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local7 * 5), y + (_local8 * 8));
mc.endFill();
}
function draw_stop(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.moveTo(x + (_local7 * 12), y + (_local8 * 4));
mc.lineTo(x + (_local7 * 12), y + (_local8 * 12));
mc.lineTo(x + (_local7 * 4), y + (_local8 * 12));
mc.lineTo(x + (_local7 * 4), y + (_local8 * 4));
mc.endFill();
}
function draw_pause(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.moveTo(x + (_local7 * 4), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 4), y + (_local9 * 13));
mc.lineTo(x + (_local7 * 7), y + (_local9 * 13));
mc.lineTo(x + (_local7 * 7), y + (_local9 * 3));
mc.moveTo(x + (_local7 * 9), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 9), y + (_local9 * 13));
mc.lineTo(x + (_local7 * 12), y + (_local9 * 13));
mc.lineTo(x + (_local7 * 12), y + (_local9 * 3));
mc.endFill();
}
function draw_forward(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.moveTo(x + (_local7 * 3), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 3), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local7 * 8), y + (_local8 * 8));
mc.moveTo(x + (_local7 * 8), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 8), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local7 * 13), y + (_local8 * 8));
mc.endFill();
}
function draw_backward(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.moveTo(x + (_local7 * 8), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 8), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local7 * 3), y + (_local8 * 8));
mc.moveTo(x + (_local7 * 13), y + (_local9 * 3));
mc.lineTo(x + (_local7 * 13), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local7 * 8), y + (_local8 * 8));
mc.endFill();
}
function draw_boxen(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.endFill();
}
function draw_puck(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + (_local9 * 3), y + (_local9 * 3));
mc.lineTo((x + w) - (_local9 * 3), y + (_local9 * 3));
mc.lineTo((x + w) - (_local9 * 3), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local9 * 3), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local9 * 3), y + (_local9 * 3));
mc.endFill();
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20498 MovieClip [__Packages.Loading] Frame 0
class Loading
{
var defuck, mc, mcanim, tf2, tf3, mcmochi, waitfordisplay, server, my_server, splash, splash_link, mcsplash, splash_count;
function Loading () {
setup();
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup() {
defuck = _root._highquality;
done = false;
mc = gfx.create_clip(_root, null);
gfx.clear(mc);
mc.style.fill = -16777216;
gfx.draw_box(mc, 0, 0, 0, 800, 600);
mcanim = gfx.create_clip(mc, null);
tf2 = gfx.create_text_html(mcanim, null, 25, 25, 750, 200);
gfx.dropshadow(mcanim, 2, 45, 0, 1, 4, 4, 2, 3);
tf3 = gfx.create_text_html(mcanim, null, 200, 250, 400, 300);
var _local2 = "";
_local2 = _local2 + "<p align=\"center\">";
_local2 = _local2 + "This game is creator owned by real people who have worked very hard to provide the best gaming experience they can.<br><br>";
_local2 = _local2 + "All sponsor advertising is a necessity to cover the costs of maintaining score/chat/multiplayer servers.";
_local2 = _local2 + "</p>";
gfx.set_text_html(tf2, 23, 16777215, _local2);
mcmochi = gfx.create_clip(mc, null, (800 - ((600 * 800) / 640)) / 2, (600 - ((440 * 600) / 480)) / 2, (100 * 800) / 640, (100 * 600) / 480);
mcmochi.click = gfx.create_clip(mcmochi, null);
waitfordisplay = true;
mcmochi.dispad = gfx.create_clip(mcmochi, null);
mc.onEnterFrame = delegate(update, null);
server = "www";
my_server = false;
if ((_root._url.indexOf("http://www.wetgenes.local/") == 0) || ((_root._url.indexOf("http://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))))))) {
server = "local";
}
if ((_root._url.indexOf("http://wetdike.wetgenes.com") == 0) || ((_root._url.indexOf("http://www.wetgenes.com") == 0) || (_root._url.indexOf("http://wetgenes.com") == 0))) {
my_server = true;
}
_root.kidsafe = false;
if (server != "local") {
_root.wethidemochiads = false;
_root.skip_wetimport = false;
_root.skip_wetlogin = false;
_root.skip_wetscore = false;
}
var _local3 = _root._url.split("/");
_local3 = _local3[2].split(".");
_local3[0] = _local3[0].toLowerCase();
_local3[1] = _local3[1].toLowerCase();
_local3[2] = _local3[2].toLowerCase();
var _local4 = "";
if ((!_local3[3]) && (_local3[2])) {
_local4 = _local3[1];
} else if ((!_local3[2]) && (_local3[1])) {
_local4 = _local3[0];
}
switch (_local4) {
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" :
splash = "splash_ng";
splash_link = "http://www.newgrounds.com/";
break;
case "armorgames" :
splash = "splash_ag";
splash_link = "http://armorgames.com/";
break;
case "kongregate" :
splash = "splash_kg";
splash_link = "http://www.kongregate.com/";
}
if (brandead_link != "") {
splash = brandead_image;
splash_link = brandead_link;
}
if (splash) {
mcsplash = gfx.create_clip(mc, null, 400, 300, 220, 220);
mcsplash.splash = gfx.add_clip(mcsplash, splash, null, -300 / 2, -250 / 2);
mcsplash.onRelease = delegate(splashclick);
splash_count = 0;
} else if ((!_root.wethidemochiads) && (!_root.wethideloadingmochiads)) {
mochi_show();
}
}
function splashclick() {
if (splash_link) {
getURL (splash_link, "_blank");
}
}
function update() {
_root.stop();
_root.scalar.apply(mc);
if (splash) {
if (splash_count == (25 * 5)) {
splash_count++;
mcsplash._visible = false;
splash = null;
if ((!_root.wethidemochiads) && (!_root.wethideloadingmochiads)) {
mochi_show();
}
} else if (splash_count > (25 * 4.5)) {
splash_count++;
mcsplash._xscale = mcsplash._xscale * 0.75;
mcsplash._yscale = mcsplash._yscale * 0.75;
mcsplash._alpha = mcsplash._alpha * 0.75;
} else if (splash_count < (25 * 5)) {
splash_count++;
}
} else {
frame++;
}
loaded_percent = Math.floor((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
if ((!_root.wethidemochiads) && (!_root.wethideloadingmochiads)) {
mcmochi._visible = true;
} else {
mcmochi._visible = false;
}
gfx.set_text_html(tf3, 100, 16777215, ("<p align=\"center\"><b>" + Math.floor(loaded_percent)) + "%</b></p>");
if ((loaded_percent >= 100) && ((!splash) && (!waitforit))) {
clean();
}
}
function clean() {
_root.swish.clean();
_root.swish = new Swish({style:"sqr_plode", mc:mc}).setup();
Stage.removeListener(this);
mc.removeMovieClip();
mc = null;
_root.gotoAndStop(2);
done = true;
_root._highquality = defuck;
}
function mochi_started() {
waitforit = true;
waitfordisplay = false;
}
function mochi_finished() {
waitforit = false;
}
function mochi_show() {
MochiAd.showInterLevelAd({id:"7cf11a23d99c1aef", res:"600x440", clip:mcmochi.dispad, ad_started:delegate(mochi_started), ad_finished:delegate(mochi_finished)});
}
function click(s) {
if (!(s === "text")) {
}
}
//ASSetPropFlags(_local1, null, 1);
var brandead_link = "";
var brandead_image = "splash_brandead";
var done = false;
var loaded_percent = 0;
var frame = 0;
var waitforit = false;
}
Symbol 20499 MovieClip [__Packages.PlayAbout] Frame 0
class PlayAbout
{
var up, mcs, tfs, mc, done, steady, update_do;
function PlayAbout (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setbutt(m, n) {
m.onRollOver = delegate(over, n);
m.onRollOut = delegate(notover, n);
m.onReleaseOutside = delegate(notover, n);
m.onRelease = delegate(click, n);
}
function setup() {
_root.popup = this;
mcs = new Array();
tfs = new Array();
mc = gfx.create_clip(_root.mc_popup, null);
mc.cacheAsBitmap = true;
gfx.dropshadow(mc, 5, 45, 0, 1, 20, 20, 2, 3);
mc._y = 0;
mc.dx = 0;
mc._x = -800;
done = false;
steady = false;
gfx.clear(mc);
mc.style.out = -16777216;
mc.style.fill = -2147483648;
gfx.draw_box(mc, 0, 100 + 16, 0 + 16, 600 - 32, 600 - 32);
tfs[0] = gfx.create_text_html(mc, null, 150, 50, 500, 500);
var _local5 = "";
_local5 = _local5 + "<p align='center'><b>WetDiamonds</b> <font size='13'>generic</font> v2.02 <font size='13'>(c) Kriss+Shi Daniels Apr 13 2008<br>";
_local5 = _local5 + "<a target='BOT' href='http://creativecommons.org/licenses/by-nd/2.5/'>Distributed under the CC Attribution-NoDerivs 2.5 Licence.</a>";
_local5 = _local5 + "</font></p>";
_local5 = _local5 + "<br>";
_local5 = _local5 + "<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>";
tfs[0].multiline = true;
tfs[0].wordWrap = true;
tfs[0].html = true;
tfs[0].selectable = false;
gfx.set_text_html(tfs[0], 22, 16777215, _local5);
mcs[0] = gfx.create_clip(mc, null, 0, 570 - ((220 * 800) / 640), (100 * 800) / 640, (100 * 800) / 640);
setbutt(mcs[0], "wetcoma");
mcs[2] = gfx.add_clip(mc, "auth_kriss", null, 300, (570 - ((220 * 800) / 640)) - 100, 100, 100);
setbutt(mcs[2], "kriss");
mcs[3] = gfx.add_clip(mc, "auth_shi", null, 400, (570 - ((220 * 800) / 640)) - 100, 100, 100);
setbutt(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});
mcs[1] = null;
show_loaded();
thunk();
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
_root.poker.clear_clicks();
}
function clean() {
if (_root.popup != this) {
return(undefined);
}
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
_root.poker.clear_clicks();
}
function show_loaded() {
if (mcs[1] == null) {
if (_root.bmc.isloaded("wetcoma")) {
mcs[1] = _root.bmc.create(mcs[0], "wetcoma", null);
}
}
}
function thunk() {
}
function over(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 made the super duper art.<br>Click to see her site.", 25 * 10);
}
}
function notover(s) {
_root.poker.ShowFloat(null, 0);
}
function click(s) {
switch (s) {
case "wetcoma" :
getURL ("http://4lfa.com", "BOT");
break;
case "kriss" :
getURL ("http://XIXs.com", "BOT");
break;
case "shi" :
getURL ("http://esyou.com", "BOT");
}
}
function update() {
show_loaded();
if ((_root.popup == this) && (_root.poker.anykey)) {
if (steady) {
done = true;
mc.dx = _root.scalar.ox;
}
}
if ((_root.popup != this) || (_root.pause)) {
return(undefined);
}
mc._x = mc._x + ((mc.dx - mc._x) / 4);
if (((mc._x - mc.dx) * (mc._x - mc.dx)) < (16 * 16)) {
steady = true;
if (done) {
clean();
}
} else {
steady = false;
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20500 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local2 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local2);
var _local3 = options.clip;
var _local4 = 11000;
var _local5 = options.ad_timeout;
delete options.ad_timeout;
var _local6 = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local7 = _local3._mochiad;
_local7.onUnload = function () {
options.ad_finished();
};
var _local8 = _getRes(options);
var _local9 = _local8[0];
var _local10 = _local8[1];
_local7._x = _local9 * 0.5;
_local7._y = _local10 * 0.5;
var chk = _local7.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local9 * -0.5;
chk._y = _local10 * -0.5;
var _local11 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local11._x = 10;
_local11._y = _local10 - 20;
var _local12 = options.color;
delete options.color;
var _local13 = options.background;
delete options.background;
var _local14 = options.outline;
delete options.outline;
var _local15 = _local11.createEmptyMovieClip("_outline", 1);
_local15.beginFill(_local13);
_local15.moveTo(0, 0);
_local15.lineTo(_local9 - 20, 0);
_local15.lineTo(_local9 - 20, 10);
_local15.lineTo(0, 10);
_local15.lineTo(0, 0);
_local15.endFill();
var _local16 = _local11.createEmptyMovieClip("_inside", 2);
_local16.beginFill(_local12);
_local16.moveTo(0, 0);
_local16.lineTo(_local9 - 20, 0);
_local16.lineTo(_local9 - 20, 10);
_local16.lineTo(0, 10);
_local16.lineTo(0, 0);
_local16.endFill();
_local16._xscale = 0;
var _local17 = _local11.createEmptyMovieClip("_outline", 3);
_local17.lineStyle(0, _local14, 100);
_local17.moveTo(0, 0);
_local17.lineTo(_local9 - 20, 0);
_local17.lineTo(_local9 - 20, 10);
_local17.lineTo(0, 10);
_local17.lineTo(0, 0);
chk.ad_msec = _local4;
chk.ad_timeout = _local5;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = _local6;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
_local7.lc.adLoaded = function (width, height) {
};
_local7.lc.adjustProgress = function (msec) {
var _local3 = this.mc._mochiad_wait;
_local3.server_control = true;
_local3.started = getTimer();
_local3.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local2 = this._parent._parent;
var _local3 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local5 = false;
var _local6 = _local2.getBytesTotal();
var _local7 = _local2.getBytesLoaded();
var _local8 = (100 * _local7) / _local6;
var _local9 = (100 * _local4) / chk.ad_msec;
var _local10 = this._mochiad_bar._inside;
var _local11 = Math.min(100, Math.min(_local8 || 0, _local9));
_local11 = Math.max(this.last_pcnt, _local11);
this.last_pcnt = _local11;
_local10._xscale = _local11;
if (!chk.showing) {
var _local12 = _local3.getBytesTotal();
if ((_local12 > 0) || (typeof(_local12) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local5 = true;
}
}
if (_local4 > chk.ad_msec) {
_local5 = true;
}
if ((_local6 > 0) && ((_local7 >= _local6) && (_local5))) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local2 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local2);
var _local3 = options.clip;
var _local4 = 11000;
var _local5 = options.ad_timeout;
delete options.ad_timeout;
var _local6 = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local7 = _local3._mochiad;
_local7.onUnload = function () {
options.ad_finished();
};
var _local8 = _getRes(options);
var _local9 = _local8[0];
var _local10 = _local8[1];
_local7._x = _local9 * 0.5;
_local7._y = _local10 * 0.5;
var chk = _local7.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local4;
chk.ad_timeout = _local5;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = _local6;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
_local7.lc.adLoaded = function (width, height) {
};
_local7.lc.adjustProgress = function (msec) {
var _local3 = this.mc._mochiad_wait;
_local3.server_control = true;
_local3.started = getTimer();
_local3.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local2 = this._parent._mochiad_ctr;
var _local3 = getTimer() - this.started;
var _local4 = false;
if (!chk.showing) {
var _local5 = _local2.getBytesTotal();
if ((_local5 > 0) || (typeof(_local5) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local3 > chk.ad_timeout) {
_local4 = true;
}
}
if (_local3 > chk.ad_msec) {
_local4 = true;
}
if (_local4) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local3 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local3);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local3);
}
}
return(_local3);
}
static function _loadCommunicator(options) {
var _local3 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local3);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local4 = options.clip;
var _local5 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local4[_local5]) {
return(_local4[_local5].lc);
}
var _local6 = options.com_server + options.id;
_allowDomains(_local6);
delete options.id;
delete options.com_server;
var _local7 = options.depth;
delete options.depth;
var _local8 = _local4.createEmptyMovieClip(_local5, _local7);
var _local9 = _local8.createEmptyMovieClip("_mochiad_com", 1);
for (var k in options) {
_local9[k] = options[k];
}
var _local10 = new LocalConnection();
var _local11 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local10.mc = _local8;
_local10.name = _local11;
_local10.allowDomain = function (d) {
return(true);
};
_local10.allowInsecureDomain = _local10.allowDomain;
_local10.connect(_local11);
_local8.lc = _local10;
_local9.lc = _local11;
_local10._id = 0;
_local10._queue = [];
_local10.rpcResult = function (cb_arg) {
var _local3 = _global.parseInt(cb_arg);
var _local4 = this._callbacks[_local3];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local3];
var _local5 = [];
var _local6 = 2;
for ( ; _local6 < _local4.length ; _local6++) {
_local5.push(_local4[_local6]);
}
var _local7 = 1;
for ( ; _local7 < arguments.length ; _local7++) {
_local5.push(arguments[_local7]);
}
var _local8 = _local4[1];
var _local9 = _local4[0];
if (_local9 && (typeof(_local8) == "string")) {
_local8 = _local9[_local8];
}
if (_local8) {
_local8.apply(_local9, _local5);
}
};
_local10._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local3 = this._queue;
delete this._queue;
var _local4 = this.doSend;
var _local5 = 0;
for ( ; _local5 < _local3.length ; _local5++) {
var _local6 = _local3[_local5];
_local4.apply(this, _local6);
}
};
_local10.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local5 = [];
var _local6 = 0;
for ( ; _local6 < arguments.length ; _local6++) {
_local5.push(arguments[_local6]);
}
this._queue.push(_local5);
return(undefined);
}
this._id = this._id + 1;
var _local7 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local7] = [cbobj, cbfn];
var _local8 = new LocalConnection();
var _local9 = _local8.send(this._endpoint, "rpc", _local7, args);
};
_local10._callbacks = {};
_local10._callbacks[0] = [_local10, "_didConnect"];
_local9.st = getTimer();
_local9.loadMovie(_local6 + ".swf", "POST");
return(_local10);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local5 = _loadCommunicator({id:options.id});
if (!_local5) {
return(false);
}
var _local6 = ["fetchHighScores", options];
_local5.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local5 = _loadCommunicator({id:options.id});
if (!_local5) {
return(false);
}
var _local6 = ["sendHighScore", options];
_local5.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local3 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local3);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local4 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local4._mochiad_loaded) {
return(null);
}
var _local5 = options.depth;
delete options.depth;
var _local6 = _local4.createEmptyMovieClip("_mochiad", _local5);
var _local7 = _getRes(options);
options.res = (_local7[0] + "x") + _local7[1];
options.server = options.server + options.id;
delete options.id;
_local4._mochiad_loaded = true;
var _local8 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var k in options) {
_local8[k] = options[k];
}
var _local9 = _local8.server;
delete _local8.server;
var _local10 = _allowDomains(_local9);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local11 = new LocalConnection();
var _local12 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local11.mc = _local6;
_local11.name = _local12;
_local11.hostname = _local10;
_local11.allowDomain = function (d) {
return(true);
};
_local11.allowInsecureDomain = _local11.allowDomain;
_local11.connect(_local12);
_local6.lc = _local11;
_local8.lc = _local12;
_local8.st = getTimer();
_local8.loadMovie(_local9 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local2 = System.security;
if (_local2.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local4 = 0;
var _local5 = 0;
if (typeof(options.res) != "undefined") {
var _local6 = options.res.split("x");
_local4 = _global.parseFloat(_local6[0]);
_local5 = _global.parseFloat(_local6[1]);
} else {
_local4 = _local3.xMax - _local3.xMin;
_local5 = _local3.yMax - _local3.yMin;
}
if ((_local4 == 0) || (_local5 == 0)) {
_local4 = Stage.width;
_local5 = Stage.height;
}
return([_local4, _local5]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var k in defaults) {
_local4[k] = defaults[k];
}
if (options) {
for (var k in options) {
_local4[k] = options[k];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local6 = 0;
for ( ; _local6 < _local5.length ; _local6++) {
var _local7 = _local5[_local6].split("=");
_local4[_global.unescape(_local7[0])] = _global.unescape(_local7[1]);
}
}
return(_local4);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20501 MovieClip [__Packages.WTF] Frame 0
class WTF
{
var show_nowplaying, scale_800x600, v, mc, mc2, mc_import, tf, import_swf_name, display, sc, last_track, last_artist;
function WTF (stropts) {
show_nowplaying = false;
scale_800x600 = false;
if (stropts) {
var _local5 = stropts.split(",");
var _local3 = 0;
for ( ; _local3 < _local5.length ; _local3++) {
switch (_local5[_local3]) {
case "show_nowplaying" :
show_nowplaying = true;
break;
case "scale_800x600" :
scale_800x600 = true;
}
}
}
v = [];
v.name = "WetDiamonds";
v.site = "generic";
v.number = "2.02";
v.stamp = "Apr 13 2008";
v.stamp_number = "20080413";
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("*");
mc = gfx.create_clip(_root, (16384 + 32) - 17);
mc2 = gfx.create_clip(mc, null);
mc_import = gfx.create_clip(_root, (16384 + 32) - 18);
mc.onEnterFrame = delegate(update, null);
gfx.dropshadow(mc2, 2, 45, 0, 1, 4, 4, 2, 3);
tf = gfx.create_text_html(mc2, null, 0, 0, 400, 300);
if (_root.host == "swf.wetgenes.local") {
import_swf_name = "http://swf.wetgenes.local/swf/WTF_import.swf";
} else {
import_swf_name = "http://swf.wetgenes.com/swf/WTF_import.swf";
}
display = -1;
Mouse.addListener(this);
if (show_nowplaying) {
sc = new ScrollOn(this);
sc.setup();
sc.fntsiz = 13;
sc.mc._alpha = 50;
sc.mc._y = 0;
sc.mc._x = 0;
sc.w = get_width() - 45;
}
__com_mochibot__("81a1e704", _root, 10301);
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function get_width() {
if (scale_800x600) {
return(800);
}
return(Stage.width);
}
function get_height() {
if (scale_800x600) {
return(600);
}
return(Stage.height);
}
function logindone() {
if (!donelogindone) {
if (!_root.skip_wetimport) {
if (_root.login.opt_chat) {
mc_import.loadMovie(import_swf_name);
loaded_import = true;
}
}
donelogindone = true;
} else if (!_root.skip_wetimport) {
if (_root.login.opt_chat) {
if (!loaded_import) {
mc_import.loadMovie(import_swf_name);
loaded_import = true;
}
}
}
}
function onMouseDown() {
if (display) {
ontarget = true;
}
}
function onMouseUp() {
if (display && (ontarget)) {
getURL ("http://www.WetGenes.com", "_blank");
}
ontarget = false;
}
function onRelease() {
}
function update() {
if (scale_800x600) {
_root.scalar.apply(mc);
}
var _local3 = false;
var _local4 = false;
if ((mc._xmouse > (get_width() - 32)) && ((mc._ymouse > (get_height() - 16)) && ((mc._xmouse <= get_width()) && (mc._ymouse <= get_height())))) {
_local4 = true;
}
if (pop_state || (pop_disable)) {
if (_local4) {
if (!pop_disable) {
_local3 = true;
}
} else {
pop_disable = false;
}
} else if (_local4) {
if (_root.poker.poke_now) {
pop_disable = true;
} else {
_local3 = true;
}
}
if (pop_delay > 0) {
pop_delay--;
}
if (!_local3) {
pop_delay = 10;
}
if (pop_delay == 0) {
pop_state = true;
} else {
pop_state = false;
}
if (pop_state != display) {
display = pop_state;
if (display) {
var _local2 = "";
_local2 = _local2 + "<p align='right'>WetDiamonds 2.02 (c) Kriss+Shi Daniels Apr 13 2008</p>";
_local2 = _local2 + "<p align='right'>Distributed under the CC Attribution-NoDerivs 2.5 Licence.</p>";
_local2 = _local2 + "<p align='right'>http://creativecommons.org/licenses/by-nd/2.5/</p>";
_local2 = _local2 + "<p align='right'>Click the mouse button right now to visit</p>";
_local2 = _local2 + "<p align='right'>www.WetGenes.com for more of everything.</p>";
gfx.set_text_html(tf, 13, 16777215, _local2);
} else {
var _local2 = "";
_local2 = _local2 + "<p align='right'>YAY</p>";
gfx.set_text_html(tf, 13, 16777215, _local2);
}
}
if (display) {
tf._x = (get_width() - 400) - 24;
tf._y = (get_height() - 100) - 4;
mc2._alpha = 100;
} else {
tf._x = (get_width() - 400) - 2;
tf._y = (get_height() - 15) - 4;
mc2._alpha = 25;
}
if (show_nowplaying) {
var _local5 = _root.wetplay.wetplayMP3.disp_title;
var _local6 = _root.wetplay.wetplayMP3.disp_creator;
var _local7 = _root.wetplay.wetplayMP3.disp_info;
sc.w = get_width() - 45;
if ((_local5 != "") && ((_local6 != "") && ((_local5 != last_track) || (_local6 != last_artist)))) {
var _local2 = ((("Now Playing <b>" + _local5) + "</b> by <b>") + _local6) + "</b>. Click here to know more.";
sc.next = {url:_local7, txt:_local2, target:"_blank"};
last_track = _local5;
last_artist = _local6;
}
sc.update();
}
}
function __com_mochibot__(swfid, mc, lv) {
var _local12 = "__mochibot__";
var _local13 = "mochibot.com";
var _local6 = (_global ? (_global) : (_level0._root));
if (_local6[_local12 + swfid]) {
return(_local6[_local12 + swfid]);
}
var _local7 = System.security;
var _local5 = mc._root.getSWFVersion;
var _local8 = (_local5 ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!_local7) {
_local7 = {};
}
var _local9 = _local7.sandboxType;
if (_local9 == "localWithFile") {
return(null);
}
_local5 = _local7.allowDomain;
if (_local5) {
_local7.allowDomain(_local13);
}
_local5 = _local7.allowInsecureDomain;
if (_local5) {
_local7.allowInsecureDomain(_local13);
}
var _local10 = ((((((((((("http://" + _local13) + "/my/core.swf?mv=5&fv=") + _local8) + "&v=") + _global.escape(getVersion())) + "&swfid=") + _global.escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (_local9 ? ("&sb=" + _local9) : "");
lv = ((_local8 > 6) ? (mc.getNextHighestDepth()) : ((_local6[_local12 + "level"] ? (_local6[_local12 + "level"] + 1) : (lv))));
_local6[_local12 + "level"] = lv;
var _local11 = mc.createEmptyMovieClip(_local12 + swfid, lv);
_local11.loadMovie(_local10);
return(_local11);
}
//ASSetPropFlags(_local1, null, 1);
var corner = "BR";
var ontarget = false;
var donelogindone = false;
var loaded_import = false;
var pop_state = false;
var pop_disable = false;
var pop_delay = 0;
}
Symbol 20502 MovieClip [__Packages.com.dynamicflash.utils.Delegate] Frame 0
class com.dynamicflash.utils.Delegate
{
function Delegate () {
}
static function create(target, handler) {
var _local4 = arguments.slice(2);
var _local5 = function () {
var _local2 = arguments.callee;
var _local3 = arguments.concat(_local2.extraArgs, [_local2]);
return(_local2.handler.apply(_local2.target, _local3));
};
_local5.extraArgs = _local4;
_local5.handler = handler;
_local5.target = target;
return(_local5);
}
}
Symbol 20503 MovieClip [__Packages.GizmoButt] Frame 0
class GizmoButt
{
var up, mc, gizmos, active, focus, focus_data, top, x, y, w, h, mc_base, mc_over, mc_down, onClick;
function GizmoButt (_up) {
up = _up;
setup();
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function setup() {
setup_base();
}
function clean() {
clean_base();
}
function update() {
update_base();
}
function input(snapshot) {
if (top.focus == this) {
var _local3 = dupe_snapshot(snapshot);
mc.localToGlobal(_local3);
up.mc.globalToLocal(_local3);
if ((snapshot.x > 0) && ((snapshot.y > 0) && ((snapshot.x < w) && (snapshot.y < h)))) {
if (snapshot.key_off & 1) {
top.focus = null;
mc_base._visible = true;
mc_over._visible = false;
mc_down._visible = false;
onClick(this);
return(top.focus);
}
mc_base._visible = false;
mc_over._visible = false;
mc_down._visible = true;
} else {
mc_base._visible = true;
mc_over._visible = false;
mc_down._visible = false;
if (snapshot.key_off & 1) {
top.focus = null;
return(top.focus);
}
}
update();
} else if ((top.focus == null) && ((snapshot.x > 0) && ((snapshot.y > 0) && ((snapshot.x < w) && (snapshot.y < h))))) {
if (snapshot.key_on & 1) {
top.focus = this;
mc_base._visible = false;
mc_over._visible = false;
mc_down._visible = true;
return(top.focus);
}
mc_base._visible = false;
mc_over._visible = true;
mc_down._visible = false;
} else {
mc_base._visible = true;
mc_over._visible = false;
mc_down._visible = false;
}
input_base(snapshot);
return(top.focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20504 MovieClip [__Packages.PlayLobby] Frame 0
class PlayLobby
{
var up, opts, gamebasename, gameversion, gamename, mc, gamedata, players, styles, xups, tfs, mcs, butts, done, steady, mc_base, mc_pbem, state, rooms_str, users_str, update_do, users, gizmo_Tlist, styles_str, pbem_str, lastmsg, rooms, owners, gizmo, gizmoT, gizmoM, gizmoB, gizmo_Tscroll, gizmo_Tscroll_knob, gizmo_Titems;
function PlayLobby (_up, _opts) {
up = _up;
opts = _opts;
gamebasename = opts.name;
gameversion = opts.version;
gamename = (gamebasename + ".") + gameversion;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup() {
if (opts.style == "popup") {
if (_root.popup) {
return(undefined);
}
_root.popup = this;
mc = gfx.create_clip(_root.mc_popup, null);
} else {
mc = gfx.create_clip(up.mc, null);
}
_root.lobby = this;
username = _root.Login_Name;
gamedata = null;
players = new Array();
styles = new Array();
xups = new Array();
tfs = new Array();
mcs = new Array();
butts = new Array();
done = false;
steady = false;
mc.cacheAsBitmap = true;
mc._x = -800;
mc._y = 0;
mc.dx = 0;
gfx.clear(mc);
mc.style.out = -16777216;
mc.style.fill = 1073741824 /* 0x40000000 */;
gfx.draw_box(mc, 0, 100 + 16, 0 + 16, 600 - 32, 600 - 32);
mc_base = gfx.create_clip(mc, null);
mc_pbem = gfx.create_clip(mc, null);
mcs[0] = gfx.create_clip(mc, null);
mcs[0].tf = gfx.create_text_html(mcs[0], null, 150, 50, 500, 150);
state = "rooms";
new_butt("close", "<p align='center'><b>Close</b></p>", (150 + 500) - 120, 40 + (40 * 2), 120, 20);
new_butt("rooms", "<p align='center'><b>Join</b></p>", (150 + 500) - 120, 40 + (40 * 3), 120, 20);
new_butt("host", "<p align='center'><b>Host</b></p>", (150 + 500) - 120, 40 + (40 * 4), 120, 20);
new_butt("styles", "<p align='center'><b>Styles</b></p>", (150 + 500) - 120, 40 + (40 * 5), 120, 20);
new_butt("users", "<p align='center'><b>Players</b></p>", (150 + 500) - 120, 40 + (40 * 6), 120, 20);
new_butt("pickme", "<p align='center'><b>PickMe!</b></p>", (150 + 500) - 120, 40 + (40 * 7), 120, 20);
new_butt("start", "<p align='center'><b>Start!</b></p>", (150 + 500) - 120, 40 + (40 * 8), 120, 20);
new_butt("cancel", "<p align='center'><b>Cancel!</b></p>", (150 + 500) - 120, 40 + (40 * 9), 120, 20);
new_butt("watch", "<p align='center'><b>Watch!</b></p>", (150 + 500) - 120, 40 + (40 * 10), 120, 20);
new_butt("rejoin", "<p align='center'><b>ReJoin!</b></p>", (150 + 500) - 120, 40 + (40 * 10), 120, 20);
new_butt("pbem", "<p align='center'><b>PBeM!</b></p>", (150 + 500) - 120, 40 + (40 * 11), 120, 20);
setup_gizmos();
rooms_str = "<p>Connecting to server. If this text is not replaced shortly then network mode is broken and your only option is to click on the close button.</p>";
users_str = rooms_str;
thunk();
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
_root.poker.clear_clicks();
tfs[0] = gfx.create_text_edit(mc_pbem, null, 150, 200, 500, 40);
tfs[1] = gfx.create_text_edit(mc_pbem, null, 150, 300, 500, 40);
var _local6 = 8;
gfx.clear(mc_pbem);
draw_boxen(mc_pbem, 150 - _local6, 200 - _local6, (500 + _local6) + _local6, (40 + _local6) + _local6);
draw_boxen(mc_pbem, 150 - _local6, 300 - _local6, (500 + _local6) + _local6, (40 + _local6) + _local6);
tfs[0].setNewTextFormat(gfx.create_text_format(32, -1));
tfs[1].setNewTextFormat(gfx.create_text_format(32, -1));
tfs[0].text = "your@email";
tfs[1].text = "their@email";
new_butt("ok", "<p align='center'><b>OK</b></p>", 150, 40 + (40 * 12), 120, 20, mc_pbem);
new_butt("cancel", "<p align='center'><b>Cancel</b></p>", (150 + 500) - 120, 40 + (40 * 12), 120, 20, mc_pbem);
if (opts.multi == "arena") {
butt_press("rooms");
} else if (_root.pbem_id) {
butt_press("pbem_start");
} else {
butt_press("styles");
butt_press("rooms");
}
}
function exit() {
if (opts.style == "popup") {
clean();
} else {
up.state_next = opts.state_next;
}
}
function clean() {
if (opts.style == "popup") {
if (_root.popup != this) {
return(undefined);
}
_root.popup = null;
}
_root.lobby = null;
if (opts.multi == "arena") {
prepgame();
} else {
gmsgsend({gcmd:"set", gnam:gamename, gvar:"status", gset:"idle"});
}
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
mc.removeMovieClip();
_root.poker.clear_clicks();
_root.poker.ShowFloat(null, 0);
}
function prepgame() {
gamedata = new Object();
gamedata.gamename = gamename;
gamedata.player_idx = 0;
var _local2 = 0;
for ( ; _local2 < players.length ; _local2++) {
if (players[_local2][0] == username) {
gamedata.player_idx = _local2 + 1;
}
}
gamedata.xup = [];
_local2 = 1;
for ( ; _local2 < 10 ; _local2++) {
if (styles[_local2 + "up"]) {
gamedata.xup[_local2] = [];
var _local4 = Clown.pak_to_str(styles[_local2 + "up"]);
var _local5 = _local4.split("&");
for (var _local3 in _local5) {
var _local6 = _local5[_local3].split("=");
if ((_local6[0] != "") && (_local6[1])) {
gamedata.xup[_local2][_local6[0]] = _local6[1];
}
}
}
}
gamedata.styles = styles;
styles = null;
gamedata.players = new Array();
_local2 = 0;
for ( ; _local2 < players.length ; _local2++) {
gamedata.players[_local2] = {name:players[_local2][0]};
}
players = null;
users = null;
gamedata.players_numof = players_max;
exit();
if (opts.state_next) {
up.state_next = opts.state_next;
} else {
up.state_next = "play";
}
}
function watchgame() {
prepgame();
}
function startgame() {
var _local3 = false;
if (userauth == "owner") {
gmsgsend({gcmd:"start", gnam:gamename, gtyp:"go"});
}
var _local2 = 0;
for ( ; _local2 < players.length ; _local2++) {
if (players[_local2][0] == username) {
_local3 = true;
}
}
if (!_local3) {
state = "users";
thunk();
return(undefined);
}
prepgame();
}
function thunk_users() {
var _local7 = false;
var _local8 = false;
var _local2 = "";
_local2 = _local2 + (((gamename + " : ") + styles.state) + "<br><br>");
_local2 = _local2 + "<a href=\"asfunction:_root.lobby.lineclick,user/0\">";
var _local3 = 0;
for ( ; _local3 < players_max ; _local3++) {
var _local5 = "";
var _local6 = "";
if (players[_local3][0]) {
_local5 = players[_local3][0];
_local6 = players[_local3][1];
}
_local2 = _local2 + (((((("<b>" + (_local3 + 1)) + "UP : </b>") + _local5) + " : ") + _local6) + "<br>");
if (_local5 == username) {
_local7 = true;
}
if (_local5 == "me") {
_local8 = true;
}
}
_local2 = _local2 + "</a><br>";
_local3 = 1;
for ( ; _local3 < users.length ; _local3++) {
var _local4 = users[_local3];
_local2 = _local2 + (("<a href=\"asfunction:_root.lobby.lineclick,user/" + _local3) + "\">");
_local2 = _local2 + (((("<b>" + _local4[0]) + "</b> : ") + _local4[1]) + "</a><br>");
}
if (users_str == "") {
gizmo_Tlist.str = _local2;
} else {
gizmo_Tlist.str = users_str;
}
if (userauth == "owner") {
if ((players.length == players_max) && ((state != "start") && (!_local8))) {
butts.start._visible = true;
}
_local2 = "";
_local2 = _local2 + "<p><b>Please select which players will play in the next game.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 13434828, _local2);
} else {
if (state == "users") {
_local3 = 1;
for ( ; _local3 < users.length ; _local3++) {
if (users[_local3][0] == username) {
if (users[_local3][1] != "pickme") {
butts.pickme._visible = true;
}
}
}
}
if (state == "start") {
_local2 = "";
_local2 = _local2 + "<p><b>You have been choosen. Click start if you want to play, cancel if you do not.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 13434828, _local2);
} else {
_local2 = "";
_local2 = _local2 + "<p><b>Please wait while the host decides who will play in the next game.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 16764108, _local2);
}
}
if (styles.state == "playing") {
if (_local7) {
_local2 = "";
_local2 = _local2 + "<p><b>You are in the midle of playing this game and should rejoin.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 13434828, _local2);
butts.rejoin._visible = true;
butts.start._visible = false;
} else {
_local2 = "";
_local2 = _local2 + "<p><b>A game is in progress, why not watch them play?.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 13434828, _local2);
butts.watch._visible = true;
butts.start._visible = false;
}
}
}
function thunk() {
butts.rooms._visible = false;
butts.host._visible = false;
butts.styles._visible = false;
butts.users._visible = false;
butts.pickme._visible = false;
butts.start._visible = false;
butts.cancel._visible = false;
butts.watch._visible = false;
butts.rejoin._visible = false;
butts.pbem._visible = false;
mc_base._visible = true;
mc_pbem._visible = false;
if (styles.ups) {
if (styles.ups == "-") {
players = new Array();
} else {
players = styles.ups.split(";");
var _local3 = 0;
for ( ; _local3 < players.length ; _local3++) {
players[_local3] = players[_local3].split("/");
}
}
}
switch (state) {
case "start" :
var _local3 = 0;
for ( ; _local3 < players.length ; _local3++) {
if (players[_local3][0] == username) {
if (players[_local3][1] != "ready") {
butts.start._visible = true;
}
}
}
butts.cancel._visible = true;
var _local7 = 0;
_local3 = 0;
for ( ; _local3 < players.length ; _local3++) {
if (players[_local3][1] == "cancel") {
state = "users";
players = new Array();
gmsgsend({gcmd:"set", gnam:gamename, gvar:"status", gset:"idle"});
thunk();
return(undefined);
}
if (players[_local3][1] == "ready") {
_local7++;
}
}
if (_local7 == players_max) {
butt_press("styles");
state = "starting";
thunk();
return(undefined);
}
thunk_users();
butts.cancel._visible = true;
break;
case "rooms" :
butts.rooms._visible = true;
butts.host._visible = true;
butts.users._visible = true;
butts.styles._visible = true;
butts.pbem._visible = true;
var _local2 = "";
_local2 = _local2 + "<p><b>Please select an active gameroom to join or choose to host your own.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 13434828, _local2);
gizmo_Tlist.str = rooms_str;
break;
case "users" :
butts.rooms._visible = true;
butts.host._visible = true;
butts.users._visible = true;
butts.styles._visible = true;
thunk_users();
break;
case "styles" :
butts.rooms._visible = true;
butts.host._visible = true;
butts.users._visible = true;
butts.styles._visible = true;
_local2 = "";
_local2 = _local2 + "<p><b>Behold the style settings of the current game in the current gameroom.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 16777215, _local2);
_local2 = "";
for (_local3 in styles) {
if (styles[_local3]) {
_local2 = _local2 + (("<a href=\"asfunction:_root.lobby.lineclick,style/" + _local3) + "\">");
_local2 = _local2 + (((("<b>" + _local3) + "</b> : ") + styles[_local3]) + "</a><br>");
}
}
if (styles_str == "") {
gizmo_Tlist.str = _local2;
} else {
gizmo_Tlist.str = styles_str;
}
break;
case "starting" :
_local2 = "";
_local2 = _local2 + "<p><b>Starting Game.</b></p>";
gfx.set_text_html(mcs[0].tf, 22, 16777215, _local2);
gizmo_Tlist.str = "";
break;
case "pbem" :
mc_base._visible = false;
mc_pbem._visible = true;
butts.ok._visible = true;
butts.cancel._visible = true;
_local2 = "";
_local2 = _local2 + "<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(mcs[0].tf, 22, 16777215, _local2);
break;
case "pbem_start" :
_local2 = "";
_local2 = _local2 + "<p>Preparing the PBEM game for play, click START when the button becomes visible.</p>";
gfx.set_text_html(mcs[0].tf, 22, 16777215, _local2);
if (pbem_str == "OK") {
butts.start._visible = true;
gizmo_Tlist.str = "Game hosting initiated. Press START to continue.";
} else {
gizmo_Tlist.str = pbem_str;
}
}
if (opts.multi == "arena") {
butts.close._visible = false;
butts.styles._visible = false;
butts.users._visible = false;
butts.pickme._visible = false;
butts.start._visible = false;
butts.watch._visible = false;
butts.rejoin._visible = false;
butts.pbem._visible = false;
}
}
function butt_over(s) {
if (_root.lobby != this) {
return(undefined);
}
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);
}
}
function butt_out(s) {
if (_root.lobby != this) {
return(undefined);
}
_root.poker.ShowFloat(null, 0);
}
function butt_press(s) {
if (_root.lobby != this) {
return(undefined);
}
switch (s) {
case "close" :
if (steady) {
up.do_str("lobby_close");
done = true;
mc.dx = _root.scalar.ox;
}
break;
case "ok" :
if (tfs[0].text == "your@email") {
gmsgsend({gcmd:"rooms", gnam:gamename});
} else {
gmsgsend({gcmd:"rooms", gnam:gamename});
_root.comms.send_pbemstart(gamebasename, tfs[0].text, tfs[1].text);
done = true;
mc.dx = _root.scalar.ox;
}
break;
case "cancel" :
case "rooms" :
gmsgsend({gcmd:"rooms", gnam:gamename});
break;
case "host" :
if (opts.multi == "arena") {
gmsgsend({gcmd:"host", gnam:gamename, gvar:"multi", gset:"arena"});
} else {
gmsgsend({gcmd:"host", gnam:gamename, gvar:"multi", gset:"ws"});
gmsgsend({gcmd:"style", gnam:gamename, gvar:"seed", gset:Math.floor(65536 * Math.random()) & 65535});
}
break;
case "styles" :
gmsgsend({gcmd:"styles", gnam:gamename});
break;
case "users" :
gmsgsend({gcmd:"users", gnam:gamename});
break;
case "pickme" :
gmsgsend({gcmd:"set", gnam:gamename, gvar:"status", gset:"pickme"});
break;
case "start" :
if (state == "pbem_start") {
xups.imgurl = _global.escape(_root.Login_Img);
check_send_xup();
butt_press("styles");
state = "starting";
} else if (userauth == "owner") {
if (players.length == players_max) {
if (state != "start") {
var _local3 = "";
var _local4 = 0;
for ( ; _local4 < players.length ; _local4++) {
if (_local3 != "") {
_local3 = _local3 + ";";
}
_local3 = _local3 + (players[_local4][0] + "/idle");
}
gmsgsend({gcmd:"start", gnam:gamename, garg:_local3, gtyp:"ready"});
xups.imgurl = _global.escape(_root.Login_Img);
check_send_xup();
gmsgsend({gcmd:"set", gnam:gamename, gvar:"status", gset:"ready"});
state = "start";
}
}
} else if (state == "start") {
xups.imgurl = _global.escape(_root.Login_Img);
check_send_xup();
gmsgsend({gcmd:"set", gnam:gamename, gvar:"status", gset:"ready"});
}
thunk();
break;
case "cancel" :
if (state == "start") {
gmsgsend({gcmd:"set", gnam:gamename, gvar:"status", gset:"cancel"});
}
break;
case "rejoin" :
case "watch" :
watchgame();
break;
case "pbem" :
state = "pbem";
thunk();
break;
case "pbem_start" :
pbem_str = "Connecting.";
gmsgsend({gcmd:"pbem_start", gnam:gamename, gpid:Math.floor(_root.pbem_id), gphash0:_global.escape(_root.pbem_hash0), gphash1:_global.escape(_root.pbem_hash1)});
state = "pbem_start";
thunk();
}
}
function gmsgsend(msg) {
if (_root.sock.connected) {
if (_root.skip_wetlogin && (!done_simple_login)) {
if (_root.name) {
_root.sock.chat("/login " + _root.name);
done_simple_login = true;
}
}
_root.sock.gmsg(msg, delegate(gmsgback, msg));
lastmsg = msg;
_root.sock.gmsg(null, delegate(gmsgback, null));
}
}
function gmsgback(msg, sentmsg) {
if (_root.lobby != this) {
return(undefined);
}
if (!sentmsg) {
switch (msg.gcmd) {
case "start" :
players = msg.garg.split(";");
var _local7 = 0;
for ( ; _local7 < players.length ; _local7++) {
players[_local7] = players[_local7].split("/");
}
dbg.print(msg.garg);
state = "start";
thunk();
break;
case "set" :
if (msg.gvar == "status") {
_local7 = 0;
for ( ; _local7 < players.length ; _local7++) {
var _local8 = players[_local7];
if (_local8[0] == msg.guser) {
_local8[1] = msg.gset;
break;
}
}
_local7 = 1;
for ( ; _local7 < users.length ; _local7++) {
var _local8 = users[_local7];
if (_local8[0] == msg.guser) {
_local8[1] = msg.gset;
break;
}
}
if (_local7 == users.length) {
users[_local7] = new Array();
users[_local7][0] = msg.guser;
users[_local7][1] = msg.gset;
users[msg.guser] = users[_local7];
users[_local7].name = msg.guser;
users[_local7].state = msg.gset;
}
check_send_ups();
thunk();
}
break;
case "style" :
styles[msg.gvar] = msg.gset;
thunk();
break;
}
} else {
switch (sentmsg.gcmd) {
case "rooms" :
var _local6 = msg.gret.split(",");
if (_local6[0] == "OK") {
rooms = new Array();
var _local5 = "";
_local5 = _local5 + (((gamename + " : ") + "searching") + "<br><br>");
var _local7 = 1;
for ( ; _local7 < _local6.length ; _local7++) {
var _local8 = _local6[_local7].split(":");
rooms[_local7] = _local8;
_local5 = _local5 + (("<a href=\"asfunction:_root.lobby.lineclick,room/" + _local7) + "\">");
_local5 = _local5 + (((((("<b>" + _local8[0]) + "</b> : ") + _local8[1]) + " : ") + _local8[3]) + "</a><br>");
}
rooms_str = _local5;
} else {
rooms_str = msg.gret;
}
state = "rooms";
thunk();
break;
case "styles" :
_local6 = msg.gret.split(",");
if (_local6[0] == "OK") {
styles = new Array();
var _local7 = 1;
for ( ; _local7 < _local6.length ; _local7++) {
var _local8 = _local6[_local7].split(":");
styles[_local8[0]] = _local8[1];
}
styles_str = "";
} else {
styles_str = msg.gret;
}
if (state == "starting") {
startgame();
} else {
state = "styles";
thunk();
}
if (opts.multi == "arena") {
exit();
}
break;
case "users" :
_local6 = msg.gret.split(",");
if (_local6[0] == "OK") {
users = new Array();
var _local7 = 1;
for ( ; _local7 < _local6.length ; _local7++) {
var _local8 = _local6[_local7].split(":");
_local8.name = _local8[0];
_local8.status = _local8[1];
users[_local7] = _local8;
users[_local8.name] = _local8;
}
_local6 = msg.gret2.split(",");
owners = new Array();
username = "me";
userauth = "user";
_local7 = 0;
for ( ; _local7 < _local6.length ; _local7++) {
owners[_local7] = _local6[_local7];
if (_local7 > 0) {
if (_local6[_local7] == _local6[0].toLowerCase()) {
userauth = "owner";
}
} else {
username = _local6[0];
}
}
users_str = "";
} else {
users_str = msg.gret;
}
if (state != "pbem_start") {
players = new Array();
state = "users";
}
thunk();
break;
case "host" :
_local6 = msg.gret.split(",");
if (_local6[0] == "OK") {
if (opts.multi == "arena") {
gizmo_Tlist.str = "Game arena hosting initiated.";
butt_press("styles");
} else {
gizmo_Tlist.str = "Game hosting initiated. Fetching list of users in room.";
butt_press("styles");
butt_press("users");
}
} else {
gizmo_Tlist.str = msg.gret;
}
break;
case "pbem_start" :
_local6 = msg.gret.split(",");
if (_local6[0] == "OK") {
pbem_str = "OK";
} else {
pbem_str = msg.gret;
}
thunk();
break;
case "set" :
case "start" :
break;
}
}
}
function lineclick(str) {
if (_root.lobby != this) {
return(undefined);
}
var _local3 = str.split("/");
switch (_local3[0]) {
case "room" :
_root.sock.chat("/join " + rooms[Math.floor(_local3[1])][0]);
butt_press("styles");
butt_press("users");
break;
case "user" :
if ((userauth == "owner") && (state != "start")) {
var _local5 = Math.floor(_local3[1]);
if (_local5 == 0) {
players = new Array();
} else if (users[_local5]) {
var _local4 = 0;
// unexpected jump
do {
_local4++;
if (_local4 >= players.length) {
break;
}
} while (players[_local4][0] != users[_local5][0]);
if (_local4 == players.length) {
if (players.length == players_max) {
players = new Array();
}
players[players.length] = [users[_local5][0], "idle"];
}
}
check_send_ups();
}
thunk();
}
}
function check_send_ups() {
var _local3 = "";
var _local2 = 0;
for ( ; _local2 < players.length ; _local2++) {
if (_local3 != "") {
_local3 = _local3 + ";";
}
_local3 = _local3 + ((players[_local2][0] + "/") + players[_local2][1]);
}
if (_local3 == "") {
_local3 = "-";
}
if ((styles.ups != _local3) && (userauth == "owner")) {
gmsgsend({gcmd:"style", gnam:gamename, gvar:"ups", gset:_local3});
styles.ups = _local3;
}
}
function check_send_xup() {
var _local2 = null;
var _local3 = 0;
for ( ; _local3 < players.length ; _local3++) {
if (username == players[_local3][0]) {
_local2 = (_local3 + 1) + "up";
break;
}
}
if (!_local2) {
return(undefined);
}
var _local4 = "";
for (_local3 in xups) {
_local4 = _local4 + ((("&" + _local3) + "=") + xups[_local3]);
}
_local4 = Clown.str_to_pak(_local4);
if (styles[_local2] != _local4) {
gmsgsend({gcmd:"style", gnam:gamename, gvar:_local2, gset:_local4});
styles[_local2] = _local4;
}
}
function onRelease() {
if (_root.lobby != this) {
return(undefined);
}
if (steady) {
done = true;
mc.dx = _root.scalar.ox;
}
}
function update() {
if ((_root.lobby != this) || (_root.pause)) {
return(undefined);
}
update_gizmos(_root.poker.snapshot());
for (var _local2 in butts) {
var _local3 = butts[_local2];
if (_local3._alpha != _local3._alpha_dest) {
if (_local3._alpha_dest > _local3._alpha) {
_local3._alpha = _local3._alpha + 1;
} else if (_local3._alpha_dest < _local3._alpha) {
_local3._alpha = _local3._alpha - 1;
}
}
}
mc._x = mc._x + ((mc.dx - mc._x) / 4);
if (((mc._x - mc.dx) * (mc._x - mc.dx)) < (16 * 16)) {
steady = true;
if (done) {
exit();
}
} else {
steady = false;
}
}
function new_butt(id, s, x, y, w, h, mcu) {
if (mcu) {
var _local9 = gfx.create_clip(mcu, null);
} else {
var _local9 = gfx.create_clip(mc_base, null);
}
_local9._x = x;
_local9._y = y;
set_butt(_local9, id);
_local9.tf = gfx.create_text_html(_local9, null, 0, 0, w, h + 4);
gfx.clear(_local9);
_local9.style.fill = -2147483648;
_local9.style.out = -2147483648;
gfx.draw_box(_local9, 3, -4, -4, w + 8, h + 8);
gfx.set_text_html(_local9.tf, 16, 16777215, s);
_local9._alpha_dest = 60;
_local9._alpha = _local9._alpha_dest;
butts[id] = _local9;
_local9.cacheAsBitmap = true;
return(_local9);
}
function set_butt(b, id) {
b.onRollOver = delegate(butt_over, id);
b.onRollOut = delegate(butt_out, id);
b.onReleaseOutside = delegate(butt_out, id);
b.onRelease = delegate(butt_press, id);
}
function update_gizmos(snapshot) {
gizmo.mc.globalToLocal(snapshot);
gizmo.focus = gizmo.input(snapshot);
gizmo.update();
}
function setup_gizmos() {
var _local9 = [23, 4, 8];
var _local3 = 360;
var _local4 = 400;
var _local5 = 20;
gizmo = new GizmoMaster({mc:mc_base});
gizmo.top = gizmo;
var _local6 = gizmo;
_local6.set_area(150, 100, _local3, _local4);
var _local10 = 0;
var _local8 = gizmo;
_local6 = _local8.child(new Gizmo(_local8));
_local6.set_area(0, _local10 * _local5, _local3, _local9[0] * _local5);
gizmoT = _local6;
_local10 = _local10 + _local9[0];
_local6 = _local8.child(new Gizmo(_local8));
_local6.set_area(0, _local10 * _local5, _local3, _local9[1] * _local5);
gizmoM = _local6;
_local10 = _local10 + _local9[1];
_local6 = _local8.child(new Gizmo(_local8));
_local6.set_area(0, _local10 * _local5, _local3, _local9[2] * _local5);
gizmoB = _local6;
_local8 = gizmoT;
_local6 = _local8.child(new Gizmo(_local8));
_local6.set_area(_local3 - (_local5 * 1), _local5, _local5, (_local9[0] - 1) * _local5);
_local6.mc.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
draw_boxen(_local6.mc, 0, 0, _local6.w, _local6.h);
gizmo_Tscroll = _local6;
_local8 = _local6;
_local6 = _local8.child(new GizmoKnob(_local8));
_local6.set_area(0, _local8.h - (_local5 * 4), _local5, _local5 * 4);
var _local7 = gfx.create_clip(_local6.mc, null, 0, 0, 100, 100);
_local7.style = {fill:-2147483648 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
draw_puck(_local7, 0, 0, _local5, _local5 * 4);
_local6.mc_base = _local7;
_local7 = gfx.create_clip(_local6.mc, null, 0, 0, 100, 100);
_local7.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
draw_puck(_local7, 0, 0, _local5, _local5 * 4);
_local6.mc_over = _local7;
_local7 = gfx.create_clip(_local6.mc, null, 0, 0, 100, 100);
_local7.style = {fill:-16777216 + foreground, out:-16777216 + foreground, text:-16777216 + foreground};
draw_puck(_local7, 0, 0, _local5, _local5 * 4);
_local6.mc_down = _local7;
gizmo_Tscroll_knob = _local6;
_local8 = gizmoT;
_local6 = _local8.child(new GizmoText(_local8));
_local6.set_area(0, _local5, _local3 - (_local5 * 1), (_local9[0] - 1) * _local5);
_local6.tf_fmt.size = _local5 - 2;
_local6.tf_fmt.color = -16777216 + foreground;
_local6.vgizmo = gizmo_Tscroll_knob;
gizmo_Tlist = _local6;
gizmo_Titems = [];
gizmo.update();
}
function draw_boxen(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + _local9, y + _local9);
mc.lineTo((x + w) - _local9, y + _local9);
mc.lineTo((x + w) - _local9, (y + h) - _local9);
mc.lineTo(x + _local9, (y + h) - _local9);
mc.lineTo(x + _local9, y + _local9);
mc.moveTo(x + (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), y + (_local9 * 2));
mc.lineTo((x + w) - (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), (y + h) - (_local9 * 2));
mc.lineTo(x + (_local9 * 2), y + (_local9 * 2));
mc.endFill();
}
function draw_puck(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + (_local9 * 3), y + (_local9 * 3));
mc.lineTo((x + w) - (_local9 * 3), y + (_local9 * 3));
mc.lineTo((x + w) - (_local9 * 3), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local9 * 3), (y + h) - (_local9 * 3));
mc.lineTo(x + (_local9 * 3), y + (_local9 * 3));
mc.endFill();
}
function draw_box(mc, x, y, w, h) {
var _local7 = w / 16;
var _local8 = h / 16;
var _local9 = _local7;
if (_local9 > _local8) {
_local9 = _local8;
}
mc.lineStyle(undefined);
mc.beginFill(mc.style.fill & 16777215, (((mc.style.fill >> 24) & 255) * 100) / 255);
mc.moveTo(x + (_local9 * 1), y + (_local9 * 1));
mc.lineTo((x + w) - (_local9 * 1), y + (_local9 * 1));
mc.lineTo((x + w) - (_local9 * 1), (y + h) - (_local9 * 1));
mc.lineTo(x + (_local9 * 1), (y + h) - (_local9 * 1));
mc.lineTo(x + (_local9 * 1), y + (_local9 * 1));
mc.endFill();
}
//ASSetPropFlags(_local1, null, 1);
var username = "me";
var userauth = "user";
var players_max = 2;
var done_simple_login = false;
var foreground = 16777215;
var background = 32768;
}
Symbol 20505 MovieClip [__Packages.Gizmo] Frame 0
class Gizmo
{
var up, mc, gizmos, active, focus, focus_data, top, x, y, w, h;
function Gizmo (_up) {
up = _up;
setup();
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function setup() {
setup_base();
}
function clean() {
clean_base();
}
function update() {
update_base();
}
function input(snapshot) {
focus = input_base(snapshot);
return(focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20506 MovieClip [__Packages.PlayHigh] Frame 0
class PlayHigh
{
var up, play, rank, high, last, state, filter, retry, mcs, tfs, mc, do_exit, not_do_exit, done, steady, do_mochi, mc_top, tf_top, mc_text, tf_text, mc_whore, mc_res, mc_topunder, tf_topunder, mc_topsub, update_do, tf_topsub;
function PlayHigh (_up, stropts) {
up = _up;
play = up.play;
hide_last = false;
if (stropts) {
var _local6 = stropts.split(",");
var _local4 = 0;
for ( ; _local4 < _local6.length ; _local4++) {
var _local5 = _local6[_local4].split("=");
switch (_local5[0]) {
case "hide_last" :
hide_last = true;
break;
case "results" :
results = _local5[1];
}
}
}
rank = new_reset_scores();
high = new_reset_scores();
last = new_reset_scores();
state = "high";
filter = "global";
if (up.high_state) {
state = up.high_state;
}
if (up.high_filter) {
filter = up.high_filter;
}
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function new_reset_scores() {
var _local2 = new Array();
var _local3 = 0;
for ( ; _local3 < 10 ; _local3++) {
_local2[_local3] = "0;Fetching...";
}
return(_local2);
}
function days_to_string(days) {
var _local3 = new Date();
_local3.setTime((((days * 24) * 60) * 60) * 1000);
var _local4 = alt.Sprintf.format("%04d%02d%02d", _local3.getFullYear(), _local3.getMonth() + 1, _local3.getDate());
return(_local4);
}
function setup(usestate) {
if (_root.skip_wetlogin) {
return(undefined);
}
retry = false;
if (_root.signals.ranksys == "max") {
hide_last = true;
}
if ((state != "high") && ((state != "rank") && (state != "last"))) {
state = "high";
}
if (hide_last) {
if (state == "last") {
state = "high";
}
}
if (usestate) {
state = usestate;
}
_root.popup = this;
mcs = new Array();
tfs = new Array();
mc = gfx.create_clip(_root.mc_popup, null);
mc.cacheAsBitmap = true;
gfx.dropshadow(mc, 5, 45, 0, 1, 20, 20, 2, 3);
mc._y = 0;
mc.dx = 0;
mc._x = -800;
do_exit = false;
not_do_exit = 30;
done = false;
steady = false;
do_mochi = false;
gfx.clear(mc);
mc.style.out = -16777216;
mc.style.fill = 1342177280 /* 0x50000000 */;
gfx.draw_box(mc, 0, 100 + 16, 0 + 16, 600 - 32, 600 - 32);
switch (state) {
case "results" :
mc_top = gfx.create_clip(mc, null, 100, 25);
tf_top = gfx.create_text_html(mc_top, null, 0, 0, 600, 50);
mc_top.onRelease = delegate(click, "top");
mc_text = gfx.create_clip(mc, null, 150, 100);
tf_text = gfx.create_text_html(mc_text, null, 0, 0, 500, 300);
mc_text.onRelease = delegate(click, "text");
mc_whore = gfx.create_clip(mc, null, 200, 425);
mc_whore.onRelease = delegate(click, "whore");
mc_whore.text = gfx.create_text_html(mc_whore, null, 175, 0, 250, 175);
break;
default :
mc_res = gfx.create_clip(mc, null);
var _local7 = 0;
var _local3 = 0;
for ( ; _local3 < 10 ; _local3++) {
mcs[_local3] = gfx.create_clip(mc_res, null, 0, (25 + 150) + (_local3 * 40));
mcs[_local3].onRelease = delegate(click, "score" + _local3);
mcs[_local3].onRollOver = delegate(over_on, "score" + _local3);
mcs[_local3].onRollOut = delegate(over_off, "score" + _local3);
mcs[_local3].onReleaseOutside = delegate(over_off, "score" + _local3);
tfs[_local7] = gfx.create_text_html(mcs[_local3], null, 50, 0, 200, 50);
_local7++;
tfs[_local7] = gfx.create_text_html(mcs[_local3], null, 250, 0, 150, 50);
_local7++;
tfs[_local7] = gfx.create_text_html(mcs[_local3], null, 400, 0, 550, 50);
_local7++;
}
mc_top = gfx.create_clip(mc, null, 100, 25);
tf_top = gfx.create_text_html(mc_top, null, 0, 0, 600, 50);
mc_top.onRelease = delegate(click, "top");
mc_topunder = gfx.create_clip(mc, null, 100, 75 - 10);
tf_topunder = gfx.create_text_html(mc_topunder, null, 0, 0, 600, 25);
mc_topunder.onRelease = delegate(click, "topunder");
mc_topsub = gfx.create_clip(mc, null, 100, 100);
}
var _local3 = 0;
for ( ; _local3 < icon_nams.length ; _local3++) {
var _local9 = icon_nams[_local3];
mc_topsub[_local9] = gfx.add_clip(mc_topsub, "icon_" + _local9, null, (300 - (20 * icon_nams.length)) + (_local3 * 40), 10, 200, 200);
gfx.glow(mc_topsub[_local9], 16777215, 1, 8, 8, 1, 1, false, false);
mc_topsub[_local9]._alpha = 50;
mc_topsub[_local9].id = _local9;
mc_topsub[_local9].idx = _local3;
mc_topsub[_local3] = mc_topsub[_local9];
mc_topsub[_local3].onRelease = delegate(click, _local9);
mc_topsub[_local3].onRollOver = delegate(over_on, _local9);
mc_topsub[_local3].onRollOut = delegate(over_off, _local9);
mc_topsub[_local3].onReleaseOutside = delegate(over_off, _local9);
}
if (hide_last) {
mc_topsub.last._visible = false;
}
thunk();
get_high();
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
_root.poker.clear_clicks();
}
function clean() {
if (_root.popup != this) {
return(undefined);
}
mc_whore = null;
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
mc.removeMovieClip();
_root.popup = null;
if (up.next_game_seed) {
up.do_str("restart");
}
up.high_state = state;
up.high_filter = filter;
_root.poker.clear_clicks();
}
function get_high() {
if (state == "rank") {
rank = new_reset_scores();
} else if (state == "high") {
high = new_reset_scores();
} else if (state == "last") {
last = new_reset_scores();
} else {
return(undefined);
}
high_id++;
_root.comms.get_high(state, filter, delegate(got_high, high_id));
}
function got_high(a, tid) {
if (tid == high_id) {
if (state == "rank") {
rank = a;
} else if (state == "high") {
high = a;
} else if (state == "last") {
last = a;
}
thunk();
}
}
function thunk() {
var _local2 = 0;
for ( ; _local2 < icon_nams.length ; _local2++) {
mc_topsub[_local2]._alpha = 50;
}
if ((state == "rank") || ((state == "high") || (state == "last"))) {
var _local5 = 0;
_local2 = 0;
for ( ; _local2 < 10 ; _local2++) {
if (state == "rank") {
var _local3 = rank[_local2].split(";");
} else if (state == "high") {
var _local3 = high[_local2].split(";");
} else if (state == "last") {
var _local3 = last[_local2].split(";");
}
if (_local3[1].indexOf("_") != -1) {
_local3[1] = _local3[1].split("_").join(" ");
}
var _local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"28\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"right\"><b>";
_local4 = _local4 + _local3[0];
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tfs[_local5].htmlText = _local4;
_local5++;
if (state == "last") {
_local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"8\" color=\"#ffffff\">";
_local4 = _local4 + "<br></font>";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"16\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"center\"><b>";
if (_local3[2]) {
_local4 = _local4 + days_to_string(_local3[2]);
} else {
_local4 = _local4 + "#";
}
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tfs[_local5].htmlText = _local4;
} else {
_local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"28\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"center\"><b>";
_local4 = _local4 + str_numst[_local2];
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tfs[_local5].htmlText = _local4;
}
_local5++;
_local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"28\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"left\"><b>";
_local4 = _local4 + _local3[1];
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tfs[_local5].htmlText = _local4;
_local5++;
}
var _local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"14\" color=\"#888888\">";
_local4 = _local4 + "<p align=\"center\"><b>";
switch (state) {
case "rank" :
_local4 = _local4 + "Click title above to cycle views<br>";
_local4 = _local4 + "Click here to cycle filters<br>";
_local4 = _local4 + "Click anywhere else to exit<br>";
mc_topsub.rank._alpha = 100;
break;
case "high" :
_local4 = _local4 + "Click title above to cycle views<br>";
_local4 = _local4 + "Click here to cycle filters<br>";
_local4 = _local4 + "Click anywhere else to exit<br>";
mc_topsub.day._alpha = 100;
break;
case "last" :
_local4 = _local4 + "Click title above to cycle view<br>";
_local4 = _local4 + "Click a score below to play that game<br>";
_local4 = _local4 + "Click anywhere else to exit<br>";
mc_topsub.last._alpha = 100;
break;
case "mochi" :
mc_topsub.mochi._alpha = 100;
}
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tf_topsub.htmlText = _local4;
_local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"16\" color=\"#cccccc\">";
_local4 = _local4 + "<p align=\"center\"><b>";
switch (state) {
case "rank" :
case "high" :
switch (filter) {
case "global" :
_local4 = _local4 + "no filter";
mc_topsub.guest._alpha = 100;
break;
case "registered" :
_local4 = _local4 + "showing registered users only";
mc_topsub.registered._alpha = 100;
break;
case "friends" :
_local4 = _local4 + "showing friends only";
}
break;
case "last" :
}
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tf_topunder.htmlText = _local4;
} else if (state == "mochi") {
if (!do_mochi) {
do_mochi = true;
mochi.MochiScores.showLeaderboard({res:"540x450", onClose:delegate(mochi_close)});
mc_res._visible = false;
mc_topunder._visible = false;
mc_topsub._visible = false;
_root.poker.ShowFloat(null, 0);
}
} else if (state == "results") {
switch (results) {
case "bowwow" :
var _local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"26\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"center\">";
_local4 = _local4 + (("You scored <b>" + play.score) + "</b>pts<br><br>");
_local4 = _local4 + "<b>Click here</b> or press anykey to continue.<br><br>";
_local4 = _local4 + "</p>";
_local4 = _local4 + "</font>";
tf_text.htmlText = _local4;
break;
default :
var _local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"28\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"center\">";
_local4 = _local4 + "<b>Click here</b> to return to the menu or press anykey to try again.<br><br>";
_local4 = _local4 + (("You scored <b>" + play.scores_best_new) + "</b>pts<br><br>");
if (play.scores_best_old < play.scores_best_new) {
_local4 = _local4 + (((("Congratulations, that's a whole <b>" + (play.scores_best_new - play.scores_best_old)) + "</b>pts better than ") + play.scores_best_old) + "pts.<br><br>");
} else {
_local4 = _local4 + (("Your previous best score was <b>" + play.scores_best_old) + "</b>pts<br><br>");
}
_local4 = _local4 + "</p>";
_local4 = _local4 + "</font>";
tf_text.htmlText = _local4;
}
}
var _local4 = "";
_local4 = _local4 + "<font face=\"Bitstream Vera Sans\" size=\"28\" color=\"#ffffff\">";
_local4 = _local4 + "<p align=\"center\"><b>";
switch (state) {
case "rank" :
if (_root.signals.ranksys == "max") {
_local4 = _local4 + "Highest scores in last 10 days.<br>";
} else {
_local4 = _local4 + "Rankings, last 10 days added.<br>";
}
break;
case "high" :
_local4 = _local4 + (("High scores for " + days_to_string(up.game_seed)) + ".<br>");
break;
case "last" :
_local4 = _local4 + "Your last 10 scores.<br>";
break;
case "results" :
_local4 = _local4 + "Congratulations!<br>";
break;
case "mochi" :
_local4 = _local4 + "Checking Mochi Bucket for scores.<br>";
}
_local4 = _local4 + "</b></p>";
_local4 = _local4 + "</font>";
tf_top.htmlText = _local4;
}
function mochi_close() {
do_mochi = false;
state = "high";
get_high();
thunk();
not_do_exit = 5;
mc_res._visible = true;
mc_top._visible = true;
mc_topunder._visible = true;
mc_topsub._visible = true;
}
function over_on(s) {
if (do_mochi) {
return(undefined);
}
switch (s) {
case "score0" :
showgame(0);
break;
case "score1" :
showgame(1);
break;
case "score2" :
showgame(2);
break;
case "score3" :
showgame(3);
break;
case "score4" :
showgame(4);
break;
case "score5" :
showgame(5);
break;
case "score6" :
showgame(6);
break;
case "score7" :
showgame(7);
break;
case "score8" :
showgame(8);
break;
case "score9" :
showgame(9);
break;
case "day" :
_root.poker.ShowFloat("Show scores for todays game.", 25 * 5);
highlight_icon(s, true);
break;
case "rank" :
_root.poker.ShowFloat("Show rank. This is built using scores from the last 10 days.", 25 * 5);
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);
highlight_icon(s, true);
break;
case "guest" :
_root.poker.ShowFloat("Show scores of all players.", 25 * 5);
highlight_icon(s, true);
break;
case "registered" :
_root.poker.ShowFloat("Show registered players scores only.", 25 * 5);
highlight_icon(s, true);
break;
case "mochi" :
_root.poker.ShowFloat("Display a Mochi Bucket of scores.", 25 * 5);
highlight_icon(s, true);
break;
case "close" :
_root.poker.ShowFloat("Close this plopup. Clicking almost anywhere also closes this plopup.", 25 * 5);
highlight_icon(s, true);
}
}
function highlight_icon(nam, onoff) {
if (mc_topsub[nam]._alpha < 100) {
if (onoff) {
mc_topsub[nam]._alpha = 75;
} else {
mc_topsub[nam]._alpha = 50;
}
}
}
function over_off(s) {
if (do_mochi) {
return(undefined);
}
highlight_icon(s, false);
_root.poker.ShowFloat(null, 0);
}
function click(s) {
if (do_mochi) {
return(undefined);
}
switch (s) {
case "whore" :
if (_root.wonderfulls[0].url) {
getURL (_root.wonderfulls[0].url, "_blank");
}
if (state == "results") {
if (steady) {
do_exit = true;
}
}
break;
case "text" :
if (state == "results") {
if (steady) {
do_exit = true;
}
}
break;
case "top" :
break;
case "mochi" :
if (state != "mochi") {
state = "mochi";
thunk();
}
not_do_exit = 5;
break;
case "day" :
if (state != "high") {
state = "high";
get_high();
thunk();
}
not_do_exit = 5;
break;
case "rank" :
if (state != "rank") {
state = "rank";
get_high();
thunk();
}
not_do_exit = 5;
break;
case "last" :
if (state != "last") {
state = "last";
get_high();
thunk();
}
not_do_exit = 5;
break;
case "guest" :
if (filter != "global") {
filter = "global";
get_high();
thunk();
}
not_do_exit = 5;
break;
case "registered" :
if (filter != "registered") {
filter = "registered";
get_high();
thunk();
}
not_do_exit = 5;
break;
case "topunder" :
break;
case "topsub" :
break;
case "score0" :
gotoplaygame(0);
break;
case "score1" :
gotoplaygame(1);
break;
case "score2" :
gotoplaygame(2);
break;
case "score3" :
gotoplaygame(3);
break;
case "score4" :
gotoplaygame(4);
break;
case "score5" :
gotoplaygame(5);
break;
case "score6" :
gotoplaygame(6);
break;
case "score7" :
gotoplaygame(7);
break;
case "score8" :
gotoplaygame(8);
break;
case "score9" :
gotoplaygame(9);
break;
}
}
function gotoplaygame(num) {
if (state == "last") {
var _local3 = last[num].split(";");
if (_local3[2]) {
up.next_game_seed = Math.floor(_local3[2]);
if (up.next_game_seed == up.game_seed) {
up.next_game_seed = null;
}
}
state = "high";
}
}
function showgame(num) {
if (state == "last") {
var _local3 = last[num].split(";");
if (_local3[2]) {
var _local4 = days_to_string(Math.floor(_local3[2]));
_root.poker.ShowFloat(("Clicking here will end this game and start the game for " + _local4) + " so be careful...", 25 * 5);
}
}
}
function statechange() {
switch (state) {
case "results" :
break;
case "high" :
state = "rank";
break;
case "rank" :
if (hide_last) {
state = "high";
} else {
state = "last";
}
break;
case "last" :
state = "high";
break;
default :
state = "high";
}
get_high();
thunk();
}
function filterchange() {
switch (filter) {
case "global" :
filter = "registered";
break;
case "registered" :
filter = "global";
break;
case "friends" :
filter = "global";
}
get_high();
thunk();
}
function click_str(id) {
var _local3 = id.split("_");
trace(_local3);
switch (_local3[0]) {
case "none" :
break;
case "submit" :
break;
}
}
function update() {
if (!do_mochi) {
if ((_root.popup == this) && (_root.poker.anykey)) {
if (steady) {
if (!do_exit) {
if (state == "results") {
retry = true;
}
do_exit = true;
}
}
}
}
if ((_root.popup != this) || (_root.pause)) {
return(undefined);
}
if (mc_whore) {
if (!mc_whore.ad) {
if (_root.wonderfulls) {
mc_whore.ad = gfx.create_clip(mc_whore, null);
mc_whore.ad.loadMovie(_root.wonderfulls[0].img);
var _local2 = "";
_local2 = _local2 + "<font face=\"Bitstream Vera Sans\" size=\"24\" color=\"#ffffff\">";
_local2 = _local2 + "<p align=\"center\">";
_local2 = _local2 + _root.wonderfulls[0].txt;
_local2 = _local2 + "</p>";
_local2 = _local2 + "</font>";
mc_whore.text.htmlText = _local2;
}
}
}
mc._x = mc._x + ((mc.dx - mc._x) / 4);
if (((mc._x - mc.dx) * (mc._x - mc.dx)) < (16 * 16)) {
steady = true;
if (done) {
clean();
}
} else {
steady = false;
}
if (do_exit && (not_do_exit == 0)) {
done = true;
mc.dx = _root.scalar.ox;
}
do_exit = false;
if (not_do_exit > 0) {
not_do_exit--;
}
}
//ASSetPropFlags(_local1, null, 1);
var icon_nams = ["mochi", "day", "rank", "last", "guest", "registered", "close"];
var results = "";
var str_numst = ["1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th"];
var hide_last = false;
var high_id = 0;
}
Symbol 20507 MovieClip [__Packages.PlayHUD] Frame 0
class PlayHUD
{
var up, last_artist, last_track, mc, mc_play, tf_play, points, points1, points2, chaser, butts, butt_ids, tf_rgbs, tf_pts1, mc_rgbs, mc2, mc3, mc_turn, mc4, mc5, tf_pts2, mc_choose1, mc_choose2, choosen, mc_stage, hover, last_pct;
function PlayHUD (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function days_to_string(days) {
var _local3 = new Date();
_local3.setTime((((days * 24) * 60) * 60) * 1000);
var _local4 = alt.Sprintf.format("%04d%02d%02d", _local3.getFullYear(), _local3.getMonth() + 1, _local3.getDate());
return(_local4);
}
function setup() {
last_artist = "";
last_track = "";
mc = gfx.create_clip(up.mc, null);
gfx.dropshadow(mc, 2, 45, 0, 1, 4, 4, 2, 3);
mc_play = gfx.create_clip(mc, null);
tf_play = gfx.create_text_html(mc_play, null, 800 - 200, 10, 200, 100 + 10);
set_butt(mc_play, "mp3");
points = 0;
points1 = 0;
points2 = 0;
chaser = 0;
butts = [];
butt_ids = {};
tf_rgbs = [];
if (!up.gamecomms) {
tf_pts1 = gfx.create_text_html(mc, null, 200 + 10, 20 - 20, 400 - 20, 120);
mc_rgbs = gfx.create_clip(mc, null);
tf_rgbs[0] = gfx.create_text_html(mc_rgbs, null, 200 + 75, 550 - 25, 50, 50);
tf_rgbs[1] = gfx.create_text_html(mc_rgbs, null, 250 + 75, 550 - 25, 50, 50);
tf_rgbs[2] = gfx.create_text_html(mc_rgbs, null, 300 + 75, 550 - 25, 50, 50);
tf_rgbs[3] = gfx.create_text_html(mc_rgbs, null, 350 + 75, 550 - 25, 50, 50);
tf_rgbs[4] = gfx.create_text_html(mc_rgbs, null, 400 + 75, 550 - 25, 50, 50);
butts[butts.length] = new_butt("restart", "<p align='center'><b>Restart</b></p>", 10 + 30, 120 + (40 * 0), 120, 20);
butts[butts.length] = new_butt("about", "<p align='center'><b>About</b></p>", 10 + 30, 120 + (40 * 1), 120, 20);
butts[butts.length] = new_butt("high", "<p align='center'><b>Scores</b></p>", 10 + 30, 120 + (40 * 2), 120, 20);
butts[butts.length] = new_butt("logoff", "<p align='center'><b>Log Out</b></p>", 10 + 30, 120 + (40 * 4), 120, 20);
butts[butts.length] = new_butt("gamemode", "<p align='center'><b>Game Mode</b></p>", 10 + 30, 120 - (40 * 1), 120, 20);
butts[butts.length] = new_butt("menu", "<p align='center'><b>Main Menu</b></p>", 10 + 30, (600 - 100) - (40 * 0), 120, 20);
butts[butts.length] = new_text("seed", ("<p align='center'><b>" + days_to_string(up.up.game_seed)) + "</b></p>", 24, 0, 120 - (40 * 2), 200, 20);
butts[butts.length] = new_butt("qual", "<p align='center'><b>Q.Best @ 30fps</b></p>", 10, (600 - 100) - (40 * 1), 180, 20);
butts[butts.length] = new_butt("full", "<p align='center'><b>Full screen</b></p>", 10 + 30, 120 + (40 * 3), 120, 20);
butts[butts.length] = new_text("name", ("<p align='center'><b>" + _root.Login_Name) + "</b></p>", 16, 0, (120 + (40 * 5)) - 10, 200, 20);
mc2 = gfx.create_clip(mc, null, 10 + 30, (120 + (40 * 5)) + 10, 125, 125);
set_butt(mc2, "name1");
_root.bmc.clear_loading();
_root.bmc.remember("Login_Img", bmcache.create_url, {url:_root.Login_Img, bmpw:100, bmph:100, hx:0, hy:0});
mc3 = null;
} else {
mc_turn = gfx.create_clip(mc, null);
mc_turn.tf = gfx.create_text_html(mc_turn, null, 10, 10, 180, 90);
gfx.clear(mc_turn);
mc_turn.style.fill = -2147483648;
mc_turn.style.out = -2147483648;
gfx.draw_box(mc_turn, 3, 5, 5, 190, 100);
set_butt(mc_turn, "turn");
mc_rgbs = gfx.create_clip(mc, null);
tf_rgbs[0] = gfx.create_text_html(mc_rgbs, null, 200 + 75, 50 - 25, 50, 50);
tf_rgbs[1] = gfx.create_text_html(mc_rgbs, null, 250 + 75, 50 - 25, 50, 50);
tf_rgbs[2] = gfx.create_text_html(mc_rgbs, null, 300 + 75, 50 - 25, 50, 50);
tf_rgbs[3] = gfx.create_text_html(mc_rgbs, null, 350 + 75, 50 - 25, 50, 50);
tf_rgbs[4] = gfx.create_text_html(mc_rgbs, null, 400 + 75, 50 - 25, 50, 50);
_root.bmc.clear_loading();
mc4 = gfx.create_clip(mc, null, ((10 + 30) + 600) + 62, ((125 + 120) + (40 * 5)) + 10, 125, 125);
set_butt(mc4, "name2");
_root.bmc.remember("Login_Img1", bmcache.create_url, {url:_global.unescape(up.gamecomms.xup[1].imgurl), bmpw:100, bmph:100, hx:-50, hy:-100});
mc5 = null;
mc2 = gfx.create_clip(mc, null, (10 + 30) + 62, ((125 + 120) + (40 * 5)) + 10, 125, 125);
set_butt(mc2, "name1");
_root.bmc.remember("Login_Img2", bmcache.create_url, {url:_global.unescape(up.gamecomms.xup[2].imgurl), bmpw:100, bmph:100, hx:-50, hy:-100});
mc3 = null;
butts[butts.length] = new_text("name1", ("<p align='center'><b>" + up.gamecomms.players[0].name) + "</b></p>", 16, 0, (120 + (40 * 5)) - 10, 200, 20);
butts[butts.length] = new_text("name2", ("<p align='center'><b>" + up.gamecomms.players[1].name) + "</b></p>", 16, 600, (120 + (40 * 5)) - 10, 200, 20);
butts[butts.length] = new_text("ups1", ("<p align='center'><b>1UP : " + ((up.player == 0) ? "You" : "Them")) + "</b></p>", 16, 0, ((150 + 120) + (40 * 5)) - 10, 200, 20);
butts[butts.length] = new_text("ups2", ("<p align='center'><b>2UP : " + ((up.player == 1) ? "You" : "Them")) + "</b></p>", 16, 600, ((150 + 120) + (40 * 5)) - 10, 200, 20);
if (up.player == 0) {
butts[butts.length] = new_butt("pass1", "<p align='center'><b>Pass</b></p>", 40, 120 + (40 * 4), 120, 20);
} else {
butts[butts.length] = new_butt("pass2", "<p align='center'><b>Pass</b></p>", 640, 120 + (40 * 4), 120, 20);
}
tf_pts1 = gfx.create_text_html(mc, null, 0, (120 + (40 * 3)) - 10, 200, 40);
tf_pts2 = gfx.create_text_html(mc, null, 600, (120 + (40 * 3)) - 10, 200, 40);
mc_choose1 = gfx.create_clip(mc, null, 50, (120 + (40 * 1)) - 10, 50, 50);
mc_choose2 = gfx.create_clip(mc, null, 650, (120 + (40 * 1)) - 10, 50, 50);
set_butt(mc_choose1, "choose1");
set_butt(mc_choose2, "choose2");
choosen = new Array(new FieldItem({mc:mc_choose1}), new FieldItem({mc:mc_choose1}), new FieldItem({mc:mc_choose2}), new FieldItem({mc:mc_choose2}));
choosen[0].setup("fire");
choosen[1].setup("fire");
choosen[2].setup("fire");
choosen[3].setup("fire");
choosen[0].setxy(50, 50);
choosen[1].setxy(150, 50);
choosen[2].setxy(50, 50);
choosen[3].setxy(150, 50);
choosen[0].mc._visible = false;
choosen[1].mc._visible = false;
choosen[2].mc._visible = false;
choosen[3].mc._visible = false;
mc_stage = gfx.create_clip(mc, null, 400, 50);
mc_stage.tf = gfx.create_text_html(mc_stage, null, -200, 0, 400, 50);
butt_changed("stage");
}
show_loaded();
hover = null;
butt_changed("qual");
butt_changed("full");
butt_changed("gamemode");
last_pct = -1;
}
function clean() {
choosen[0].clean();
choosen[1].clean();
choosen[2].clean();
choosen[3].clean();
Mouse.removeListener(this);
}
function show_loaded() {
if (mc3 == null) {
if (up.gamecomms) {
if (_root.bmc.isloaded("Login_Img1")) {
mc3 = _root.bmc.create(mc2, "Login_Img1", null);
}
} else if (_root.bmc.isloaded("Login_Img")) {
mc3 = _root.bmc.create(mc2, "Login_Img", null);
}
}
if (mc5 == null) {
if (_root.bmc.isloaded("Login_Img2")) {
mc5 = _root.bmc.create(mc4, "Login_Img2", null);
}
}
}
function update() {
show_loaded();
if (!up.gamecomms) {
if (up.field.state == "user") {
switch (up.gameskill) {
case "easy" :
chaser = chaser + (points / (25 * 120));
break;
case "normal" :
chaser = chaser + (points / (25 * 60));
break;
case "hard" :
chaser = chaser + (points / (25 * 30));
}
}
if (chaser > 0) {
var _local5 = Math.floor((100 * chaser) / points);
if (_local5 >= 100) {
if (points > chaser) {
_local5 = 99;
} else {
_local5 = 100;
}
}
} else {
var _local5 = 0;
}
var _local2 = ("<p align='center'>" + points) + "</p>";
if (up.gamemode == "endurance") {
if (last_pct != _local5) {
gfx.clear(mc);
if (_local5 < 50) {
mc.style.fill = -16711936 + (Math.floor((255 * _local5) / 50) << 16);
} else {
mc.style.fill = -65536 + (Math.floor((255 * (100 - _local5)) / 50) << 8);
}
gfx.draw_box(mc, 0, 200, 100 - 45, 400 - (_local5 * 4), 15);
last_pct = _local5;
}
if (_local5 == 100) {
up.won.setup();
}
}
gfx.set_text_html(tf_pts1, 48, 16777215, _local2);
} else {
var _local2 = ("<p align='center'>" + points1) + "</p>";
gfx.set_text_html(tf_pts1, 30, 16777215, _local2);
_local2 = ("<p align='center'>" + points2) + "</p>";
gfx.set_text_html(tf_pts2, 30, 16777215, _local2);
}
gfx.set_text_html(tf_rgbs[0], 20, -65536, ("<p align=\"center\">" + up.field.available_moves[0]) + "</p>");
gfx.set_text_html(tf_rgbs[1], 20, -16711936, ("<p align=\"center\">" + up.field.available_moves[1]) + "</p>");
gfx.set_text_html(tf_rgbs[2], 20, -256, ("<p align=\"center\">" + up.field.available_moves[2]) + "</p>");
gfx.set_text_html(tf_rgbs[3], 20, -16776961, ("<p align=\"center\">" + up.field.available_moves[3]) + "</p>");
gfx.set_text_html(tf_rgbs[4], 20, -1, ("<p align=\"center\">" + up.field.available_moves[4]) + "</p>");
butt_changed("qual");
var _local3 = 0;
for ( ; _local3 < butts.length ; _local3++) {
var _local4 = butts[_local3];
_local4._alpha = ((_local4._alpha + _local4._alpha) + _local4._alpha_dest) / 3;
}
var _local6 = _root.wetplay.wetplayMP3.disp_title;
var _local7 = _root.wetplay.wetplayMP3.disp_creator;
if ((_local6 != last_track) || (_local7 != last_artist)) {
var _local2 = "";
_local2 = _local2 + "<p align='center'>Now Playing<br>";
_local2 = _local2 + (("<b>" + _local6) + "</b><br>");
_local2 = _local2 + "by<br>";
_local2 = _local2 + (("<b>" + _local7) + "</b><br>");
gfx.set_text_html(tf_play, 14, -1, _local2);
last_track = _local6;
last_artist = _local7;
}
if (mc_stage._xscale > 100) {
mc_stage._xscale = Math.floor(mc_stage._xscale - ((mc_stage._xscale - 100) * 0.1));
mc_stage._yscale = mc_stage._xscale;
}
if (mc2._xscale > 125) {
mc2._xscale = Math.floor(mc2._xscale - ((mc2._xscale - 125) * 0.1));
mc2._yscale = mc2._xscale;
}
if (mc4._xscale > 125) {
mc4._xscale = Math.floor(mc4._xscale - ((mc4._xscale - 125) * 0.1));
mc4._yscale = mc4._xscale;
}
}
function goto_mp3_site() {
if (_root.popup) {
return(undefined);
}
if (_root.wetplay.wetplayMP3.disp_info != "") {
getURL (_root.wetplay.wetplayMP3.disp_info, "BOT");
}
}
function butt_over(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 (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 (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);
butt_changed(id);
break;
case "name1" :
if (!up.gamecomms) {
_root.poker.ShowFloat("Visit your homepage at www.WetGenes.com.", 25 * 10);
} else {
_root.poker.ShowFloat(("Visit " + ((up.player == 0) ? "your" : "their")) + " homepage at www.WetGenes.com.", 25 * 10);
}
break;
case "name2" :
_root.poker.ShowFloat(("Visit " + ((up.player == 1) ? "your" : "their")) + " homepage at www.WetGenes.com.", 25 * 10);
}
butt_ids[id]._alpha_dest = 100;
}
function butt_out(id) {
butt_ids[id]._alpha_dest = 75;
_root.poker.ShowFloat(null, 0);
}
function butt_up(id) {
}
function butt_press(id) {
if (_root.popup) {
return(undefined);
}
switch (id) {
case "turn" :
up.turnmenu.setup();
break;
case "pass1" :
case "pass2" :
up.next_turn("-1/-1");
break;
case "mp3" :
goto_mp3_site();
break;
case "qual" :
_root._highquality = (_root._highquality + 1) % 3;
up.field.redraw_all();
break;
case "restart" :
up.do_str(id);
break;
case "logoff" :
points = 0;
up.do_str(id);
break;
case "high" :
_root.signals.signal("diamonds", "high", up);
up.up.high.setup();
break;
case "about" :
up.up.about.setup();
break;
case "menu" :
up.up.state_next = "splash";
_root.swish = new Swish({style:"sqr_plode", mc: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 (up.gamemode) {
case "puzzle" :
up.gamemode = "endurance";
break;
case "endurance" :
up.gamemode = "puzzle";
}
up.do_str("restart");
break;
case "name" :
getURL ("http://www.wetgenes.com/user/" + _root.Login_Name, "BOT");
}
butt_changed(id);
}
function butt_changed(id) {
switch (id) {
case "stage" :
gfx.set_text_html(mc_stage.tf, 24, -1, ("<p align='center'><b>STAGE " + (up.stage + 1)) + "</b></p>");
mc_stage._xscale = 300;
mc_stage._yscale = 300;
break;
case "qual" :
var _local4 = ["Bad", "Good", "Best"];
var _local3 = ((("<p align='center'><b>Q." + _local4[_root._highquality]) + " @ ") + _root.scalar.t_fps) + "fps</b></p>";
if (butt_ids[id].s != _local3) {
butt_ids[id].s = _local3;
gfx.set_text_html(butt_ids[id].tf, 16, 16777215, _local3);
}
break;
case "full" :
if (Stage.displayState == "normal") {
_local3 = "<p align='center'><b>Full screen</b></p>";
} else {
_local3 = "<p align='center'><b>Windowed</b></p>";
}
butt_str("full", _local3);
break;
case "gamemode" :
if (up.gamemode == "puzzle") {
_local3 = "<p align='center'><b>Daily Puzzle</b></p>";
} else {
_local3 = "<p align='center'><b>Endurance</b></p>";
}
butt_str("gamemode", _local3);
}
}
function set_butt(b, id) {
b.onRollOver = delegate(butt_over, id);
b.onRollOut = delegate(butt_out, id);
b.onReleaseOutside = delegate(butt_out, id);
b.onRelease = delegate(butt_press, id);
}
function new_butt(id, s, x, y, w, h) {
var _local8 = gfx.create_clip(mc, null);
set_butt(_local8, id);
_local8._x = x;
_local8._y = y;
_local8.tf = gfx.create_text_html(_local8, null, 0, 0, w, h + 4);
gfx.clear(_local8);
_local8.style.fill = -2147483648;
_local8.style.out = -2147483648;
gfx.draw_box(_local8, 3, -4, -4, w + 8, h + 8);
gfx.set_text_html(_local8.tf, 16, 16777215, s);
_local8._alpha_dest = 75;
_local8._alpha = _local8._alpha_dest;
butt_ids[id] = _local8;
_local8.cacheAsBitmap = true;
return(_local8);
}
function new_text(id, s, fs, x, y, w, h) {
var _local9 = gfx.create_clip(mc, null);
_local9._x = x;
_local9._y = y;
_local9.tf = gfx.create_text_html(_local9, null, 0, 0, w, h + 4);
gfx.set_text_html(_local9.tf, fs, 16777215, s);
_local9._alpha_dest = 100;
_local9._alpha = _local9._alpha_dest;
butt_ids[id] = _local9;
_local9.cacheAsBitmap = true;
return(_local9);
}
function butt_str(id, s) {
gfx.set_text_html(butt_ids[id].tf, 16, 16777215, s);
}
function turn_str(s) {
gfx.set_text_html(mc_turn.tf, 18, 16777215, s);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20508 MovieClip [__Packages.PlayCode] Frame 0
class PlayCode
{
var up, mcs, tfs, mc, done, steady, update_do, mcWF, wf_loaded;
function PlayCode (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup() {
_root.popup = this;
mcs = new Array();
tfs = new Array();
mc = gfx.create_clip(_root.mc_popup, null);
mc.cacheAsBitmap = true;
gfx.dropshadow(mc, 5, 45, 0, 1, 20, 20, 2, 3);
mc._y = 0;
mc.dx = 0;
mc._x = -800;
done = false;
steady = false;
gfx.clear(mc);
mcs[0] = gfx.create_clip(mc, null);
mcs[0].onRelease = delegate(onRelease, null);
mcs[0].showHandCursor = false;
mcs[0].style.out = -16777216;
mcs[0].style.fill = 268435456 /* 0x10000000 */;
gfx.draw_box(mcs[0], 0, 0, 0, 800, 600);
mcs[0].style.out = -16777216;
mcs[0].style.fill = -2147483648;
gfx.draw_box(mcs[0], 0, 100 + 16, 0 + 16, 600 - 32, 600 - 32);
mcs[1] = gfx.create_clip(mc, null);
mcs[1].onRelease = delegate(function () {
}, null);
mcs[1].showHandCursor = false;
mcs[1].style.out = -16777216;
mcs[1].style.fill = 268435456 /* 0x10000000 */;
gfx.draw_box(mcs[1], 0, 150, 50, 500, 500);
mcs[2] = gfx.create_clip(mc, null, 150, 50, 150, 150);
thunk();
Mouse.addListener(this);
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
_root.poker.clear_clicks();
_root.poker.ShowFloat(null, 0);
System.security.allowDomain("cdn.gigya.com");
System.security.allowInsecureDomain("cdn.gigya.com");
mcWF = gfx.create_clip(mcs[2], null);
mcWF._lockroot = true;
mcWF._x = 0;
mcWF._y = 0;
mcWF.ModuleID = "PostModule1";
var _local6 = (_root[mcWF.ModuleID] = {});
_local6.width = "333";
_local6.height = "333";
_local6.partner = "200531";
_local6.UIConfig = "<config><display showEmail=\"true\" showBookmark=\"true\" showCloseButton=\"true\" bulletinChecked=\"false\" networksWithCodeBox=\"\" /></config>";
_local6.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://www.WetGenes.com\" target=\"_blank\" title=\"www.WetGenes.com\">Play more free online games at www.WetGenes.com</a></center>");
};
_local6.facebookURL = "http://link.wetgenes.com/link/WetDiamonds.fb";
var _local7 = "WetDiamonds".toLowerCase();
if (_local7 == "wetbasement") {
_local7 = "basement";
}
if (_local7 == "wetdiamonds") {
_local7 = "diamonds";
}
_local6.bookmarkURL = ("http://" + _local7) + ".wetgenes.com/";
_local6.widgetTitle = "Play WetDiamonds at www.WetGenes.com";
_local6.onPostProfile = delegate(finish);
_local6.onClose = delegate(finish);
_local6.onLoad = delegate(WFonLoad);
mcWF.loadMovie("http://cdn.gigya.com/WildFire/swf/wildfire.swf", "get");
wf_loaded = false;
}
function WFonLoad() {
wf_loaded = true;
}
function clean() {
if (_root.popup != this) {
return(undefined);
}
mcWF = null;
update_do = null;
mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
_root.poker.clear_clicks();
_root.poker.ShowFloat(null, 0);
}
function thunk() {
}
function over(s) {
}
function notover(s) {
_root.poker.ShowFloat(null, 0);
}
function click(s) {
}
function onRelease() {
if (_root.popup != this) {
return(undefined);
}
if (steady) {
done = true;
mc.dx = _root.scalar.ox;
}
}
function finish() {
done = true;
mc.dx = _root.scalar.ox;
}
function update() {
if ((_root.popup != this) || (_root.pause)) {
return(undefined);
}
mc._x = mc._x + ((mc.dx - mc._x) / 4);
if (((mc._x - mc.dx) * (mc._x - mc.dx)) < (16 * 16)) {
steady = true;
if (done) {
clean();
}
} else {
steady = false;
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20509 MovieClip [__Packages.OverItem] Frame 0
class OverItem
{
var up, mc, type, data, flags, _x, _y, vx, vy, tf;
function OverItem (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup(nam, dat) {
mc = gfx.create_clip(up.mc, null);
type = nam;
data = dat;
flags = 0;
_x = 0;
_y = 0;
vx = 0;
vy = 0;
draw();
}
function draw() {
var _local2 = 2;
switch (type) {
case null :
break;
case "score" :
tf = gfx.create_text_html(mc, null, -100, -25, 200, 50);
gfx.set_text_html(tf, 24, 16777215, ("<p align=\"center\">" + data.str) + "</p>");
}
}
function clean() {
mc.removeMovieClip();
}
function setxy(setx, sety, setvx, setvy) {
if (setvx != undefined) {
vx = setvx;
}
if (setvy != undefined) {
vy = setvy;
}
_x = setx;
_y = sety;
if (mc) {
mc._x = setx;
mc._y = sety;
}
}
function update() {
if (!(type === "score")) {
} else {
setxy(_x + vx, _y + vy);
mc._alpha = mc._alpha - 1;
if (mc._alpha <= 0) {
return(true);
}
return(false);
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20510 MovieClip [__Packages.OverField] Frame 0
class OverField
{
var up, mc_scalar, mc, over, tab_w, tab_h, types, launches, floaters, update_do;
function OverField (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function setup(nam) {
mc_scalar = gfx.create_clip(up.mc, null);
mc = gfx.create_clip(mc_scalar, null);
over = new Object();
over.up = up;
over.mc = gfx.create_clip(mc_scalar, null);
tab_w = 8;
tab_h = 8;
types = new Array("fire", "earth", "air", "water", "ether");
var _local7 = 0;
for ( ; _local7 < 5 ; _local7++) {
types[types[_local7]] = _local7;
}
launches = new Array();
floaters = new Array();
_root.poker.clear_clicks();
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
}
function clean() {
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
while (launches.length) {
launches[0].clean();
launches.splice(0, 1);
}
while (floaters.length) {
floaters[0].clean();
floaters.splice(0, 1);
}
mc.removeMovieClip();
}
function update() {
var _local2 = 0;
for ( ; _local2 < launches.length ; _local2++) {
if (launches[_local2].update_launch()) {
launches[_local2].clean();
launches.splice(_local2, 1);
_local2--;
}
}
_local2 = 0;
for ( ; _local2 < floaters.length ; _local2++) {
if (floaters[_local2].update()) {
floaters[_local2].clean();
floaters.splice(_local2, 1);
_local2--;
}
}
}
function add_floater(str, xx, yy) {
var _local5 = new OverItem(this);
_local5.setup("score", {str:str});
_local5.setxy(xx, yy);
_local5.vx = 0;
_local5.vy = -2;
_local5.mc.filters = null;
_local5.mc.cacheAsBitmap = true;
floaters.push(_local5);
return(_local5);
}
//ASSetPropFlags(_local1, null, 1);
var rnd_num = 0;
}
Symbol 20511 MovieClip [__Packages.WetPlayIcon] Frame 0
class WetPlayIcon
{
var scale_800x600, mute, wetplayMP3, mcs, mc, mc_play_icon, wetplayGFX, wall, hall, xall, yall, update_do;
function WetPlayIcon (stropts) {
scale_800x600 = false;
mute = false;
if (stropts) {
var _local4 = stropts.split(",");
var _local3 = 0;
for ( ; _local3 < _local4.length ; _local3++) {
switch (_local4[_local3]) {
case "scale_800x600" :
scale_800x600 = true;
break;
case "mute" :
mute = true;
}
}
}
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function get_width() {
if (scale_800x600) {
return(800);
}
return(Stage.width);
}
function get_height() {
if (scale_800x600) {
return(600);
}
return(Stage.height);
}
function logindone() {
if (!donelogindone) {
setup();
donelogindone = true;
}
if (mute) {
return(undefined);
}
if (_root.login.opt_sound) {
wetplayMP3.set_vol(50);
} else {
wetplayMP3.set_vol(0);
}
}
function setup() {
mcs = gfx.create_clip(_root, (16384 + 32) - 16);
mc = gfx.create_clip(mcs);
mc_play_icon = gfx.add_clip(mc, "WetPlayIcon", null, get_width() - 11, 11);
wetplayGFX = new WetPlayGFX(this);
wetplayMP3 = new WetPlayMP3(this);
wall = wetplayMP3.w + (wetplayMP3.x * 2);
hall = wetplayMP3.h + (wetplayMP3.y * 2);
xall = wetplayMP3.x * 2;
yall = wetplayMP3.y * 2;
wetplayMP3.setup();
wetplayMP3.mc.dx = get_width() + xall;
wetplayMP3.mc.dy = -hall;
wetplayMP3.mc._x = wetplayMP3.mc.dx;
wetplayMP3.mc._y = wetplayMP3.mc.dy;
wetplayMP3.mc.ox = wetplayMP3.mc._x;
wetplayMP3.mc.oy = wetplayMP3.mc._y;
wetplayMP3.mc.idx = 0;
if (mute) {
wetplayMP3.set_vol_start(100, false);
}
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
}
function clean() {
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
}
function update() {
if (scale_800x600) {
_root.scalar.apply(mcs);
}
mc_play_icon._x = get_width() - 11;
mc_play_icon._y = 11;
var _local2 = _root.poker.snapshot();
mc.globalToLocal(_local2);
if (_root.popup == wetplayMP3) {
if (((_local2.x < (get_width() - (wall - (xall / 2)))) || (_local2.y > hall)) && ((!_root.poker.poke_now) && (!_root.poker.poke_up))) {
_root.popup = null;
wetplayMP3.mc.dx = get_width() + xall;
wetplayMP3.mc.dy = -wall;
wetplayMP3.mc.ox = wetplayMP3.mc._x;
wetplayMP3.mc.oy = wetplayMP3.mc._y;
wetplayMP3.mc.idx = 4;
}
} else if ((!_root.popup) && (!mute)) {
if ((_local2.x > (get_width() - 20)) && ((_local2.y < 20) && ((!_root.poker.poke_now) && (!_root.poker.poke_up)))) {
_root.popup = wetplayMP3;
wetplayMP3.mc.dx = get_width() - (wall - (xall / 2));
wetplayMP3.mc.dy = yall / 2;
wetplayMP3.mc.ox = wetplayMP3.mc._x;
wetplayMP3.mc.oy = wetplayMP3.mc._y;
wetplayMP3.mc.idx = 4;
}
} else {
wetplayMP3.mc.dx = get_width() + xall;
wetplayMP3.mc.dy = -hall;
wetplayMP3.mc.ox = wetplayMP3.mc._x;
wetplayMP3.mc.oy = wetplayMP3.mc._y;
wetplayMP3.mc.idx = 4;
}
var _local3 = wetplayMP3.mc.dx - wetplayMP3.mc._x;
var _local4 = wetplayMP3.mc.dy - wetplayMP3.mc._y;
if (wetplayMP3.mc.idx <= 0) {
wetplayMP3.mc._x = wetplayMP3.mc.dx;
wetplayMP3.mc._y = wetplayMP3.mc.dy;
} else {
wetplayMP3.mc._x = wetplayMP3.mc.dx + ((wetplayMP3.mc.ox - wetplayMP3.mc.dx) * (wetplayMP3.mc.idx / 4));
wetplayMP3.mc._y = wetplayMP3.mc.dy + ((wetplayMP3.mc.oy - wetplayMP3.mc.dy) * (wetplayMP3.mc.idx / 4));
wetplayMP3.mc.idx--;
}
if (wetplayMP3.mc._x == (get_width() + xall)) {
wetplayMP3.mc._visible = false;
} else {
wetplayMP3.mc._visible = true;
}
if (_root.popup) {
mc_play_icon._visible = false;
} else {
mc_play_icon._visible = true;
}
mc_play_icon._xscale = 50 + (wetplayMP3.throbe * 150);
mc_play_icon._yscale = mc_play_icon._xscale;
mc_play_icon._alpha = 60;
wetplayMP3.update();
}
function PlaySFX(nam, chan, loops, vol) {
return(wetplayMP3.PlaySFX(nam, chan, loops, vol));
}
//ASSetPropFlags(_local1, null, 1);
var donelogindone = false;
}
Symbol 20512 MovieClip [__Packages.Poker] Frame 0
class Poker
{
var hand, mc, float, mc_floater, mc_floaterz, tf_floater, float_str, float_time, mcb0, mcb1, mcg, mcg0, mcg1, lx, ly, size, scale, poke_last, poke_down, poke_up, poke_now, update_do, do_anykey, poke_now_now, poke_down_now, clicks, poke_up_now, anykey, x, y, dx, dy;
function Poker (_hand) {
hand = _hand;
if (System.capabilities.version.split(" ")[0] == "WII") {
hand = false;
}
hand = false;
mc = gfx.create_clip(_root, 16384 + 32);
float = true;
if (float) {
mc_floater = gfx.create_clip(_root, (16384 + 32) + 1);
gfx.clear(mc_floater);
mc_floater.w = 200;
mc_floater.h = 80;
mc_floaterz = gfx.create_clip(mc_floater, null);
mc_floaterz._x = 100;
mc_floaterz._y = 40;
tf_floater = gfx.create_text_html(mc_floaterz, null, -100, 0, 200, 200);
float_str = "";
float_time = -100;
}
if (hand) {
mcb0 = gfx.create_clip(mc, null);
mcb1 = gfx.create_clip(mcb0, null);
mcg = gfx.create_clip(mcb1, null);
mcg0 = gfx.add_clip(mcg, "poke0", null);
mcg1 = gfx.add_clip(mcg, "poke1", null);
mcg0._x = -19;
mcg0._y = -19;
mcg1._x = -(19 + 8);
mcg1._y = -(19 + 8);
mcg._xscale = 75;
mcg._yscale = 75;
}
onMouseUp();
Mouse.addListener(this);
Key.addListener(this);
lx = 0;
ly = 0;
size = 1;
scale = 1;
poke_last = false;
poke_down = false;
poke_up = false;
poke_now = false;
clear_clicks();
update_do = delegate(update, null);
MainStatic.update_add(_root.updates, update_do);
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function clean() {
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
}
function ShowFloat(str, tim) {
if ((str != null) && (float_str != str)) {
float_str = str;
gfx.clear(mc_floaterz);
mc_floaterz.style.out = -1;
mc_floaterz.style.fill = -3355444;
gfx.set_text_html(tf_floater, 16, 0, ("<p align=\"center\">" + str) + "</p>");
mc_floater.h = tf_floater.textHeight + 6;
gfx.draw_box(mc_floaterz, 4, -100, (-mc_floater.h) / 2, 200, mc_floater.h);
tf_floater._y = (-mc_floater.h) / 2;
mc_floaterz._y = mc_floater.h / 2;
}
if (tim == 0) {
if (float_time > tim) {
float_time = tim;
}
} else {
float_time = tim;
}
}
function onKeyDown() {
do_anykey = true;
}
function onMouseDown() {
if (hand) {
Mouse.hide();
mcg0._visible = false;
mcg1._visible = true;
}
poke_now_now = true;
poke_down_now = true;
if (clicks.length < 16) {
clicks[clicks.length] = {click:1, x:_root._xmouse, y:_root._ymouse};
}
}
function onMouseUp() {
do_anykey = true;
if (hand) {
Mouse.hide();
mcg0._visible = true;
mcg1._visible = false;
}
poke_now_now = false;
poke_up_now = true;
if (clicks.length < 16) {
clicks[clicks.length] = {click:-1, x:_root._xmouse, y:_root._ymouse};
}
}
function clear_clicks() {
do_anykey = false;
anykey = false;
poke_last = false;
poke_down = false;
poke_up = false;
poke_now = false;
clicks = [];
}
function update() {
if (do_anykey) {
anykey = true;
} else {
anykey = false;
}
do_anykey = false;
x = _root._xmouse;
y = _root._ymouse;
poke_last = poke_now;
poke_down = poke_down_now;
poke_up = poke_up_now;
poke_now = poke_now_now;
poke_down_now = false;
poke_up_now = false;
dx = x - lx;
dy = y - ly;
lx = x;
ly = y;
if (hand) {
mc._x = x;
mc._y = y;
scale = (_root.scalar.sx * size) / 100;
mc._xscale = 100 * scale;
mc._yscale = mc._xscale;
gfx.dropshadow(mc, 2, 45, 0, 1, 4 * scale, 4 * scale, 2, 3);
if ((dx == 0) && (dy == 0)) {
mcb0._rotation = 0;
mcb0._xscale = 100;
mcb0._yscale = 100;
mcb1._rotation = 0;
} else {
var _local3 = (180 * Math.atan2(dy, -dx)) / Math.PI;
var _local4 = Math.sqrt((dy * dy) + (dx * dx));
_local4 = _local4 / 1.5;
if (_local4 > 400) {
_local4 = 400;
}
mcb0._rotation = -_local3;
mcb0._xscale = 100 + _local4;
mcb0._yscale = 100 - (_local4 / 5);
mcb1._rotation = _local3;
}
if (dx > 32) {
dx = 32;
}
if (dx < -32) {
dx = -32;
}
var _local2 = dx;
mcg._rotation = mcg._rotation + ((_local2 - mcg._rotation) / 4);
}
if (float && (float_time >= -10)) {
if (float_time > 0) {
float_time--;
mc_floater._visible = true;
mc_floaterz._xscale = 100;
mc_floaterz._yscale = 100;
} else {
float_time--;
mc_floaterz._xscale = 100 + (float_time * 10);
mc_floaterz._yscale = mc_floaterz._xscale;
if (float_time == -10) {
mc_floater._visible = false;
}
}
var _local5 = mc_floater.w;
var _local6 = mc_floater.h;
var _local13 = Stage.width;
var _local14 = Stage.height;
var _local9 = x - (_local13 / 2);
var _local10 = y - (_local14 / 2);
var _local17 = _local9 * _local9;
var _local21 = ((_local9 < 0) ? (-_local9) : (_local9));
var _local18 = _local10 * _local10;
var _local22 = ((_local10 < 0) ? (-_local10) : (_local10));
var _local16 = _local17 + _local18;
var _local15 = Math.sqrt(_local16);
if (_local15 == 0) {
_local15 = 1;
_local9 = 0;
_local10 = 1;
}
var _local11 = _local9 / _local15;
var _local12 = _local10 / _local15;
var _local19 = ((-_local11) * _local5) * 1.75;
var _local20 = ((-_local12) * _local6) * 1.75;
if ((_local21 / 2) > _local22) {
if (_local9 < 0) {
var _local7 = x;
var _local8 = (y + _local20) - (_local6 / 2);
_local7 = _local7 + 50;
} else {
var _local7 = x - _local5;
var _local8 = (y + _local20) - (_local6 / 2);
_local7 = _local7 - 50;
}
} else if (_local21 < (_local22 / 2)) {
if (_local10 < 0) {
var _local7 = (x + _local19) - (_local5 / 2);
var _local8 = y;
_local8 = _local8 + 50;
} else {
var _local7 = (x + _local19) - (_local5 / 2);
var _local8 = y - _local6;
_local8 = _local8 - 50;
}
} else if (_local9 < 0) {
if (_local10 < 0) {
var _local7 = x;
var _local8 = y;
_local7 = _local7 + 50;
_local8 = _local8 + 50;
} else {
var _local7 = x;
var _local8 = y - _local6;
_local7 = _local7 + 50;
_local8 = _local8 - 50;
}
} else if (_local10 < 0) {
var _local7 = x - _local5;
var _local8 = y;
_local7 = _local7 - 50;
_local8 = _local8 + 50;
} else {
var _local7 = x - _local5;
var _local8 = y - _local6;
_local7 = _local7 - 50;
_local8 = _local8 - 50;
}
mc_floater._x = (mc_floater._x * 0.75) + (_local7 * 0.25);
mc_floater._y = (mc_floater._y * 0.75) + (_local8 * 0.25);
mc_floater._visible = true;
} else {
mc_floater._visible = false;
}
}
function snapshot() {
var _local2 = {};
_local2.key = (poke_now ? 1 : 0);
_local2.key_on = (poke_down ? 1 : 0);
_local2.key_off = (poke_up ? 1 : 0);
_local2.x = x;
_local2.y = y;
_local2.frame = 0;
return(_local2);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20513 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(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) {
onClose = options.onClose;
} else {
onClose = function () {
if (mochi.MochiServices.clip == _root.__mochiservicesMC) {
mochi.MochiServices.clip._parent.play();
} else {
mochi.MochiServices.clip.play();
}
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function doClose(args) {
if (args.error == true) {
onError.apply(null, [args.errorCode, args.httpStatus]);
} else {
onClose.apply();
}
}
}
Symbol 20514 MovieClip [__Packages.GizmoKnob] Frame 0
class GizmoKnob
{
var up, mc, gizmos, active, focus, focus_data, top, x, y, w, h, x_knob, y_knob, mc_base, mc_over, mc_down, onClick;
function GizmoKnob (_up) {
up = _up;
setup();
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function set_knob(xx, yy) {
if (xx != null) {
x_knob = xx;
if (x_knob < 0) {
x_knob = 0;
}
if (x_knob > 1) {
x_knob = 1;
}
}
if (yy != null) {
y_knob = yy;
if (y_knob < 0) {
y_knob = 0;
}
if (y_knob > 1) {
y_knob = 1;
}
}
if (up.w > w) {
x = x_knob * (up.w - w);
} else {
x_knob = 0;
x = 0;
}
if (up.h > h) {
y = y_knob * (up.h - h);
} else {
y_knob = 0;
y = 0;
}
}
function setup() {
setup_base();
}
function clean() {
clean_base();
}
function update() {
if (up.w > w) {
x_knob = x / (up.w - w);
} else {
x_knob = 0;
}
if (up.h > h) {
y_knob = y / (up.h - h);
} else {
y_knob = 0;
}
update_base();
}
function input(snapshot) {
if (top.focus == this) {
var _local3 = dupe_snapshot(snapshot);
mc.localToGlobal(_local3);
up.mc.globalToLocal(_local3);
mc_base._visible = false;
mc_over._visible = false;
mc_down._visible = true;
x = (top.focus_data.orig_x + _local3.x) - top.focus_data.x;
y = (top.focus_data.orig_y + _local3.y) - top.focus_data.y;
if ((x + w) > up.w) {
x = up.w - w;
}
if ((y + h) > up.h) {
y = up.h - h;
}
if (x < 0) {
x = 0;
}
if (y < 0) {
y = 0;
}
update();
if (snapshot.key_off & 1) {
onClick(top.focus);
top.focus = null;
return(top.focus);
}
} else if ((top.focus == null) && ((snapshot.x > 0) && ((snapshot.y > 0) && ((snapshot.x < w) && (snapshot.y < h))))) {
if (snapshot.key_on & 1) {
top.focus = this;
top.focus_data = dupe_snapshot(snapshot);
mc.localToGlobal(top.focus_data);
up.mc.globalToLocal(top.focus_data);
top.focus_data.orig_x = x;
top.focus_data.orig_y = y;
mc_base._visible = false;
mc_over._visible = false;
mc_down._visible = true;
return(top.focus);
}
mc_base._visible = false;
mc_over._visible = true;
mc_down._visible = false;
} else {
mc_base._visible = true;
mc_over._visible = false;
mc_down._visible = false;
}
top.focus = input_base(snapshot);
return(top.focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20515 MovieClip [__Packages.WetDiamonds] Frame 0
class WetDiamonds
{
var v, setup_done, mc, lv_wonderful, wonderfulls, game_seed, next_game_seed, state_last, state, state_next, login, splash, menu, play, lobby, about, high, code, over, old_time, update_time;
function WetDiamonds () {
v = [];
v.name = "WetDiamonds";
v.site = "generic";
v.number = "2.02";
v.stamp = "Apr 13 2008";
v.stamp_number = "20080413";
setup_done = false;
mc = gfx.create_clip(_root, null);
mc.onEnterFrame = delegate(update);
gfx.setscroll(mc, 0, 0, _root.scalar.ox, _root.scalar.oy);
_root.wtf = new WTF();
lv_wonderful = new LoadVars();
lv_wonderful.onLoad = delegate(lv_wonderful_post, lv_wonderful);
lv_wonderful.sendAndLoad("http://swf.wetgenes.com/swf/wonderful.php?id=2377", lv_wonderful, "POST");
var _local2 = MainStatic.get_base_context_menu(this);
var _local4 = function () {
this.state_next = "splash";
};
var _local3 = new ContextMenuItem("Quit to Main Menu.", delegate(_local4));
_local2.customItems.push(_local3);
_root.menu = _local2;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
static function main() {
if (_root.kongregateServices != undefined) {
_root.kongregateServices.connect();
_root.wethidemochiads = true;
}
var _local2 = function (a, b) {
if (_root[a] == undefined) {
_root[a] = b;
}
};
_local2("host", "diamonds.wetgenes.com");
_local2("wp_back", "0xcc000000");
_local2("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();
}
function lv_wonderful_post() {
wonderfulls = [];
var _local2 = 0;
for ( ; _local2 < 10 ; _local2++) {
wonderfulls[_local2] = {url:lv_wonderful["url" + _local2], txt:lv_wonderful["txt" + _local2], img:lv_wonderful["jpg" + _local2], target:"_blank"};
}
}
function setup() {
var _local2 = new Date();
game_seed = Math.floor((_local2.getTime() / 1000) / ((24 * 60) * 60)) & 65535;
next_game_seed = null;
state_last = null;
state = null;
state_next = null;
login = new Login(this);
splash = new WetDiamondsSplash(this);
menu = splash;
play = new WetDiamondsPlay(this);
lobby = new PlayLobby(this, {style:"popup", name:"diamonds.ws", version:"2.02"});
about = new PlayAbout(this);
high = new PlayHigh(this);
code = new PlayCode(this);
over = new OverField({up:this, mc:gfx.create_clip(mc, 65544)});
over.setup();
state_next = "login";
}
function update() {
var _local2 = new Date();
var _local3 = _local2.getTime();
MainStatic.choose_and_apply_scalar(this);
if ((!setup_done) && ((_root.getBytesLoaded() == _root.getBytesTotal()) && (_root.loading.done))) {
_root.gotoAndStop(2);
setup();
setup_done = true;
}
if (!setup_done) {
MainStatic.update_do(_root.updates);
return(undefined);
}
if (state_next != null) {
if (state) {
this[state].clean();
}
state_last = state;
state = state_next;
state_next = null;
if (next_game_seed) {
game_seed = next_game_seed;
next_game_seed = null;
}
if (state) {
this[state].setup();
}
old_time = _local3;
update_time = 0;
}
if (state) {
update_time = Math.floor((update_time * 3) / 4);
update_time = update_time + (_local3 - old_time);
if (update_time > 200) {
update_time = 200;
}
MainStatic.update_do(_root.updates);
this[state].update();
update_time = update_time - 40;
old_time = _local3;
}
}
function clean() {
}
function do_str(str) {
switch (str) {
case "restart" :
state_next = "play";
break;
case "logoff" :
state_next = "login";
_root.bmc.forget("Login_Img");
break;
case "lobby_close" :
this[state].do_lobby_close();
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20516 MovieClip [__Packages.WetDiamondsSplash] Frame 0
class WetDiamondsSplash
{
var up, mc_back, mc, mcs, types, over, launches, it, poke_wait;
function WetDiamondsSplash (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function setup() {
mc_back = gfx.create_clip(up.mc, null);
gfx.clear(mc_back);
mc_back.style.fill = -12303224;
gfx.draw_box(mc_back, 0, 0, 0, 800, 600);
mc_back.cacheAsBitmap = true;
mc = gfx.create_clip(up.mc, null);
mcs = new Array();
var _local2 = 0;
for ( ; _local2 < mcnames.length ; _local2++) {
var _local5 = mc;
switch (mcnames[_local2]) {
case "dig" :
if (!mcs.dig) {
mcs.dig = gfx.create_clip(_local5, null);
}
_local5 = mcs.dig;
break;
case "stum" :
if (!mcs.stum) {
mcs.stum = gfx.create_clip(_local5, null);
}
_local5 = mcs.stum;
break;
case "about1" :
case "about2" :
if (!mcs.about) {
mcs.about = gfx.create_clip(_local5, null);
}
_local5 = mcs.about;
break;
case "ws1" :
case "ws2" :
if (!mcs.ws) {
mcs.ws = gfx.create_clip(_local5, null);
}
_local5 = mcs.ws;
break;
case "shop1" :
case "shop2" :
if (!mcs.shop) {
mcs.shop = gfx.create_clip(_local5, null);
}
_local5 = mcs.shop;
break;
case "code1" :
case "code2" :
if (!mcs.code) {
mcs.code = gfx.create_clip(_local5, null);
}
_local5 = mcs.code;
break;
case "puz1" :
case "puz2" :
if (!mcs.puz) {
mcs.puz = gfx.create_clip(_local5, null);
}
_local5 = mcs.puz;
break;
case "end1" :
case "end2" :
if (!mcs.end) {
mcs.end = gfx.create_clip(_local5, null);
}
_local5 = mcs.end;
break;
case "me1" :
case "me2" :
case "me3" :
if (!mcs.me) {
mcs.me = gfx.create_clip(_local5, null);
}
_local5 = mcs.me;
}
mcs[_local2] = gfx.add_clip(_local5, "swf_splash", null);
mcs[_local2].gotoAndStop(_local2 + 1);
mcs[_local2].cacheAsBitmap = true;
mcs[_local2].id = mcnames[_local2];
mcs[mcnames[_local2]] = mcs[_local2];
switch (mcnames[_local2]) {
case "digg" :
var _local6 = mcs[_local2].getBounds(mcs[_local2]);
mcs[_local2].icon = gfx.add_clip(mcs[_local2], "icon_digg", null, _local6.xMin, _local6.yMin, (100 * (_local6.xMax - _local6.xMin)) / 16, (100 * (_local6.yMax - _local6.yMin)) / 16);
break;
case "stum" :
_local6 = mcs[_local2].getBounds(mcs[_local2]);
mcs[_local2].icon = gfx.add_clip(mcs[_local2], "icon_stumble", null, _local6.xMin, _local6.yMin, (100 * (_local6.xMax - _local6.xMin)) / 16, (100 * (_local6.yMax - _local6.yMin)) / 16);
}
}
mcs.digg.onRelease = delegate(click, "digg");
mcs.stum.onRelease = delegate(click, "stum");
mcs.about.onRelease = delegate(click, "about");
mcs.ws.onRelease = delegate(click, "ws");
mcs.puz.onRelease = delegate(click, "puz");
mcs.end.onRelease = delegate(click, "end");
mcs.shop.onRelease = delegate(click, "shop");
mcs.code.onRelease = delegate(click, "code");
types = new Array("fire", "earth", "air", "water", "ether");
_local2 = 0;
for ( ; _local2 < 5 ; _local2++) {
types[types[_local2]] = _local2;
}
over = new Object();
over.up = up;
over.mc = gfx.create_clip(mc, null);
launches = new Array();
it = new Array();
over.tf = gfx.create_text_html(over.mc, null, 10, 10, 200, 50);
over.bounces = 0;
over.bounces_max = 0;
_local2 = 0;
for ( ; _local2 < 5 ; _local2++) {
it[_local2] = new FieldItem(this);
it[_local2].setup(types[_local2]);
it[_local2].mc._visible = false;
}
if (_root.pbem_id) {
mcs.puz._visible = false;
mcs.end._visible = false;
}
poke_wait = 0;
}
function clean() {
while (launches.length) {
launches[0].clean();
launches.splice(0, 1);
}
mc.removeMovieClip();
}
function do_lobby_close() {
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({style:"fade", mc:mc_back});
_root.swish.setup();
if (mc._visible == false) {
mc._visible = true;
}
}
function click(ids) {
var _local3 = "diamonds.wetgenes.com";
var _local4 = "WetDiamonds:+Swap+diamonds+to+match+three+or+more.";
var _local5 = "+Play+multiplayer,+daily+puzzle+or+endurance+modes.";
if (_root.popup) {
return(undefined);
}
switch (ids) {
case "shop" :
getURL ("http://link.WetGenes.com/link/WetDiamonds.shop", "_bank");
break;
case "code" :
up.code.setup();
break;
case "about" :
up.about.setup();
break;
case "ws" :
if (_root.swish) {
_root.swish.clean();
_root.swish = null;
}
_root.swish = new Swish({style:"sqr_plode", mc:mc});
_root.swish.setup();
up.lobby.setup();
mc._visible = false;
break;
case "puz" :
up.play.gamemode = "puzzle";
up.state_next = "play";
_root.swish = new Swish({style:"sqr_plode", mc:mc});
break;
case "end" :
up.play.gamemode = "endurance";
up.state_next = "play";
_root.swish = new Swish({style:"sqr_plode", mc:mc});
break;
case "digg" :
getURL ((((((("http://digg.com/submit?phase=2&url=" + _local3) + "&title=") + _local4) + "&bodytext=") + _local4) + _local5) + "&topic=playable_web_games", "_blank");
break;
case "stum" :
getURL (((("http://www.stumbleupon.com/submit?url=http://" + _local3) + "&title=") + _local4) + _local5, "_blank");
}
}
function update() {
if (_root.popup) {
return(undefined);
}
if (mc._visible == false) {
mc._visible = true;
}
if (mcs.digg.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.poker.ShowFloat("If you like this game, please tell your friends on Digg!", 10);
}
if (mcs.stum.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.poker.ShowFloat("If you like this game, please tell your friends on StumbleUpon!", 10);
}
if (mcs.about.hitTest(_root._xmouse, _root._ymouse, true)) {
mcs.about1._visible = false;
mcs.about2._visible = true;
_root.poker.ShowFloat("Did you know this game was made by real people?", 10);
} else {
mcs.about1._visible = true;
mcs.about2._visible = false;
}
if (mcs.ws.hitTest(_root._xmouse, _root._ymouse, true)) {
mcs.ws1._visible = false;
mcs.ws2._visible = true;
if (_root.pbem_id) {
_root.poker.ShowFloat("A PBEM game is active and waiting! Click here to play the game.", 10);
} else {
_root.poker.ShowFloat("Setup or join a multiplayer game.<br>This is BETA! I think it's working but please report any problems in a helpful fashion.", 10);
}
} else {
mcs.ws1._visible = true;
mcs.ws2._visible = false;
}
if (mcs.shop.hitTest(_root._xmouse, _root._ymouse, true)) {
mcs.shop1._visible = false;
mcs.shop2._visible = true;
_root.poker.ShowFloat("You too can consume junk and support this game, it's like two things for the price of one :)", 10);
} else {
mcs.shop1._visible = true;
mcs.shop2._visible = false;
}
if (mcs.code.hitTest(_root._xmouse, _root._ymouse, true)) {
mcs.code1._visible = false;
mcs.code2._visible = true;
_root.poker.ShowFloat("Get the codes to place this game on your blog, profile or website.", 10);
} else {
mcs.code1._visible = true;
mcs.code2._visible = false;
}
if (mcs.puz.hitTest(_root._xmouse, _root._ymouse, true) && (mcs.puz._visible)) {
mcs.puz1._visible = false;
mcs.puz2._visible = true;
_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.", 10);
} else {
mcs.puz1._visible = true;
mcs.puz2._visible = false;
}
if (mcs.end.hitTest(_root._xmouse, _root._ymouse, true) && (mcs.end._visible)) {
mcs.end1._visible = false;
mcs.end2._visible = true;
_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.", 10);
} else {
mcs.end1._visible = true;
mcs.end2._visible = false;
}
mcs.me1._visible = false;
mcs.me2._visible = false;
mcs.me3._visible = false;
if (mcs.me.hitTest(_root._xmouse, _root._ymouse, true)) {
wave_frame++;
switch (Math.floor(wave_frame / 16) % 2) {
case 0 :
mcs.me2._visible = true;
break;
case 1 :
mcs.me3._visible = true;
}
} else {
mcs.me1._visible = true;
}
var _local2 = 0;
for ( ; _local2 < launches.length ; _local2++) {
if (launches[_local2].update_launch()) {
launches[_local2].clean();
launches.splice(_local2, 1);
_local2--;
}
}
if (over.bounces_max < over.bounces) {
over.bounces_max = over.bounces;
}
gfx.set_text_html(over.tf, 16, 16777215, (("bounces : " + over.bounces_max) + " / ") + over.bounces);
var _local3 = -1;
if (mcs.dia1.hitTest(_root._xmouse, _root._ymouse, true)) {
_local3 = 3;
}
if (mcs.dia2.hitTest(_root._xmouse, _root._ymouse, true)) {
_local3 = 2;
}
if (mcs.dia3.hitTest(_root._xmouse, _root._ymouse, true)) {
_local3 = 0;
}
if (mcs.dia4.hitTest(_root._xmouse, _root._ymouse, true)) {
_local3 = 1;
}
if (mcs.dia5.hitTest(_root._xmouse, _root._ymouse, true)) {
_local3 = 4;
}
if (_root.poker.poke_now || (_local3 >= 0)) {
if (poke_wait <= 0) {
poke_wait = 1;
if (_local3 >= 0) {
var _local4 = it[_local3];
_local4.setxy(mc._xmouse, mc._ymouse);
} else {
var _local4 = it[rnd() % 5];
_local4.setxy(mc._xmouse, mc._ymouse);
}
var _local5 = _local4.launch(((rnd() & 255) - 128) / 8, ((rnd() & 255) - 512) / 8);
_local5.mc._xscale = 50;
_local5.mc._yscale = 50;
_local5.mc._rotation = rnd() % 360;
var _local6 = rnd() % 20;
_local2 = 0;
for ( ; _local2 < _local6 ; _local2++) {
_local5.nextframe();
}
}
}
if (poke_wait > 0) {
poke_wait--;
}
}
//ASSetPropFlags(_local1, null, 1);
var wave_frame = 0;
static var mcnames = ["back", "end2", "puz2", "end1", "puz1", "code2", "shop2", "code1", "shop1", "me1", "me2", "me3", "dia1", "dia2", "dia3", "dia4", "dia5", "ws2", "ws1", "about2", "about1", "digg", "stum"];
var rnd_num = 0;
}
Symbol 20517 MovieClip [__Packages.Swish] Frame 0
class Swish
{
var bms, mcs, w, h, cw, ch, style, _xmouse, _ymouse, sw, sh, smul, setup_done, smc, frame, update_do;
function Swish (opts) {
if (opts) {
prepare(opts);
}
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function rnd_seed(n) {
rnd_num = n & 65535;
}
function rnd() {
rnd_num = (((rnd_num + 1) * 75) - 1) % 65537;
return(rnd_num);
}
function prepare(opts) {
rnd_seed(getTimer() & 65535);
bms = [];
mcs = [];
w = 800;
h = 600;
cw = 8;
ch = 6;
style = "fade";
_xmouse = 0;
_ymouse = 0;
if (opts.mc) {
_xmouse = opts.mc._xmouse;
_ymouse = opts.mc._ymouse;
}
if (opts.style) {
style = opts.style;
}
if (opts.w) {
w = opts.w;
}
if (opts.h) {
h = opts.h;
}
if (opts.cw) {
w = opts.cw;
}
if (opts.ch) {
h = opts.ch;
}
sw = w / cw;
sh = h / ch;
if (opts.mc) {
switch (style) {
case "fade" :
smul = 0.8;
bms[0] = new flash.display.BitmapData(w, h, false, 0);
bms[0].draw(opts.mc);
break;
case "slide_left" :
bms[0] = new flash.display.BitmapData(w, h, false, 0);
bms[0].draw(opts.mc);
break;
case "sqr_plode" :
case "sqr_shrink" :
case "sqr_rollup" :
smul = 0.95;
var _local3 = new flash.display.BitmapData(w, h, false, 0);
_local3.draw(opts.mc);
var _local5 = 0;
// unexpected jump
for(;;){
_local5++;
if (_local5 >= ch) {
break;
}
var _local4 = 0;
for ( ; _local4 < cw ; _local4++) {
bms[(_local5 * cw) + _local4] = new flash.display.BitmapData(sw, sh, false, 0);
bms[(_local5 * cw) + _local4].copyPixels(_local3, new flash.geom.Rectangle(_local4 * sw, _local5 * sh, sw, sh), new flash.geom.Point(0, 0));
}
};
}
}
if (opts.smul) {
smul = opts.smul;
}
setup_done = false;
}
function setup() {
if (!_root.mc_swish) {
_root.mc_swish = gfx.create_clip(_root, 16382);
_root.scalar.apply(_root.mc_swish);
}
smc = _root.mc_swish;
smc._alpha = 100;
frame = -2;
switch (style) {
case "fade" :
case "slide_left" :
mcs[0] = gfx.create_clip(smc, null, 400, 300);
mcs[1] = gfx.create_clip(mcs[0], null, -400, -300);
mcs[1].attachBitmap(bms[0], 0, "auto", true);
break;
case "sqr_plode" :
var _local3 = 0;
for ( ; _local3 < ch ; _local3++) {
var _local2 = 0;
for ( ; _local2 < cw ; _local2++) {
var _local4 = gfx.create_clip(smc, null, (_local2 + 0.5) * sw, (_local3 + 0.5) * sw);
mcs[(_local3 * cw) + _local2] = _local4;
_local4.mc = gfx.create_clip(_local4, null, (-sw) / 2, (-sh) / 2);
_local4.mc.attachBitmap(bms[(_local3 * cw) + _local2], 0, "auto", true);
_local4.vx = ((rnd() / 32768) - 1) * 16;
_local4.vy = -16 + ((rnd() / 65536) * -16);
_local4.vr = _local4.vx * 0.5;
}
}
break;
case "sqr_shrink" :
_local3 = 0;
for ( ; _local3 < ch ; _local3++) {
var _local2 = 0;
for ( ; _local2 < cw ; _local2++) {
var _local4 = gfx.create_clip(smc, null, (_local2 + 0.5) * sw, (_local3 + 0.5) * sw);
mcs[(_local3 * cw) + _local2] = _local4;
_local4.mc = gfx.create_clip(_local4, null, (-sw) / 2, (-sh) / 2);
_local4.mc.attachBitmap(bms[(_local3 * cw) + _local2], 0, "auto", true);
_local4.vx = 0;
_local4.vy = 0;
_local4.vr = 4;
}
}
break;
case "sqr_rollup" :
_local3 = 0;
// unexpected jump
for(;;){
_local3++;
if (_local3 >= ch) {
break;
}
var _local5 = null;
if (_local3 & 1) {
var _local2 = 0;
for ( ; _local2 < cw ; _local2++) {
if (_local5) {
var _local4 = gfx.create_clip(_local5, null, sw, 0);
_local5 = _local4;
} else {
var _local4 = gfx.create_clip(smc, null, _local2 * sw, (_local3 + 1) * sw);
_local5 = _local4;
}
mcs[(_local3 * cw) + _local2] = _local4;
_local4.mc = gfx.create_clip(_local4, null, 0, -sh);
_local4.mc.attachBitmap(bms[(_local3 * cw) + _local2], 0, "auto", true);
}
} else {
var _local2 = cw - 1;
for ( ; _local2 >= 0 ; _local2--) {
if (_local5) {
var _local4 = gfx.create_clip(_local5, null, -sw, 0);
_local5 = _local4;
} else {
var _local4 = gfx.create_clip(smc, null, (_local2 + 1) * sw, (_local3 + 1) * sw);
_local5 = _local4;
}
mcs[(_local3 * cw) + _local2] = _local4;
_local4.mc = gfx.create_clip(_local4, null, -sw, -sh);
_local4.mc.attachBitmap(bms[(_local3 * cw) + _local2], 0, "auto", true);
}
}
};
}
update_do = delegate(check_update, null);
MainStatic.update_add(_root.updates, update_do);
setup_done = true;
return(this);
}
function check_update() {
if (!update()) {
clean();
}
}
function clean() {
if (!setup_done) {
return(false);
}
MainStatic.update_remove(_root.updates, update_do);
update_do = null;
setup_done = false;
var _local2 = 0;
for ( ; _local2 < mcs.length ; _local2++) {
if (mcs[_local2]) {
mcs[_local2].removeMovieClip();
}
}
bms = [];
mcs = [];
frame = 0;
_root.swish = null;
return(true);
}
function update() {
if (!setup_done) {
return(true);
}
frame++;
if (frame < 0) {
return(true);
}
switch (style) {
case "fade" :
smc._alpha = smc._alpha * smul;
if ((smc._alpha < 3) && (smc._alpha > -1)) {
smc._alpha = 0;
return(false);
}
return(true);
case "slide_left" :
mcs[0]._x = -900 + ((mcs[0]._x - -900) * 0.9);
if (mcs[0]._x < -800) {
return(false);
}
return(true);
case "sqr_plode" :
if (frame > 200) {
return(false);
}
var _local4 = 0;
for ( ; _local4 < ch ; _local4++) {
var _local3 = 0;
for ( ; _local3 < cw ; _local3++) {
var _local5 = mcs[(_local4 * cw) + _local3];
_local5._x = _local5._x + _local5.vx;
_local5._y = _local5._y + _local5.vy;
_local5._rotation = _local5._rotation + _local5.vr;
_local5.vy = _local5.vy + 2;
if (frame > 10) {
_local5._xscale = _local5._xscale * smul;
_local5._yscale = _local5._yscale * smul;
}
}
}
return(true);
case "sqr_shrink" :
if (frame > 200) {
return(false);
}
_local4 = 0;
for ( ; _local4 < ch ; _local4++) {
var _local3 = 0;
for ( ; _local3 < cw ; _local3++) {
var _local5 = mcs[(_local4 * cw) + _local3];
_local5._x = _local5._x + _local5.vx;
_local5._y = _local5._y + _local5.vy;
_local5._rotation = _local5._rotation + _local5.vr;
_local5._xscale = _local5._xscale * smul;
_local5._yscale = _local5._yscale * smul;
}
}
return(true);
case "sqr_rollup" :
var _local2 = Math.floor(frame / 6);
if (_local2 >= 8) {
return(false);
}
_local4 = 0;
for ( ; _local4 < ch ; _local4++) {
if (_local4 & 1) {
if (_local2 < 8) {
var _local5 = mcs[(_local4 * cw) + ((cw - 1) - _local2)];
_local5._rotation = _local5._rotation - (90 / 5);
}
} else if (_local2 < 8) {
var _local5 = mcs[(_local4 * cw) + _local2];
_local5._rotation = _local5._rotation + (90 / 5);
}
}
return(true);
}
}
//ASSetPropFlags(_local1, null, 1);
var rnd_num = 0;
}
Symbol 20518 MovieClip [__Packages.Replay] Frame 0
class Replay
{
var prekey, dat, str, state, key, key_on, key_off, prekey_idx, dat_idx, dat_idx_chunk, str_idx, frame, frame_recorded, frame_wait, premouse_x, premouse_y, mouse_x, mouse_y, play_mouse_x_old, play_mouse_y_old, play_mouse_f_old, play_mouse_x_new, play_mouse_y_new, play_mouse_f_new;
function Replay () {
setup();
}
function setup() {
prekey = new Array(64);
dat = new Array(1024);
str = "";
reset();
}
function reset() {
state = STATE_NONE;
key = 0;
key_on = 0;
key_off = 0;
prekey_idx = 0;
dat[0] = Clown.tostr(CODE_VERSION, 1) + Clown.tostr(VERSION, 2);
dat_idx = 0;
dat_idx_chunk = 64;
str_idx = 0;
frame = 0;
frame_recorded = 0;
frame_wait = 0;
premouse_x = 0;
premouse_y = 0;
mouse_x = 0;
mouse_y = 0;
play_mouse_x_old = 0;
play_mouse_y_old = 0;
play_mouse_f_old = 0;
play_mouse_x_new = 0;
play_mouse_y_new = 0;
play_mouse_f_new = 0;
}
function record_time() {
var _local2 = frame - frame_recorded;
while (_local2 > 0) {
if (_local2 <= 64) {
dat[dat_idx] = dat[dat_idx] + (Clown.tostr(CODE_TIME_64, 1) + Clown.tostr(_local2 - 1, 1));
if ((--dat_idx_chunk) < 0) {
dat_idx_chunk = 64;
dat[++dat_idx] = "";
}
_local2 = 0;
} else if (_local2 <= 4096) {
dat[dat_idx] = dat[dat_idx] + (Clown.tostr(CODE_TIME_4096, 1) + Clown.tostr(_local2 - 1, 2));
if ((--dat_idx_chunk) < 0) {
dat_idx_chunk = 64;
dat[++dat_idx] = "";
}
_local2 = 0;
} else {
dat[dat_idx] = dat[dat_idx] + (Clown.tostr(CODE_TIME_4096, 1) + Clown.tostr(4096 - 1, 2));
if ((--dat_idx_chunk) < 0) {
dat_idx_chunk = 64;
dat[++dat_idx] = "";
}
_local2 = _local2 - 4096;
}
}
frame_recorded = frame;
}
function prekey_on(k) {
prekey[prekey_idx++] = k;
}
function prekey_off(k) {
prekey[prekey_idx++] = 32 + k;
}
function prekey_update() {
if (state == STATE_RECORD) {
var _local2 = 0;
for ( ; _local2 < prekey_idx ; _local2++) {
var _local3 = prekey[_local2];
if (_local3 >= 32) {
record_key_off(_local3 - 32);
} else {
record_key_on(_local3);
}
}
} else if (state == STATE_NONE) {
var _local2 = 0;
for ( ; _local2 < prekey_idx ; _local2++) {
var _local3 = prekey[_local2];
if (_local3 >= 32) {
play_key_off(_local3 - 32);
} else {
play_key_on(_local3);
}
}
}
prekey_idx = 0;
}
function play_key_on(k) {
var _local3 = 1 << k;
key = key | _local3;
key_on = key_on | _local3;
key_off = key_off & (_local3 ^ -1);
}
function record_key_on(k) {
var _local3 = 1 << k;
if ((key & _local3) == 0) {
play_key_on(k);
record_time();
dat[dat_idx] = dat[dat_idx] + (Clown.tostr(CODE_KEY, 1) + Clown.tostr(k, 1));
if ((--dat_idx_chunk) < 0) {
dat_idx_chunk = 64;
dat[++dat_idx] = "";
}
}
}
function play_key_off(k) {
var _local3 = 1 << k;
key = key & (_local3 ^ -1);
key_on = key_on & (_local3 ^ -1);
key_off = key_off | _local3;
}
function record_key_off(k) {
var _local3 = 1 << k;
if ((key & _local3) == _local3) {
play_key_off(k);
record_time();
dat[dat_idx] = dat[dat_idx] + (Clown.tostr(CODE_KEY, 1) + Clown.tostr(32 + k, 1));
if ((--dat_idx_chunk) < 0) {
dat_idx_chunk = 64;
dat[++dat_idx] = "";
}
}
}
function record_mouse() {
if (state == STATE_RECORD) {
if (play_mouse_f_old != frame) {
record_time();
dat[dat_idx] = dat[dat_idx] + ((Clown.tostr(CODE_MOUSE_XY_4096, 1) + Clown.tostr(mouse_x + 2048, 2)) + Clown.tostr(mouse_y + 2048, 2));
if ((--dat_idx_chunk) < 0) {
dat_idx_chunk = 64;
dat[++dat_idx] = "";
}
play_mouse_x_old = mouse_x;
play_mouse_y_old = mouse_y;
play_mouse_f_old = frame;
}
}
}
function start_play(_str) {
str = _str;
trace("start_play");
trace("replay str_length:" + str.length);
trace("replay str:" + str);
reset();
state = STATE_PLAY;
}
function end_play() {
trace("end_play");
state = STATE_NONE;
}
function start_record() {
trace("start_record");
reset();
find_next_mouse_pos();
state = STATE_RECORD;
}
function end_record() {
trace("end_record");
state = STATE_NONE;
str = dat_tostr();
trace(str);
}
function update() {
key_on = 0;
key_off = 0;
if (state == STATE_PLAY) {
frame++;
prekey_update();
play_update();
} else if (state == STATE_RECORD) {
frame++;
mouse_x = Math.floor(premouse_x);
mouse_y = Math.floor(premouse_y);
prekey_update();
} else if (state == STATE_NONE) {
mouse_x = Math.floor(premouse_x);
mouse_y = Math.floor(premouse_y);
prekey_update();
}
}
function dat_tostr() {
var _local3 = "";
var _local2 = 0;
for ( ; _local2 <= dat_idx ; _local2++) {
_local3 = _local3 + dat[_local2];
}
return(_local3);
}
function play_update() {
if (typeof(str) != "string") {
return(undefined);
}
while (frame_wait <= frame) {
if (str_idx > str.length) {
return(undefined);
}
var _local2 = Clown.tonum(str, str_idx++, 1);
switch (_local2) {
case CODE_VERSION :
if (Clown.tonum(str, str_idx, 2) != VERSION) {
str_idx = str_idx - 1;
frame_wait = frame_wait + 64;
} else {
str_idx = str_idx + 2;
}
break;
case CODE_TIME_64 :
frame_wait = frame_wait + (Clown.tonum(str, str_idx++, 1) + 1);
break;
case CODE_TIME_4096 :
frame_wait = frame_wait + (Clown.tonum(str, str_idx, 2) + 1);
str_idx = str_idx + 2;
break;
case CODE_KEY :
var _local3 = Clown.tonum(str, str_idx++, 1);
if (_local3 >= 32) {
play_key_off(_local3 - 32);
} else {
play_key_on(_local3);
}
break;
case CODE_MOUSE_XY_4096 :
play_mouse_x_old = Clown.tonum(str, str_idx, 2) - 2048;
str_idx = str_idx + 2;
play_mouse_y_old = Clown.tonum(str, str_idx, 2) - 2048;
str_idx = str_idx + 2;
play_mouse_f_old = frame;
find_next_mouse_pos();
}
}
if ((play_mouse_f_old <= frame) && (play_mouse_f_new > frame)) {
var _local4 = frame - play_mouse_f_old;
_local4 = _local4 / (play_mouse_f_new - play_mouse_f_old);
mouse_x = play_mouse_x_old + ((play_mouse_x_new - play_mouse_x_old) * _local4);
mouse_y = play_mouse_y_old + ((play_mouse_y_new - play_mouse_y_old) * _local4);
} else {
mouse_x = play_mouse_x_new;
mouse_y = play_mouse_y_new;
}
}
function find_next_mouse_pos() {
play_mouse_x_new = play_mouse_x_old;
play_mouse_y_new = play_mouse_y_old;
play_mouse_f_new = play_mouse_f_old;
var _local5 = str_idx;
var _local4 = frame;
while (play_mouse_f_new == play_mouse_f_old) {
if (_local5 > str.length) {
return(undefined);
}
var _local2 = Clown.tonum(str, _local5++, 1);
switch (_local2) {
case CODE_TIME_64 :
_local4 = _local4 + (Clown.tonum(str, _local5++, 1) + 1);
break;
case CODE_TIME_4096 :
_local4 = _local4 + (Clown.tonum(str, _local5, 2) + 1);
_local5 = _local5 + 2;
break;
case CODE_MOUSE_XY_4096 :
play_mouse_x_new = Clown.tonum(str, _local5, 2) - 2048;
_local5 = _local5 + 2;
play_mouse_y_new = Clown.tonum(str, _local5, 2) - 2048;
_local5 = _local5 + 2;
play_mouse_f_new = _local4;
return(undefined);
default :
_local5 = _local5 + code_data_sizes[_local2];
}
}
}
function clean() {
}
function apply_keys_to_prekey() {
if (Key.isDown(Key.UP)) {
prekey_on(KEY_UP);
} else {
prekey_off(KEY_UP);
}
if (Key.isDown(Key.DOWN)) {
prekey_on(KEY_DOWN);
} else {
prekey_off(KEY_DOWN);
}
if (Key.isDown(Key.LEFT)) {
prekey_on(KEY_LEFT);
} else {
prekey_off(KEY_LEFT);
}
if (Key.isDown(Key.RIGHT)) {
prekey_on(KEY_RIGHT);
} else {
prekey_off(KEY_RIGHT);
}
}
//ASSetPropFlags(_local1, null, 1);
static var VERSION = 4;
static var STATE_NONE = 0;
static var STATE_RECORD = 1;
static var STATE_PLAY = 2;
static var CODE_VERSION = 0;
static var CODE_TIME_64 = 1;
static var CODE_TIME_4096 = 2;
static var CODE_KEY = 3;
static var CODE_MOUSE_XY_4096 = 4;
var code_data_sizes = [2, 1, 2, 1, 4];
static var KEY_MBUTTON = 0;
static var KEY_FIRE = 1;
static var KEY_UP = 2;
static var KEY_DOWN = 3;
static var KEY_LEFT = 4;
static var KEY_RIGHT = 5;
static var KEY_MAX = 6;
static var KEYM_MBUTTON = 1;
static var KEYM_FIRE = 2;
static var KEYM_UP = 4;
static var KEYM_DOWN = 8;
static var KEYM_LEFT = 16;
static var KEYM_RIGHT = 32;
static var KEYM_MAX = 64;
}
Symbol 20519 MovieClip [__Packages.Clown] Frame 0
class Clown
{
function Clown () {
}
static function tostr(num, len) {
var _local6 = num;
var _local7 = "";
var _local4 = 0;
for ( ; _local4 < len ; _local4++) {
var _local5 = _local6 & 63;
_local7 = _local7 + chars.charAt(_local5);
_local6 = _local6 >> 6;
}
return(_local7);
}
static function tonum(str, base, len) {
var _local8 = 1;
var _local7 = 0;
var _local6 = base;
for ( ; _local6 < (base + len) ; _local6++) {
var _local5 = str.charCodeAt(_local6);
_local7 = _local7 + (nums[_local5] * _local8);
_local8 = _local8 * 64;
}
return(_local7);
}
static function bits_to_str(arr, bits) {
if ((bits % 6) != 0) {
return(null);
}
var _local4 = "";
var _local5 = 0;
for ( ; _local5 < arr.length ; _local5++) {
_local4 = _local4 + tostr(arr[_local5], bits / 6);
}
return(_local4);
}
static function str_to_bits(str, off, bits) {
if ((bits % 6) != 0) {
return(null);
}
var _local7 = bits / 6;
var _local6 = [];
var _local8 = str.length;
var _local5 = off;
for ( ; _local5 < _local8 ; _local5 = _local5 + _local7) {
_local6[_local6.length] = tonum(str, _local5, _local7);
}
return(_local6);
}
static function str_to_pak(str) {
var _local4 = str.length;
var _local3 = tostr(_local4, 4);
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5 = _local5 + 3) {
if ((_local5 + 3) <= _local4) {
var _local7 = str.charCodeAt(_local5 + 0);
_local7 = _local7 + (str.charCodeAt(_local5 + 1) * 256);
_local7 = _local7 + (str.charCodeAt(_local5 + 2) * 65536);
_local3 = _local3 + tostr(_local7, 4);
} else {
var _local7 = str.charCodeAt(_local5 + 0);
if ((_local5 + 1) < _local4) {
_local7 = _local7 + (str.charCodeAt(_local5 + 1) * 256);
}
if ((_local5 + 2) < _local4) {
_local7 = _local7 + (str.charCodeAt(_local5 + 2) * 65536);
}
_local3 = _local3 + tostr(_local7, 4);
}
}
return(_local3);
}
static function pak_to_str(pak) {
var _local3 = "";
var _local4 = tonum(pak, 0, 4);
var _local6 = 4;
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5 = _local5 + 3) {
if (_local6 > pak.length) {
break;
}
if ((_local5 + 3) <= _local4) {
var _local8 = tonum(pak, _local6, 4);
_local6 = _local6 + 4;
_local3 = _local3 + String.fromCharCode(_local8 & 255, (_local8 >> 8) & 255, (_local8 >> 16) & 255);
} else {
var _local8 = tonum(pak, _local6, 4);
_local6 = _local6 + 4;
_local3 = _local3 + String.fromCharCode(_local8 & 255);
if ((_local5 + 1) < _local4) {
_local3 = _local3 + String.fromCharCode((_local8 >> 8) & 255);
}
if ((_local5 + 2) < _local4) {
_local3 = _local3 + String.fromCharCode((_local8 >> 16) & 255);
}
}
}
return(_local3);
}
//ASSetPropFlags(_local1, null, 1);
static var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static var 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];
}
Symbol 20520 MovieClip [__Packages.PlayTurn] Frame 0
class PlayTurn
{
var up, mcs, mc, done, steady;
function PlayTurn (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup() {
_root.popup = this;
mcs = new Array();
mc = gfx.create_clip(_root.mc_popup, null);
mc.cacheAsBitmap = true;
gfx.dropshadow(mc, 5, 45, 0, 1, 20, 20, 2, 3);
mc._y = 0;
mc.dx = 0;
mc._x = -800;
mc.onEnterFrame = delegate(update, null);
done = false;
steady = false;
gfx.clear(mc);
mc.style.out = -16777216;
mc.style.fill = -2147483648;
gfx.draw_box(mc, 0, 100 + 16, 0 + 16, 600 - 32, 600 - 32);
var _local5 = "<p align='center'>Click here to close this menu and return to the game.</p>";
var _local6 = gfx.create_clip(mc, null, 150, 50);
_local6.tf = gfx.create_text_html(_local6, null, 0, 0, 500, 100);
gfx.set_text_html(_local6.tf, 24, 16777215, _local5);
set_butt(_local6, "return");
mcs[0] = _local6;
if (_root.pbem_id) {
_local5 = "<p align='center'>Click here to end your turn, you did make a move didn't you?</p>";
} else {
_local5 = "<p align='center'>Click here to QUIT the current game and go back to the main menu.</p>";
}
_local6 = gfx.create_clip(mc, null, 150, 250);
_local6.tf = gfx.create_text_html(_local6, null, 0, 0, 500, 150);
gfx.set_text_html(_local6.tf, 32, 16777215, _local5);
set_butt(_local6, "quit");
mcs[1] = _local6;
show_loaded();
thunk();
Mouse.addListener(this);
}
function show_loaded() {
}
function thunk() {
}
function clean() {
if (_root.popup != this) {
return(undefined);
}
mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
_root.poker.clear_clicks();
}
function onMouseUp() {
if (_root.popup != this) {
return(undefined);
}
if (steady) {
done = true;
mc.dx = _root.scalar.ox;
}
}
function update() {
show_loaded();
if ((_root.popup != this) || (_root.pause)) {
return(undefined);
}
mc._x = mc._x + ((mc.dx - mc._x) / 4);
if (((mc._x - mc.dx) * (mc._x - mc.dx)) < (16 * 16)) {
steady = true;
if (done) {
clean();
}
} else {
steady = false;
}
}
function set_butt(b, id) {
b.onRollOver = delegate(butt_over, id);
b.onRollOut = delegate(butt_out, id);
b.onReleaseOutside = delegate(butt_out, id);
b.onRelease = delegate(butt_press, id);
}
function butt_over(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);
}
}
function butt_out(id) {
_root.poker.ShowFloat(null, 0);
}
function butt_up(id) {
}
function butt_press(id) {
if (!(id === "quit")) {
} else {
up.up.state_next = "splash";
_root.swish = new Swish({style:"sqr_plode", mc:up.mc});
_root.pbem_id = null;
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20521 MovieClip [__Packages.gfx] Frame 0
class gfx
{
function gfx () {
}
static function create_text_edit(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 _local8 = mc["tf" + depth];
_local8.embedFonts = true;
_local8.html = false;
_local8.multiline = false;
_local8.wordWrap = false;
_local8.type = "input";
_local8.selectable = true;
_local8.onSetFocus = function () {
var _local2 = int;
Selection.getCaretIndex();
if (_local2 < 0) {
_local2 = 0;
}
Selection.setFocus(this);
Selection.setSelection(0, 0);
Selection.setSelection(_local2, _local2);
};
_local8.setNewTextFormat(create_text_format(16, -1));
return(_local8);
}
static function create_text(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 _local8 = mc["tf" + depth];
_local8.type = "dynamic";
_local8.embedFonts = true;
_local8.html = false;
_local8.multiline = true;
_local8.selectable = true;
_local8.wordWrap = false;
_local8.setNewTextFormat(create_text_format(16, -1));
return(_local8);
}
static function create_text_format(fntsiz, fntcol, boldit) {
var _local5 = new TextFormat();
_local5.font = "Bitstream Vera Sans";
_local5.color = fntcol & 16777215;
_local5.size = fntsiz;
_local5.bold = (boldit ? true : false);
return(_local5);
}
static function create_text_html(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 _local8 = mc["tf" + depth];
_local8.type = "dynamic";
_local8.embedFonts = true;
_local8.html = true;
_local8.multiline = true;
_local8.selectable = false;
_local8.wordWrap = true;
_local8.setNewTextFormat(create_text_format(16, -1));
return(_local8);
}
static function set_text_html(tf, fntsiz, fntcol, str) {
var _local6 = ((("<font face=\"Bitstream Vera Sans\" size=\"" + fntsiz) + "\" color=\"#") + alt.Sprintf.format("%06x", fntcol & 16777215)) + "\">";
_local6 = _local6 + str;
_local6 = _local6 + "</font>";
tf.htmlText = _local6;
return(_local6);
}
static function create_clip(mc, depth, px, py, sx, sy, rot) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
mc.newdepth = mc.newdepth + 1;
var _local9 = mc.createEmptyMovieClip("mc" + depth, depth);
_local9.newdepth = 0;
if (px != null) {
_local9._x = px;
}
if (py != null) {
_local9._y = py;
}
if (sx != null) {
_local9._xscale = sx;
}
if (sy != null) {
_local9._yscale = sy;
}
if (rot != null) {
_local9._rotation = rot;
}
return(_local9);
}
static function add_clip(mc, str, depth, px, py, sx, sy, rot) {
if (mc.newdepth == undefined) {
mc.newdepth = 0;
}
if (depth == null) {
depth = ++mc.newdepth;
}
var _local10 = mc.attachMovie(str, "mc" + depth, depth);
_local10.newdepth = 0;
if (px != null) {
_local10._x = px;
}
if (py != null) {
_local10._y = py;
}
if (sx != null) {
_local10._xscale = sx;
}
if (sy != null) {
_local10._yscale = sy;
}
if (rot != null) {
_local10._rotation = rot;
}
return(_local10);
}
static function clear(mc) {
mc.style = [];
mc.style.out = -1;
mc.style.fill = -1;
mc.clear();
}
static function create_rounded_text_button(mc, depth, x, y, w, h, b, c, l) {
if (b == null) {
b = 3;
}
if (c == null) {
c = 8;
}
if (l == null) {
l = 2;
}
draw_rounded_rectangle(mc, b, c, l, x, y, w, h);
var _local11 = create_text_html(mc, depth, x, y, w, h);
return(_local11);
}
static function draw_rounded_rectangle(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();
}
static function draw_box(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();
}
static function adjust_allmovieclips(base, funk) {
for (var nam in base) {
var _local4 = base[nam];
if (typeof(_local4) == "movieclip") {
adjust_allmovieclips(_local4, funk);
}
}
funk(base);
}
static function setscroll(mc, minx, miny, sizx, sizy) {
mc.scrollRect = new flash.geom.Rectangle(minx, miny, sizx, sizy);
}
static function dropshadow(mc, a, b, c, d, e, f, g, h) {
mc.filters = [new flash.filters.DropShadowFilter(a, b, c, d, e, f, g, h)];
}
static function glow(mc, a, b, c, d, e, f, g, h) {
mc.filters = [new flash.filters.GlowFilter(a, b, c, d, e, f, g, h)];
}
static function blur(mc, a, b, c) {
mc.filters = [new flash.filters.BlurFilter(a, b, c)];
}
static function clear_filters(mc) {
mc.filters = null;
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20522 MovieClip [__Packages.GizmoMaster] Frame 0
class GizmoMaster
{
var up, mc, gizmos, active, focus, focus_data, top, x, y, w, h, spine;
function GizmoMaster (_up) {
up = _up;
setup();
}
function setup_base() {
mc = gfx.create_clip(up.mc, null);
mc.style = up.mc.style;
gizmos = new Array();
active = true;
focus = null;
focus_data = null;
top = up.top;
if (top == null) {
top = this;
}
}
function clean_base() {
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].clean();
}
}
mc.removeMovieClip();
mc = null;
}
function update_base() {
mc._x = x;
mc._y = y;
var _local2 = 0;
for ( ; _local2 < gizmos.length ; _local2++) {
if (gizmos[_local2].active) {
gizmos[_local2].mc._visible = true;
gizmos[_local2].update();
} else {
gizmos[_local2].mc._visible = false;
}
}
}
static function dupe_snapshot(snapshot) {
var _local3 = {};
_local3.key = snapshot.key;
_local3.key_on = snapshot.key_on;
_local3.key_off = snapshot.key_off;
_local3.x = snapshot.x;
_local3.y = snapshot.y;
_local3.frame = snapshot.frame;
return(_local3);
}
function input_base(snapshot) {
var _local5 = dupe_snapshot(snapshot);
mc.localToGlobal(_local5);
var _local3 = 0;
for ( ; _local3 < gizmos.length ; _local3++) {
if (gizmos[_local3].active) {
gizmos[_local3].mc.globalToLocal(_local5);
gizmos[_local3].input(_local5);
gizmos[_local3].mc.localToGlobal(_local5);
}
}
return(top.focus);
}
function child(g) {
var _local3 = gizmos.length;
gizmos[_local3] = g;
return(g);
}
function set_area(_x, _y, _w, _h) {
x = _x;
y = _y;
w = _w;
h = _h;
}
function draw_mask(px, py) {
gfx.setscroll(mc, px, py, w, h);
}
function setup() {
setup_base();
}
function clean() {
clean_base();
}
function update() {
var _local2 = new Date().getTime();
_local2 = ((_local2 & 16383) - 8192) / 8192;
if (_local2 < 0) {
_local2 = -_local2;
}
var _local3 = _local2 * _local2;
spine = (_local3 + (_local3 * 2)) - ((_local3 * _local2) * 2);
update_base();
}
function input(snapshot) {
focus = input_base(snapshot);
return(focus);
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20523 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _sendChannelName, _rcvChannelName, onError, _sendChannel, _loader, _loaderListener, _rcvChannel, _listenChannel;
var __get__comChannelName;
function MochiServices () {
}
static function __get__id() {
return(_id);
}
static function __get__clip() {
return(_container);
}
static function getVersion() {
return("1.1");
}
static function allowDomains(server) {
var _local3 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local3);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local3);
}
}
return(_local3);
}
static function __get__isNetworkAvailable() {
if (System.security) {
var _local2 = System.security;
if (_local2.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function __set__comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
return(__get__comChannelName());
}
static function __get__connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_container == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
if (_sendChannel._queue != undefined) {
}
if (_container != undefined) {
_container.removeMovieClip();
delete _container;
}
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip.createEmptyMovieClip("__mochiservicesMC", 16384);
} else {
_container = _root.createEmptyMovieClip("__mochiservicesMC", _root.getNextHighestDepth());
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
if (!isNetworkAvailable) {
return(undefined);
}
allowDomains(_gatewayURL);
_loader = new MovieClipLoader();
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.comChannelName = args.newChannel;
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local3 = pkg.callbackID;
var _local4 = this._callbacks[_local3];
if (!_local4) {
return(undefined);
}
var _local5 = _local4.callbackMethod;
var _local6 = _local4.callbackObject;
if (_local6 && (typeof(_local5) == "string")) {
_local5 = _local6[_local5];
}
if (_local5 != undefined) {
_local5.apply(_local6, pkg.args);
}
delete this._callbacks[_local3];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else if (_container == undefined) {
onError.apply(null, ["NotConnected"]);
} else {
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 20524 MovieClip [__Packages.ScrollOn] Frame 0
class ScrollOn
{
var up, rot, mc, tf, show, next, x, w, h, fntsiz, fntcol, xp, lastdown, tw;
function ScrollOn (_up, _rot) {
up = _up;
rot = 0;
if (typeof(_rot) == "number") {
rot = _rot;
}
}
function delegate(f) {
return(com.dynamicflash.utils.Delegate.create(this, f));
}
function setup() {
mc = gfx.create_clip(up.mc, null);
gfx.dropshadow(mc, 2, 45, 0, 1, 4, 4, 2, 3);
mc.filters = [new flash.filters.DropShadowFilter(2, 45, 0, 1, 4, 4, 2, 3)];
tf = gfx.create_text_html(mc, null, 0, 0, 4096, 64);
tf._rotation = rot;
mc.cacheAsBitmap = true;
show = null;
next = null;
x = 0;
w = 800;
h = 32;
fntsiz = 24;
fntcol = 16777215 /* 0xFFFFFF */;
xp = -1;
if (rot == -90) {
gfx.setscroll(mc, 0, 0, h, w);
} else {
gfx.setscroll(mc, 0, 0, w, h);
}
mc._visible = false;
}
function clean() {
mc.removeMovieClip();
}
function update() {
if (show != null) {
if (lastdown > 0) {
lastdown--;
}
x = x + xp;
if (x < (-8 - tw)) {
mc._visible = false;
show = null;
} else {
mc._visible = true;
if (rot == -90) {
gfx.setscroll(mc, 0, x - w, h, w);
} else {
gfx.setscroll(mc, -x, 0, w, h);
}
}
if ((!_root.popup) && (!_root.login)) {
if (_root.poker.poke_down) {
if ((mc._xmouse >= 0) && ((mc._xmouse < w) && ((mc._ymouse >= 0) && (mc._ymouse < h)))) {
lastdown = 60;
}
}
if (_root.poker.poke_up) {
if (lastdown > 0) {
if ((mc._xmouse >= 0) && ((mc._xmouse < w) && ((mc._ymouse >= 0) && (mc._ymouse < h)))) {
if (mc._visible) {
if (show.url) {
if (show.target) {
getURL (show.url, show.target);
} else {
getURL (show.url, "_self");
}
}
}
}
}
}
}
} else {
mc._visible = false;
lastdown = 0;
if (next) {
show = next;
next = null;
gfx.set_text_html(tf, fntsiz, fntcol, show.txt);
x = w;
tw = tf.textWidth;
}
}
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20525 MovieClip [__Packages.PlayWon] Frame 0
class PlayWon
{
var up, state, mcs, tfs, mc, finished, steady, newad, mc_whore, done, notdone;
function PlayWon (_up) {
up = _up;
}
function delegate(f, d) {
return(com.dynamicflash.utils.Delegate.create(this, f, d));
}
function setup(_state) {
if (_state) {
state = _state;
} else {
state = "won";
}
_root.popup = this;
mcs = new Array();
tfs = new Array();
mc = gfx.create_clip(_root.mc_popup, null);
mc.cacheAsBitmap = true;
gfx.dropshadow(mc, 5, 45, 0, 1, 20, 20, 2, 3);
mc._y = 0;
mc.dx = 0;
mc._x = -800;
mc.onEnterFrame = delegate(update, null);
finished = false;
steady = false;
gfx.clear(mc);
mc.style.out = -16777216;
mc.style.fill = 1610612736 /* 0x60000000 */;
gfx.draw_box(mc, 0, 100 + 16, 0 + 16, 600 - 32, 600 - 32);
mcs[2] = gfx.create_clip(mc, null);
tfs[0] = gfx.create_text_html(mcs[2], null, 150, 50, 500, 100);
if (state != "ws") {
var _local6 = "";
_local6 = _local6 + (("<p align=\"center\"><font size=\"32\"> You scored : <b>" + up.hud.points) + "</b></font></p>");
_local6 = _local6 + "<p align=\"center\"><font size=\"16\">";
_local6 = _local6 + "Click here or outside of this box to continue.<br>";
_local6 = _local6 + "</font></p>";
} else {
var _local6 = "";
_local6 = _local6 + "<p align=\"center\"><font size=\"32\"> You scored : <b>";
if (up.player == 0) {
_local6 = _local6 + up.hud.points1;
} else {
_local6 = _local6 + up.hud.points2;
}
_local6 = _local6 + "</b></font></p>";
_local6 = _local6 + "<p align=\"center\"><font size=\"16\">";
if (up.player == 0) {
if (up.hud.points2 < up.hud.points1) {
_local6 = _local6 + (("Which beats " + up.hud.points2) + " Yay!<br>");
} else {
_local6 = _local6 + (("Unfortunately they scored " + up.hud.points2) + "<br>");
}
} else if (up.hud.points1 < up.hud.points2) {
_local6 = _local6 + (("Which beats " + up.hud.points1) + " Yay!<br>");
} else {
_local6 = _local6 + (("Unfortunately they scored " + up.hud.points1) + "<br>");
}
_local6 = _local6 + "</font></p>";
}
tfs[0].multiline = true;
tfs[0].wordWrap = true;
tfs[0].html = true;
tfs[0].selectable = false;
gfx.set_text_html(tfs[0], 22, 16777215, _local6);
mcs[2].onRelease = delegate(click, "top");
mcs[0] = gfx.create_clip(mc, null);
tfs[1] = gfx.create_text_html(mcs[0], null, 150, 50 + 100, 500, 500 - 100);
var _local6 = "";
_local6 = _local6 + "<p align=\"center\"><font size=\"16\">";
_local6 = _local6 + "<br>";
_local6 = _local6 + "<br>";
_local6 = _local6 + "Thank you, please come again.<br>";
_local6 = _local6 + "</font></p>";
tfs[1].multiline = true;
tfs[1].wordWrap = true;
tfs[1].html = true;
tfs[1].selectable = false;
gfx.set_text_html(tfs[1], 22, 16777215, _local6);
mcs[0].onRelease = delegate(click, "text");
mcs[1] = gfx.create_clip(mc, null, 200, 150, (100 * 400) / 350, (100 * 400) / 350);
newad = true;
mc_whore = gfx.create_clip(mc, null, 200 - 25, 325);
mc_whore.onRelease = delegate(click, "whore");
mc_whore.text = gfx.create_text_html(mc_whore, null, 175 + 25, 0, 250, 275);
thunk();
Mouse.addListener(this);
done = false;
notdone = false;
_root.signals.signal("diamonds", "won", this);
}
function flagnewad() {
newad = true;
}
function thunk() {
}
function click(s) {
switch (s) {
case "text" :
break;
case "whore" :
if (!_root.diamonds.wonderfulls[mc_whore.idx].url) {
break;
}
getURL (_root.diamonds.wonderfulls[mc_whore.idx].url, "_blank");
}
}
function clean() {
if (_root.popup != this) {
return(undefined);
}
mc.removeMovieClip();
_root.popup = null;
Mouse.removeListener(this);
up.do_str("won");
}
function onMouseUp() {
if (_root.popup != this) {
return(undefined);
}
done = true;
}
function update() {
if ((_root.popup != this) || (_root.pause)) {
return(undefined);
}
if (mc_whore) {
if (!mc_whore.ad) {
if (_root.diamonds.wonderfulls) {
mc_whore.idx = up.rnd() % 8;
mc_whore.ad = gfx.create_clip(mc_whore, null, 0, 0, 150, 150);
mc_whore.ad.loadMovie(_root.diamonds.wonderfulls[mc_whore.idx].img);
var _local2 = "";
_local2 = _local2 + "<font face=\"Bitstream Vera Sans\" size=\"24\" color=\"#ffffff\">";
_local2 = _local2 + "<p align=\"center\">";
_local2 = _local2 + _root.diamonds.wonderfulls[mc_whore.idx].txt;
_local2 = _local2 + "</p>";
_local2 = _local2 + "</font>";
mc_whore.text.htmlText = _local2;
}
}
}
mc._x = mc._x + ((mc.dx - mc._x) / 4);
if (((mc._x - mc.dx) * (mc._x - mc.dx)) < (16 * 16)) {
steady = true;
if (finished) {
clean();
}
} else {
steady = false;
}
if (done && (!notdone)) {
if (steady) {
finished = true;
mc.dx = _root.scalar.ox;
}
}
done = false;
notdone = false;
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 1673 MovieClip [back] Frame 1
stop();
Symbol 1801 MovieClip [swf_splash] Frame 23
stop();