Frame 1
MochiAd.showPreGameAd({id:"5e442aede74ad721", res:"550x450"});
stop();
Frame 4
function hideMenu() {
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
if (alien) {
var menuItem_cmi = new ContextMenuItem("Gaming Hungama", gotoURL);
my_cm.customItems.push(menuItem_cmi);
}
this.menu = my_cm;
}
function gotoURL() {
getURL (myLink, "_blank");
}
function allowClick(mc) {
if (alien) {
mc.onRelease = function () {
gotoURL();
};
} else {
mc.useHandCursor = false;
mc.enabled = false;
}
}
function initSound(mc) {
mc.snBut.onRelease = function () {
var gsndvol = mySound.getVolume();
if (sndstate eq "on") {
sndstatenum = -1;
sndstate = "off";
} else {
sndstatenum = 1;
sndstate = "on";
}
mc.gotoAndStop(sndstate);
mc.onEnterFrame = function () {
gsndvol = gsndvol + (sndDelay * sndstatenum);
mySound.setVolume(gsndvol);
if (gsndvol >= 100) {
mySound.setVolume(100);
mc.onEnterFrame = null;
} else if (gsndvol <= 0) {
mySound.setVolume(0);
mc.onEnterFrame = null;
}
};
};
}
function showTeaser(mc) {
if (!alien) {
if (obj_game.showTeaser) {
mc.gotoAndStop(2);
} else {
_root.play();
}
} else {
mc.gotoAndStop(2);
}
}
function showPreroll(mc) {
if (!alien) {
_root.play();
} else {
_root.play();
}
}
function alienManager() {
trace("alienManager ========================");
var lv = new LoadVars();
lv.onLoad = function (s) {
trace("loaded");
mytxt.text = h;
};
h = this._url;
var url = ((("http://www.gaminghungama.com/ahm/?gid=" + obj_game.game_id) + "&r=banner300X250&h=") + h);
lv.sendAndLoad(url, lv, "POST");
trace(" Call Url " + url);
}
function playagainManager() {
trace("playagainManager ========================");
var lv = new LoadVars();
lv.onLoad = function (s) {
trace("loaded");
mytxt.text = h;
};
h = this._url;
var url = ((("http://www.gaminghungama.com/ahm/?gid=" + obj_game.game_id) + "&r=playagain&h=") + h);
lv.sendAndLoad(url, lv, "POST");
trace(" Call Url " + url);
}
function trackGame(type) {
var url = ((((("http://www.gaminghungama.com/?g=" + _root.obj_game.game_name) + "&source=") + type) + "&h=") + myName);
getURL (url, "_blank");
}
function ghinit() {
lccheck();
lctimer = setInterval(lccheck, 5000);
}
function lccheck() {
LCrec.connect("gamingsession" + gmid);
LCsend = new LocalConnection();
LCsend.send("gamingsession" + gmid, "kill", my_key);
countlc = countlc + 1;
if (countlc > 5) {
clearInterval(lctimer);
}
}
function pluginMessageReceived(plugin, action, ob) {
if (action eq "sendAndLoad_callback") {
if (ob.done == 1) {
if (ob.gmsess) {
gmsess = ob.gmsess;
trace(gmsess);
_root.gotoAndStop("teaser");
} else {
mcPath.gotoAndStop("score_top10");
gmsess = ob.newgmsess;
trace("newgmsess----->" + gmsess);
}
clearInterval(intervalId);
}
}
}
function get_gmsess() {
trace("CALLED");
var ob = new Object();
mydata = "getgmsess";
ob.mydata = mydata;
ob.username = unm;
ob.gmid = gmid;
es.pluginRequest("db_single", "blank", ob);
}
function doit6() {
function joinRoom() {
var roomOb = new Object();
roomOb.roomName = roomselected;
roomOb.zone = zoneselected;
roomOb.plugins = new Array();
roomOb.plugins.push({name:"db_single"});
es.createRoom(roomOb);
}
loader.connecting.statusmsg = "Connecting to server...";
roomselected = ("lobby" + gmid) + unm;
zoneselected = "gaminghungama" + gmid;
es.roomJoined = function (success, error) {
if (success) {
trace("Connected and joined the room");
connecting.statusmsg = "Loading data...";
if (!dc) {
get_gmsess();
intervalId = setInterval(get_gmsess, 15000);
}
} else {
loader.connecting.statusmsg = error;
delete error;
loader.connecting.gotoAndStop(2);
}
};
joinRoom();
}
function doit5() {
es.loggedIn = function (success, error) {
loader.connecting.statusmsg = "Connecting to server...";
if (success) {
doit6();
} else {
error_log = error;
doit3();
}
};
loader.band.gotoAndStop(101);
}
function doit4() {
function loginClicked() {
var username = (unm + gmid);
nigol = username;
var password = " ";
if ((username.length > 0) && (username.length < 35)) {
es.login(username);
doit5();
}
}
if (error_log) {
var ob = new Object();
ob.login = nigol;
es.pluginRequest("KickPlugin", "Kickout", ob);
var ob = new Object();
ob.login = nigol;
ob.error = (error_log + "\r") + newline;
es.pluginRequest("ErrorPlugin", "Save", ob);
delete error_log;
}
clearInterval(intervalId0);
loginClicked();
}
function doit3() {
function connect() {
es.connect();
}
loader.connecting.statusmsg = "Connecting to server...";
es.onConnection = function (success, error) {
if (success) {
clearInterval(intervalId0);
doit4();
} else {
loader.connecting.statusmsg = error;
loader.connecting.gotoAndStop(2);
}
};
es.setIP(ip);
es.setPort(port);
System.security.loadPolicyFile((("xmlsocket://" + ip) + ":") + port);
clearInterval(intervalId0);
intervalId0 = setInterval(connect, 15000);
connect();
loader.band.gotoAndStop(101);
}
function initPlugin() {
es.pluginMessageReceived = pluginMessageReceived;
loader.connecting.statusmsg = "Connecting to server...";
serverSettings = new XML();
serverSettings.ignoreWhite = true;
serverSettings.load(pth2 + "Config.xml");
serverSettings.onLoad = function () {
for (all in this.firstChild.childNodes) {
for (all in this.firstChild.childNodes) {
_root[this.firstChild.childNodes[all].nodeName] = this.firstChild.childNodes[all].firstChild.toString();
}
}
doit3();
};
}
function submitScore() {
var ob = new Object();
mydata = "submitpoints";
ob.mydata = mydata;
ob.username = unm;
ob.gmsess = gmsess;
ob.gmid = gmid;
ob.score = obj_game.score;
ob.tim = obj_game.scoreshow;
ob.pnt = obj_game.point;
trace("--------------------");
trace(ob.gmsess);
trace(ob.gmid);
trace(ob.score);
trace(ob.pnt);
trace("--------------------");
es.pluginRequest("db_single", "blank", ob);
}
function checkSubmit(mc) {
mcPath = mc;
trace(mcPath + "==================");
intervalId = setInterval(submitScore, 15000);
submitScore();
}
function serverClosed() {
dc = true;
doit3();
trace("Disconnected");
}
function getTop10(mc) {
dataload = new LoadVars();
dataload.gmid = _root.gmid;
dataload.tim = 0;
dataload.sendAndLoad("http://www.gaminghungama.com/getSingleToppers.php3", dataload, "POST");
dataload.onLoad = function (success) {
if (success) {
if (dataload.done == 1) {
toppers = dataload.toppers;
topscore = dataload.topscore;
mc.gotoAndStop("top_ten");
}
} else {
dataload.sendAndLoad("http://www.gaminghungama.com/getSingleToppers.php3", dataload, "POST");
}
};
stop();
}
function funPlayagain() {
gotoAndPlay ("startScreen");
}
trace("Game Config");
var obj_game = new Object();
obj_game.game_name = "fuddle";
obj_game.game_name = "fuddle";
obj_game.game_id = "71";
obj_game.min_score = 200;
obj_game.score = 0;
obj_game.game_clickurl = "http://www.gaminghungama.com/?" + obj_game.game_name;
obj_game.scoreshow = 0;
obj_game.showTeaser = true;
obj_game.showPreroll = true;
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
var alien;
var myURL = this._url;
var myLink = obj_game.game_clickurl;
var mySound = new Sound();
var sndDelay = 5;
var sndstate = "on";
var sndstatenum = 1;
var myName = "";
trace("function");
var tArr1 = myURL.split("http://");
if (tArr1.length == 2) {
var tArr2 = myURL.split("gaminghungama.com/");
if (tArr2.length == 2) {
myName = "gh";
alien = false;
} else {
myName = "alien";
trace("Aliean");
alienManager();
alien = true;
}
} else {
myName = "alien";
alienManager();
alien = true;
}
hideMenu();
LCrec = new LocalConnection();
my_key = random(999999);
LCrec.kill = function (got_key) {
if (got_key != my_key) {
_visible = false;
getURL ("javascript:window.close();");
}
};
if (!alien) {
ghinit();
}
var mcPath;
var es = ElectroServer.getInstance();
dc = false;
pth = _url;
pth1 = pth.lastIndexOf("/");
pth2 = pth.slice(0, pth1 + 1);
es.connectionClosed = serverClosed;
var levelRecord = SharedObject.getLocal("Levels", "/");
var bestLevel;
Frame 10
function preLoad() {
total = _root.getBytesTotal();
this.onEnterFrame = function () {
byteloaded = _root.getBytesLoaded();
var per = Math.round((byteloaded / total) * 100);
loader.gotoAndStop(per);
if (per >= 100) {
if (!alien) {
loader.gotoAndStop("server_connect");
_root.initPlugin();
} else {
gotoAndStop ("teaser");
}
this.onEnterFrame = null;
}
};
}
played = false;
lvl = 1;
select = 0;
playedArr = [];
preLoad();
stop();
Frame 17
stop();
Frame 23
stop();
Frame 36
stop();
Frame 50
trace("Lvl count : : : " + lvl);
played = true;
_root.obj_game.score = tot_sco;
_root.t_score = tot_sco;
if ((_root.t_score >= 10) and (_root.t_score < 99)) {
_root.obj_game.point = 5;
} else if ((_root.t_score >= 100) and (_root.t_score < 599)) {
_root.obj_game.point = 10;
} else if ((_root.t_score >= 600) and (_root.t_score < 999)) {
_root.obj_game.point = 15;
} else if ((_root.t_score >= 1000) and (_root.t_score < 1299)) {
_root.obj_game.point = 20;
} else if (_root.t_score >= 1300) {
_root.obj_game.point = 25;
}
stop();
Symbol 10 MovieClip [ripple_dup] Frame 1
stop();
Symbol 10 MovieClip [ripple_dup] Frame 39
Symbol 581 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.6");
}
static function showPreGameAd(options) {
var DEFAULTS = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = _getRes(options);
var w = wh[0];
var h = wh[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = w * -0.5;
chk._y = h * -0.5;
var bar = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
bar._visible = false;
delete options.no_progress_bar;
} else {
bar._x = 10;
bar._y = h - 20;
}
var bar_color = options.color;
delete options.color;
var bar_background = options.background;
delete options.background;
var bar_outline = options.outline;
delete options.outline;
var backing = bar.createEmptyMovieClip("_outline", 1);
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(w - 20, 0);
backing.lineTo(w - 20, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside = bar.createEmptyMovieClip("_inside", 2);
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(w - 20, 0);
inside.lineTo(w - 20, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside._xscale = 0;
var outline = bar.createEmptyMovieClip("_outline", 3);
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(w - 20, 0);
outline.lineTo(w - 20, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var p = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0) {
this._parent._alpha = p;
} else {
var _clip = this._parent._parent;
MochiAd.unload(_clip);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _chk = this.mc._mochiad_wait;
_chk.server_control = true;
_chk.started = getTimer();
_chk.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _clip = this._parent._parent;
var ad_clip = this._parent._mochiad_ctr;
var elapsed = (getTimer() - this.started);
var finished = false;
var clip_total = _clip.getBytesTotal();
var clip_loaded = _clip.getBytesLoaded();
var clip_pcnt = ((100 * clip_loaded) / clip_total);
var ad_pcnt = ((100 * elapsed) / chk.ad_msec);
var _inside = this._mochiad_bar._inside;
var pcnt = Math.min(100, Math.min(clip_pcnt || 0, ad_pcnt));
pcnt = Math.max(this.last_pcnt, pcnt);
this.last_pcnt = pcnt;
_inside._xscale = pcnt;
options.ad_progress(pcnt);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:clip_pcnt});
if (clip_pcnt == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var total = ad_clip.getBytesTotal();
if ((total > 0) || (typeof(total) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((elapsed > chk.ad_timeout) && (clip_pcnt == 100)) {
options.ad_failed();
finished = true;
}
}
if (elapsed > chk.ad_msec) {
finished = true;
}
if (((clip_total > 0) && (clip_loaded >= clip_total)) && (finished)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var DEFAULTS = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = _getRes(options);
var w = wh[0];
var h = wh[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var sendHostProgress = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var ad_clip = this._parent._mochiad_ctr;
var elapsed = (getTimer() - this.started);
var finished = false;
if (!chk.showing) {
var total = ad_clip.getBytesTotal();
if ((total > 0) || (typeof(total) == "undefined")) {
finished = true;
chk.showing = true;
chk.started = getTimer();
} else if (elapsed > chk.ad_timeout) {
options.ad_failed();
finished = true;
}
}
if (finished) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var DEFAULTS = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = _getRes(options);
var w = wh[0];
var h = wh[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var p = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0) {
this._parent._alpha = p;
} else {
var _clip = this._parent._parent;
MochiAd.unload(_clip);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _chk = this.mc._mochiad_wait;
_chk.server_control = true;
_chk.started = getTimer();
_chk.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var ad_clip = this._parent._mochiad_ctr;
var elapsed = (getTimer() - this.started);
var finished = false;
if (!chk.showing) {
var total = ad_clip.getBytesTotal();
if ((total > 0) || (typeof(total) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (elapsed > chk.ad_timeout) {
options.ad_failed();
finished = true;
}
}
if (elapsed > chk.ad_msec) {
finished = true;
}
if (finished) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var hostname = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(hostname);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(hostname);
}
}
return(hostname);
}
static function load(options) {
var DEFAULTS = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, DEFAULTS);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var clip = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (clip._mochiad_loaded) {
return(null);
}
var depth = options.depth;
delete options.depth;
var mc = clip.createEmptyMovieClip("_mochiad", depth);
var wh = _getRes(options);
options.res = (wh[0] + "x") + wh[1];
options.server = options.server + options.id;
delete options.id;
clip._mochiad_loaded = true;
var lv = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var k in options) {
lv[k] = options[k];
}
var server = lv.server;
delete lv.server;
var hostname = _allowDomains(server);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var lc = new LocalConnection();
var name = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
lc.mc = mc;
lc.name = name;
lc.hostname = hostname;
lc.allowDomain = function (d) {
return(true);
};
lc.allowInsecureDomain = lc.allowDomain;
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
lv.loadMovie(server + ".swf", "POST");
return(mc);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var o = System.security;
if (o.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var b = options.clip.getBounds();
var w = 0;
var h = 0;
if (typeof(options.res) != "undefined") {
var xy = options.res.split("x");
w = parseFloat(xy[0]);
h = parseFloat(xy[1]);
} else {
w = b.xMax - b.xMin;
h = b.yMax - b.yMin;
}
if ((w == 0) || (h == 0)) {
w = Stage.width;
h = Stage.height;
}
return([w, h]);
}
static function _parseOptions(options, defaults) {
var optcopy = {};
for (var k in defaults) {
optcopy[k] = defaults[k];
}
if (options) {
for (var k in options) {
optcopy[k] = options[k];
}
}
if (_root.mochiad_options) {
var pairs = _root.mochiad_options.split("&");
var i = 0;
while (i < pairs.length) {
var kv = pairs[i].split("=");
optcopy[unescape(kv[0])] = unescape(kv[1]);
i++;
}
}
if (optcopy.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(optcopy);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
return;
case "getValue" :
var val = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, val);
return;
case "runMethod" :
var ret = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, ret);
return;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var nameArray = objectName.split(".");
var i;
i = 0;
while (i < (nameArray.length - 1)) {
if ((base[nameArray[i]] == undefined) || (base[nameArray[i]] == null)) {
return(undefined);
}
base = base[nameArray[i]];
i++;
}
base[nameArray[i]] = value;
}
static function getValue(base, objectName) {
var nameArray = objectName.split(".");
var i;
i = 0;
while (i < (nameArray.length - 1)) {
if ((base[nameArray[i]] == undefined) || (base[nameArray[i]] == null)) {
return(undefined);
}
base = base[nameArray[i]];
i++;
}
return(base[nameArray[i]]);
}
static function runMethod(base, methodName, argsArray) {
var nameArray = methodName.split(".");
var i;
i = 0;
while (i < (nameArray.length - 1)) {
if ((base[nameArray[i]] == undefined) || (base[nameArray[i]] == null)) {
return(undefined);
}
base = base[nameArray[i]];
i++;
}
if (typeof(base[nameArray[i]]) == "function") {
return(base[nameArray[i]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 582 MovieClip [__Packages.ElectroServer] Frame 0
class ElectroServer extends XMLSocket
{
static var _instance;
var buddyList, connectionClosed, moderatorLabel, ip, port, zone, inGame, myUser, username, password, configurationLoaded, pendingRoom, auto_join, joiningRoom, pendingZone, ConnectedToServer, onConnection, rawMessageReceived, onConnect, onXML, loggedIn, allZonesLoaded, userLocationLoaded, usersInRoomLoaded, buddyLoggedOut, buddyLoggedIn, configXML, userVariableUpdated, roomVariablesUpdated, roomJoined, userListUpdated, isGameMaster, usersRenumbered, moveReceived, messageReceived, onRoomsInZoneLoaded, zoneChanged, roomListUpdated, pluginMessageReceived, loggedInUserCountUpdated, onGetServerTime, zoneUpdated;
function ElectroServer () {
super();
buddyList = new Array();
}
function ValidateVersion(Major, Minor, Sub) {
var ReturnVal = true;
if ((MajorVersion > Major) || (isNaN(Major))) {
ReturnVal = false;
} else if ((MinorVersion > Minor) && (MajorVersion == Major)) {
ReturnVal = false;
} else if ((SubVersion > Sub) && (MinorVersion == Minor)) {
ReturnVal = false;
}
return(ReturnVal);
}
function onClose() {
isConnected = false;
connectionClosed(true);
}
function removeBuddy(name) {
var i = 0;
while (i < buddyList.length) {
if (buddyList[i].username == name) {
buddyList.splice(i, 1);
break;
}
i++;
}
var action = "DeleteFriend";
var parameters = (("<FriendName>" + name) + "</FriendName>");
send(action, parameters);
}
function getUsersInRoom(zone, room) {
var action = "GetUsersInRoom";
var parameters = (((("<Zone>" + zone) + "</Zone><Room>") + room) + "</Room>");
send(action, parameters);
}
function getUserLocation(name) {
var action = "GetUserLocation";
var parameters = (("<UserName>" + name) + "</UserName>");
send(action, parameters);
}
function getBuddyList() {
return(buddyList);
}
function addBuddy(name) {
var buddyExists = false;
var i = 0;
while (i < buddyList.length) {
if (buddyList[i].username == name) {
buddyExists = true;
break;
}
i++;
}
if (!buddyExists) {
var ob = new Object();
ob.isOnline = false;
ob.username = name;
ob.status = "offline";
ob.label = (ob.username + " ") + ob.status;
buddyList.push(ob);
var action = "AddFriend";
var parameters = (("<FriendName>" + name) + "</FriendName>");
send(action, parameters);
}
}
function close() {
super.close();
connectionClosed(false);
}
function getServerTime() {
var action = "GetServerTime";
var parameters = "";
send(action, parameters);
}
function getLoggedInUserCount() {
var action = "GetLoggedInUserCount";
var parameters = "";
send(action, parameters);
}
function setModeratorLabel(val, str) {
showModeratorLabel = val;
moderatorLabel = str;
if (str == undefined) {
moderatorLabel = " [Moderator]";
}
}
static function getInstance() {
if (_instance == null) {
_instance = new ElectroServer();
}
return(_instance);
}
function setDebug(val) {
debug = val;
}
function getDebug() {
return(debug);
}
function getIP() {
return(ip);
}
function getPort() {
return(port);
}
function setIP(tempIP) {
ip = tempIP;
}
function setPort(tempPort) {
port = tempPort;
}
function deleteRoomVariable(name) {
var action = "DeleteRoomVariable";
var parameters = (("<RoomVariable ><Name>" + name) + "</Name></RoomVariable>");
send(action, parameters);
}
function getRoomsInZone(tmp_zone) {
var action = "GetRoomsInZone";
var parameters = (("<Zone>" + tmp_zone) + "</Zone>");
send(action, parameters);
}
function changeRoomDetail(detail, value) {
var action = "ChangeRoomDetails";
var minorAction;
var field;
detail = detail.toLowerCase();
var pwordXML = "";
if (detail == "description") {
minorAction = "ChangeDescription";
field = "Description";
value.attributes.isGameRoom = true;
var wddxOb = new Wddx();
var descXML = (("<![CDATA[" + wddxOb.serialize(value)) + "]]>");
} else if (detail == "updatable") {
minorAction = "ChangeUpdatable";
field = "Updatable";
var descXML = value;
} else if (detail == "hidden") {
minorAction = "ChangeVisibility";
field = "Hidden";
var descXML = value;
} else if (detail == "capacity") {
minorAction = "ChangeCapacity";
field = "Capacity";
if ((value == undefined) || (value == 0)) {
value = -1;
}
var descXML = value;
} else if (detail == "password") {
minorAction = "ChangePasswordProtected";
field = "Password";
var descXML = value;
var protected;
if (value == undefined) {
value = "";
}
if (value.length >= 1) {
protected = true;
} else {
protected = false;
}
pwordXML = ("<IsProtected>" + protected) + "</IsProtected>";
}
var parameters = (((((((((("<MinorAction>" + minorAction) + "</MinorAction>") + pwordXML) + "<") + field) + ">") + descXML) + "</") + field) + ">");
send(action, parameters);
}
function kick(name, reason) {
if (reason == undefined) {
reason = "";
}
var action = "ModeratorCommand";
var parameters = (((("<MinorAction>Kick</MinorAction><UserName>" + name) + "</UserName><Reason>") + reason) + "</Reason>");
send(action, parameters);
}
function ban(name, reason, expires) {
if (reason == undefined) {
reason = "";
}
if (expires == undefined) {
expires = "-1";
}
var action = "ModeratorCommand";
var parameters = (((((("<MinorAction>Ban</MinorAction><UserName>" + name) + "</UserName><Reason>") + reason) + "</Reason><Expires>") + expires) + "</Expires>");
send(action, parameters);
}
function createUserVariable(name, value) {
var action = "UpdateUserVariable";
var parameters = (((("<MinorAction>Create</MinorAction><Name>" + name) + "</Name><Data>") + value) + "</Data>");
send(action, parameters);
}
function getAllZones() {
send("GetAllZones", "");
}
function updateUserVariable(name, value) {
var action = "UpdateUserVariable";
var parameters = (((("<MinorAction>Update</MinorAction><Name>" + name) + "</Name><Data>") + value) + "</Data>");
send(action, parameters);
}
function deleteUserVariable(name, value) {
var action = "UpdateUserVariable";
var parameters = (("<MinorAction>Delete</MinorAction><Name>" + name) + "</Name>");
send(action, parameters);
}
function createRoomVariable(ob) {
var name = ob.name;
var data = ob.data;
var persistent = ob.persistent;
var locked = ob.locked;
if (persistent == undefined) {
persistent = false;
}
if (locked == undefined) {
locked = false;
}
if (zone.myRoom.roomVariables[name] == undefined) {
var action = "CreateRoomVariable";
var parameters = (((((((("<RoomVariable Persistent=\"" + persistent) + "\" Locked=\"") + locked) + "\" ><Name>") + name) + "</Name><Data><![CDATA[") + data) + "]]></Data></RoomVariable>");
} else {
var action = "UpdateRoomVariable";
var parameters = (((((("<RoomVariable Locked=\"" + locked) + "\" ><Name>") + name) + "</Name><Data><![CDATA[") + data) + "]]></Data></RoomVariable>");
}
send(action, parameters);
}
function getZone() {
return(zone);
}
function sendMove(who, ob) {
var wddxOb = new Wddx();
var moveXML = wddxOb.serialize(ob);
if (who.toLowerCase() == "all") {
var action = "SendPublicMessage";
var parameters = (("<Message><![CDATA[" + moveXML) + "]]></Message><Variables><Variable><Name>Action</Name><Data>Move</Data></Variable><Variable><Name>MoveType</Name><Data>Public</Data></Variable></Variables>");
} else {
var action = "SendPrivateMessage";
var users = who;
var usersXML = "<Users>";
var i = 0;
while (i < users.length) {
var user = users[i];
usersXML = usersXML + (("<User>" + user) + "</User>");
i++;
}
usersXML = usersXML + "</Users>";
var parameters = (((usersXML + "<Message><![CDATA[") + moveXML) + "]]></Message><Variables><Variable><Name>Action</Name><Data>Move</Data></Variable><Variable><Name>MoveType</Name><Data>Public</Data></Variable></Variables>");
}
send(action, parameters);
}
function pluginRequest(plugin, method, parameters) {
var action = "ExecutePlugin";
var variableXML = "<Variables />";
if (parameters != undefined) {
variableXML = "<Variables>";
for (var i in parameters) {
variableXML = variableXML + (((("<Variable><Name>" + i) + "</Name><Value>") + parameters[i]) + "</Value></Variable>");
}
variableXML = variableXML + "</Variables>";
}
var params = ((((("<Plugin>" + plugin) + "</Plugin><Method>") + method) + "</Method>") + variableXML);
send(action, params);
}
function getRoomVariables() {
return(zone.myRoom.roomVariables);
}
function getRoomList() {
return(zone.rooms);
}
function getRoom() {
return(zone.myRoom);
}
function getUserList() {
return(zone.users);
}
function createGameRoom(roomOb) {
if (roomOb.attributes == undefined) {
roomOb.attributes = new Object();
}
roomOb.attributes.isGameRoom = true;
if (roomOb.updatable != true) {
roomOb.updatable = false;
}
roomOb.numbered = true;
createRoom(roomOb);
inGame = true;
}
function joinGame(room, password, type, zone) {
type = type.toLowerCase();
if ((type == "player") || (type == undefined)) {
var numbered = true;
} else if (type == "spectator") {
var numbered = false;
}
joinRoom(room, password, zone, numbered);
inGame = true;
}
function adminLogin(tempUsername, tempPassword) {
myUser.username = tempUsername;
if (tempPassword == undefined) {
tempPassword = "";
}
myUser.password = tempPassword;
username = myUser.username;
password = myUser.password;
var action = "AdminLogin";
var parameters = (((("<Name>" + myUser.username) + "</Name><Password>") + myUser.password) + "</Password>");
send(action, parameters);
}
function loadConfiguration() {
var action = "LoadConfiguration";
var parameters = "";
send(action, parameters);
}
function parseConfig(config) {
XML.prototype.ignoreWhite = true;
var temp = new XML(config);
var params = new Object();
parseParameters(temp.firstChild.childNodes, params);
configurationLoaded(params);
}
function sendMessage(type, message, users, variables) {
var type = type.toLowerCase();
if ((type == "public") || (type == "all")) {
sendPublicMessage(message, users);
} else if (type == "private") {
sendPrivateMessage(message, users, variables);
}
}
function joinRoom(room, password, zoneName, numbered) {
var action = "JoinRoom";
if (numbered == undefined) {
numbered = true;
}
if (password == undefined) {
password = "";
}
if (zoneName == undefined) {
zoneName = getZone().name;
if (zoneName == undefined) {
zoneName = "Chat Area";
}
}
pendingRoom = room;
inGame = false;
var parameters = (((((((("<Zone><Name>" + zoneName) + "</Name><Room><Name>") + room) + "</Name><Password>") + password) + "</Password><Numbered>") + numbered) + "</Numbered></Room></Zone>");
send(action, parameters);
}
function createRoom(roomOb, auto) {
if ((auto == undefined) || (auto == "true")) {
auto = true;
} else {
auto = false;
}
auto_join = auto;
var action = "CreateRoom";
var password = roomOb.password;
var UserVariablesEnabled = roomOb.userVariablesEnabled;
var hidden = roomOb.hidden;
var zoneName = roomOb.zone;
var roomName = roomOb.roomName;
var numbered = roomOb.numbered;
var capacity = roomOb.capacity;
var description = roomOb.description;
var roomVariables = roomOb.roomVariables;
var updatable = roomOb.updatable;
var plugins = roomOb.plugins;
var FloodingFilterEnabled = roomOb.FloodingFilterEnabled;
var descOb = new Object();
if (description == undefined) {
description = roomOb.Description;
if (description == undefined) {
description = "";
}
}
if (FloodingFilterEnabled == undefined) {
FloodingFilterEnabled = false;
}
descOb.description = description;
if (roomOb.attributes != undefined) {
descOb.attributes = roomOb.attributes;
}
var wddxOb = new Wddx();
var descXML = wddxOb.serialize(descOb);
if (zoneName == undefined) {
zoneName = getZone().name;
if (zoneName == undefined) {
zoneName = "Chat Area";
}
}
if (updatable == undefined) {
updatable = true;
}
if (hidden == undefined) {
hidden = false;
}
if (capacity == undefined) {
capacity = -1;
}
if (numbered == undefined) {
numbered = false;
}
if (password == undefined) {
password = "";
}
if (UserVariablesEnabled == undefined) {
UserVariablesEnabled = false;
}
if (roomVariables == undefined) {
var roomVariableXML = "<RoomVariables/>";
} else {
var roomVariableXML = "<RoomVariables>";
var i = 0;
while (i < roomVariables.length) {
var ob = roomVariables[i];
var persistent = ob.persistent;
var locked = ob.locked;
var name = ob.name;
var data = ob.data;
if (persistent == undefined) {
persistent = false;
}
if (locked == undefined) {
locked = false;
}
var str = (((("<RoomVariable Persistent=\"" + persistent) + "\" Locked=\"") + locked) + "\">");
str = str + (("<Name>" + name) + "</Name>");
str = str + (("<Data><![CDATA[" + data) + "]]></Data>");
str = str + "</RoomVariable>";
roomVariableXML = roomVariableXML + str;
i++;
}
roomVariableXML = roomVariableXML + "</RoomVariables>";
}
if (plugins == undefined) {
var pluginXML = "<Plugins />";
} else {
var pluginXML = "<Plugins>";
var i = 0;
while (i < plugins.length) {
var plugin = plugins[i];
var name = plugin.name;
var pluginVariables = plugin.variables;
if (pluginVariables == undefined) {
var pluginVariablesXML = "<Variables />";
} else {
var pluginVariablesXML = "<Variables>";
for (var j in pluginVariables) {
var pluginVarValue = pluginVariables[j];
pluginVariablesXML = pluginVariablesXML + (((("<Variable><Name>" + j) + "</Name><Value>") + pluginVarValue) + "</Value></Variable>");
}
pluginVariablesXML = pluginVariablesXML + "</Variables>";
}
pluginXML = pluginXML + (((("<Plugin><Name>" + name) + "</Name>") + pluginVariablesXML) + "</Plugin>");
i++;
}
pluginXML = pluginXML + "</Plugins>";
}
var parameters = ((((((((((((((((((((((("<Zone><Name>" + zoneName) + "</Name><Room Updatable=\"") + updatable) + "\" Hidden=\"") + hidden) + "\" FloodingFilterEnabled=\"") + FloodingFilterEnabled) + "\" Numbered=\"") + numbered) + "\" UserVariablesEnabled=\"") + UserVariablesEnabled) + "\"><Name>") + roomName) + "</Name><Password>") + password) + "</Password><Description><![CDATA[") + descXML) + "]]></Description><Capacity>") + capacity) + "</Capacity>") + roomVariableXML) + pluginXML) + "</Room></Zone>");
joiningRoom = true;
pendingRoom = roomName;
pendingZone = zoneName;
inGame = false;
send(action, parameters);
}
function sendPublicMessage(message, variables) {
var action = "SendPublicMessage";
var variableXML = "";
for (var i in variables) {
var value = variables[i].toString();
variableXML = variableXML + (((("<Variable><Name>" + i) + "</Name><Data><![CDATA[") + value) + "]]></Data></Variable>");
}
if (variableXML != "") {
variableXML = ("<Variables>" + variableXML) + "</Variables>";
} else {
variableXML = "<Variables />";
}
var parameters = ((("<Message><![CDATA[" + message) + "]]></Message>") + variableXML);
send(action, parameters);
}
function sendPrivateMessage(message, users, variables) {
var action = "SendPrivateMessage";
var usersXML = "<Users>";
var i = 0;
while (i < users.length) {
var user = users[i];
usersXML = usersXML + (("<User>" + user) + "</User>");
i++;
}
usersXML = usersXML + "</Users>";
var variableXML = "";
for (var i in variables) {
var value = variables[i];
variableXML = variableXML + (((("<Variable><Name>" + i) + "</Name><Data><![CDATA[") + value) + "]]></Data></Variable>");
}
if (variableXML != "") {
variableXML = ("<Variables>" + variableXML) + "</Variables>";
} else {
variableXML = "<Variables />";
}
var parameters = ((((usersXML + "<Message>") + message) + "</Message>") + variableXML);
send(action, parameters);
}
function connectionResponse(success) {
ConnectedToServer = true;
if (!ConnectedToServer) {
connectionEstablished(false, "Could not establish a server connection");
}
}
function connectionEstablished(success, reason) {
if (success && (ConnectedToServer)) {
isConnected = true;
onConnection(true);
} else {
onConnection(false, reason);
}
}
function XMLReceived(info) {
var validXML = (info.toString().substr(0, 1) == "<");
if (validXML) {
parseXML(info);
} else {
rawMessageReceived(info.toString());
}
}
function parseXML(data) {
if (getDebug()) {
trace("-----incomming----");
trace(data);
}
var info = data.firstChild.childNodes;
var action = info[0].firstChild.nodeValue;
var parameters = info[1].childNodes;
var params = new Object();
parseParameters(parameters, params);
applyAction(action, params);
}
function isArrayNodeName(nodeName) {
if (nodeNameList[nodeName]) {
return(true);
}
return(false);
}
function terminateHere(xmls) {
return((xmls.childNodes[0].hasChildNodes() ? false : true));
}
function send(action, parameters) {
var message = (((("<XmlDoc><Action>" + action) + "</Action><Parameters>") + parameters) + "</Parameters></XmlDoc>");
if (getDebug()) {
trace("---out going----");
trace(message);
}
super.send(message);
}
function parseParameters(info, parentOb) {
var i = 0;
while (i < info.length) {
var xmls = info[i];
var terminate = terminateHere(xmls);
var nodeName = xmls.nodeName;
if (parentOb instanceof Array) {
var ob = new Object();
parentOb.push(ob);
var ob = parentOb[parentOb.length - 1];
} else {
parentOb[nodeName] = new Object();
var ob = parentOb[nodeName];
}
for (var j in xmls.attributes) {
if (ob.attributes == undefined) {
ob.attributes = new Object();
}
var value = xmls.attributes[j];
if (!isNaN(Number(value))) {
var value = Number(value);
}
if (value.toLowerCase() == "true") {
var value = true;
} else if (value.toLowerCase() == "false") {
var value = false;
}
ob.attributes[j] = value;
}
if (isArrayNodeName(nodeName)) {
ob[nodeName] = new Array();
var ob = ob[nodeName];
}
if (terminate) {
var nodeValue = xmls.firstChild.nodeValue;
if (((!isNaN(Number(nodeValue))) && (nodeValue != undefined)) && (xmls.nodeName != "Message")) {
var nodeValue = Number(nodeValue);
}
ob.value = nodeValue;
} else {
var nodeName = xmls.nodeName;
var children = xmls.childNodes;
parseParameters(children, ob);
}
i++;
}
}
function login(tempUsername, tempPassword) {
username = tempUsername;
if (tempPassword == undefined) {
password = "";
} else {
password = tempPassword;
}
var action = "Login";
var parameters = (((("<Name>" + username) + "</Name><Password>") + password) + "</Password>");
send(action, parameters);
}
function connect() {
onConnect = connectionResponse;
onXML = XMLReceived;
super.connect(getIP(), getPort());
}
function getUser() {
return(myUser);
}
function applyAction(action, params) {
if (action == "ConnectionResponse") {
var Major = Number(params.Version.attributes.Major);
var Minor = Number(params.Version.attributes.Minor);
var Sub = Number(params.Version.attributes.Sub);
if ((params.Result.value == "Accepted") && (ValidateVersion(Major, Minor, Sub))) {
connectionEstablished(true);
} else {
if ((params.Result.value == "Accepted") && (!ValidateVersion(Major, Minor, Sub))) {
var error = "ElectroServer 3 version is too old. Please install latest.";
trace("=====================================================");
trace("===============Error Error Error=====================");
trace("This class file is newer than the version of ElectroServer 3 that you are using.");
trace((((("AS 2.0 Class version: " + MajorVersion) + ".") + MinorVersion) + ".") + SubVersion);
trace((((("ElectroServer version: " + Major) + ".") + Minor) + ".") + Sub);
trace("If it says NaN above, then you definately need to update.");
trace("Visit http://www.electrotank.com/ElectroServer/");
trace("=====================================================");
trace("=====================================================");
} else {
var error = params.Reason.value;
}
connectionEstablished(false, error);
}
} else if (action == "LoginResponse") {
if (params.Result.value.toLowerCase() == "accepted") {
var variables_array = params.Variables.Variables;
loggedIn(true, undefined, variables_array);
} else {
var error = params.Reason.value;
loggedIn(false, error);
}
} else if (action == "GetAllZones") {
var arr = params.Zones.Zones;
var zones = new Array();
var i = 0;
while (i < arr.length) {
var ob = arr[i];
zones.push(ob.value);
i++;
}
allZonesLoaded(zones);
} else if (action == "GetUserLocation") {
var name = params.User.value;
var tmp_zone = params.Zone.value;
var room = params.Room.value;
userLocationLoaded(name, tmp_zone, room);
} else if (action == "GetUsersInRoom") {
var arr = params.Users.Users;
var returnArr = new Array();
var i = 0;
while (i < arr.length) {
var ob = new Object();
ob.username = arr[i].value;
returnArr.push(ob);
i++;
}
usersInRoomLoaded(returnArr, params.Room.value, params.Zone.value);
} else if (action == "FriendLoggedOut") {
var name = params.FriendName.value;
var i = 0;
while (i < buddyList.length) {
var ob = buddyList[i];
if (ob.username == name) {
ob.online = false;
ob.status = "offline";
ob.label = (ob.username + " ") + ob.status;
break;
}
i++;
}
buddyLoggedOut(name);
} else if (action == "FriendLoggedIn") {
var name = params.FriendName.value;
var i = 0;
while (i < buddyList.length) {
var ob = buddyList[i];
if (ob.username == name) {
ob.online = true;
ob.status = "online";
ob.label = (ob.username + " ") + ob.status;
break;
}
i++;
}
buddyLoggedIn(name);
} else if (action == "CreateRoom") {
if (params.Result.value == "Failure") {
var error = params.Reason.value;
if ((error.indexOf("already exists") > -1) && auto_join) {
joinRoom(pendingRoom, "", pendingZone);
}
}
} else if (action == "LoadConfiguration") {
var num_packets = params.NumberOfPackets.value;
var num = params.PacketNumber.value;
var packetData = params.PacketData.value;
if (num == "1") {
configXML = packetData;
} else {
configXML = configXML + packetData;
}
if (num == num_packets) {
parseConfig(configXML);
}
} else if (action == "UpdateUserVariable") {
var users = zone.users;
var ob = params.UserVariable;
var tmp_user = ob.User.value;
var value = ob.Data.value;
var name = ob.Name.value;
var i = 0;
while (i < users.length) {
var tmp = users[i].Name.value;
if (tmp_user == tmp) {
var user = users[i];
var type = typeof(user.userVariables[name]);
if (type.toString() == "undefined") {
if (typeof(user.userVariables.toString()) == "undefined") {
user.userVariables = new Object();
}
user.userVariables[name] = value;
userVariableUpdated(user, "created", name);
} else {
user.userVariables[name] = value;
userVariableUpdated(user, "updated", name);
}
break;
}
i++;
}
} else if (action == "JoinRoom") {
if (params.Result.value == "Success") {
var roomName = pendingRoom;
var roomList = zone.rooms;
var i = 0;
while (i < roomList.length) {
var roomOb = roomList[i];
if (roomOb.Name.value == roomName) {
zone.myRoom = roomOb;
var rv = params.RoomVariables.RoomVariables;
zone.myRoom.roomVariables = new Object();
var j = 0;
while (j < rv.length) {
var name = rv[j].Name.value;
var value = rv[j].Data.value;
zone.myRoom.roomVariables[name] = value;
j++;
}
roomVariablesUpdated("all", zone.myRoom.roomVariables);
break;
}
i++;
}
roomJoined({success:true}, zone.myRoom);
delete pendingRoom;
joiningRoom = false;
zone.users = params.Users.Users;
var i = 0;
while (i < zone.users.length) {
var user = zone.users[i];
user.label = user.Name.value;
if (showModeratorLabel && user.attributes.Moderator) {
user.label = user.label + moderatorLabel;
}
user.data = user;
var uv = user.UserVariables.UserVariables;
user.userVariables = new Object();
var k = 0;
while (k < uv.length) {
var u = uv[k];
var user_var_name = u.Name.value;
var user_var_val = u.Data.value;
user.userVariables[user_var_name] = user_var_val;
k++;
}
if (user.Name.value == username) {
myUser = user;
if (user.AssignedNumber.value == 0) {
user.isGameMaster = true;
}
}
i++;
}
userListUpdated(zone.users, "all");
} else {
var error = params.Reason.value;
roomJoined({success:false, error:error});
}
} else if (action == "RenumberUsers") {
var users = zone.users;
var i = 0;
while (i < params.Users.Users.length) {
var uname = params.Users.Users[i].Name.value;
var j = 0;
while (j < users.length) {
if (uname == users[j].Name.value) {
users[j].AssignedNumber.value = params.Users.Users[i].AssignedNumber.value;
users[j].isGameMaster = false;
}
j++;
}
if (getUser().AssignedNumber.value == 0) {
getUser().isGameMaster = true;
}
i++;
}
if (getUser().AssignedNumber.value == 0) {
isGameMaster = true;
} else {
isGameMaster = false;
}
usersRenumbered(users);
} else if (action == "SendPrivateMessage") {
var message = params.Message.value;
var from = params.User.value;
var variables = new Object();
var i = 0;
while (i < params.Variables.Variables.length) {
var name = params.Variables.Variables[i].Name.value;
var value = params.Variables.Variables[i].Data.value;
variables[name] = value;
i++;
}
if (variables.Action.toLowerCase() == "move") {
var what = message;
var foo = new Wddx();
var ob = foo.deserialize(what);
moveReceived("private", ob, from);
} else {
messageReceived("private", message, from, variables);
}
} else if (action == "SendPublicMessage") {
var message = params.Message.value;
var from = params.User.value;
var variables = new Object();
var i = 0;
while (i < params.Variables.Variables.length) {
var name = params.Variables.Variables[i].Name.value;
var value = params.Variables.Variables[i].Data.value;
variables[name] = value;
i++;
}
if (variables.Action.toLowerCase() == "move") {
var what = message;
var foo = new Wddx();
var ob = foo.deserialize(what);
moveReceived("public", ob, from);
} else {
messageReceived("public", message, from, variables);
}
} else if (action == "GetRoomsInZone") {
var tmp_rooms = params.Zone.Rooms.Rooms;
var show_nums = true;
var roomsToReturn = new Array();
var i = 0;
while (i < tmp_rooms.length) {
var room_name = tmp_rooms[i].Name.value;
var label = "";
if (show_nums) {
label = ((room_name + " (") + tmp_rooms[i].attributes.Users) + ")";
} else {
label = room_name;
}
tmp_rooms[i].label = label;
tmp_rooms[i].iconAlignment = "right";
var WDDXxml = tmp_rooms[i].Description.value;
if (WDDXxml.length > 2) {
var foo = new Wddx();
var ob = foo.deserialize(WDDXxml);
} else {
var ob = new Object();
}
tmp_rooms[i].Description = ob;
i++;
}
onRoomsInZoneLoaded(tmp_rooms, params.Zone.Name.value);
} else if (action == "RoomList") {
var myOldRoom = getRoom();
var oldUsers = getUserList();
zone = new Object();
zone.numUsers = Number(params.Zone.attributes.Users);
zone.name = params.Zone.Name.value;
zone.rooms = params.Zone.Rooms.Rooms;
var i = 0;
while (i < zone.rooms.length) {
var WDDXxml = zone.rooms[i].Description.value;
if (WDDXxml.length > 2) {
var foo = new Wddx();
var ob = foo.deserialize(WDDXxml);
} else {
var ob = new Object();
}
zone.rooms[i].Description = ob;
var room = zone.rooms[i];
room.label = room.Name.value;
room.data = room;
if (myOldRoom.Name.value == room.Name.value) {
zone.rooms[i] = myOldRoom;
zone.myRoom = myOldRoom;
zone.users = oldUsers;
}
i++;
}
zoneChanged(zone.name);
roomListUpdated(zone.rooms, "all");
} else if (action == "UpdateUserList") {
var minorAction = params.MinorAction.value;
if (minorAction == "UserJoined") {
var users = zone.users;
var user = params.User;
var user_name = user.Name.value;
var uv = user.UserVariables.UserVariables;
user.userVariables = new Object();
var k = 0;
while (k < uv.length) {
var u = uv[k];
var user_var_name = u.Name.value;
var user_var_val = u.Data.value;
user.userVariables[user_var_name] = user_var_val;
k++;
}
user.label = user.Name.value;
if (showModeratorLabel && user.attributes.Moderator) {
user.label = user.label + moderatorLabel;
}
user.data = user;
users.push(user);
userListUpdated(zone.users, "userjoined", user.Name.value);
} else if (minorAction == "UserLeft") {
var users = zone.users;
var user = params.User;
var uname = user.Name.value;
var i = 0;
while (i < users.length) {
var name = users[i].Name.value;
if (uname == name) {
users.splice(i, 1);
break;
}
i++;
}
userListUpdated(zone.users, "userleft", user.Name.value);
}
} else if (action == "SendPluginMessage") {
var plugin = params.User.value;
var pluginAction = params.Message.value;
var variables = params.Variables.Variables;
var ob = new Object();
var i = 0;
while (i < variables.length) {
var name = variables[i].Name.value;
var value = variables[i].Value.value;
ob[name] = value;
i++;
}
pluginMessageReceived(plugin, pluginAction, ob);
} else if (action == "UpdateRoomVariable") {
var minorAction = params.MinorAction.value;
if (minorAction == "Create") {
var name = params.RoomVariable.Name.value;
var value = params.RoomVariable.Data.value;
zone.myRoom.roomVariables[name] = value;
roomVariablesUpdated("created", zone.myRoom.roomVariables, name);
} else if (minorAction == "Update") {
var name = params.RoomVariable.Name.value;
var value = params.RoomVariable.Data.value;
zone.myRoom.roomVariables[name] = value;
roomVariablesUpdated("updated", zone.myRoom.roomVariables, name);
} else if (minorAction == "Delete") {
var name = params.RoomVariable.Name.value;
delete zone.myRoom.roomVariables[name];
roomVariablesUpdated("deleted", zone.myRoom.roomVariables, name);
}
} else if (action == "GetLoggedInUserCount") {
var num = Number(params.LoggedInUsers.value);
loggedInUserCountUpdated(num);
} else if (action == "GetServerTime") {
var num = Number(params.ServerTime.value);
onGetServerTime(num);
} else if (action == "UpdateRoomList") {
var minorAction = params.MinorAction.value;
zone.numUsers = Number(params.Zone.attributes.Users);
zoneUpdated(zone.numUsers);
var newRoomOb = params.Zone.Rooms.Rooms[0];
if (minorAction == "ChangeRoomDetails") {
var j = 0;
while (j < zone.rooms.length) {
var roomOb = zone.rooms[j];
if (roomOb.Name.value == newRoomOb.Name.value) {
roomOb.label = roomOb.Name.value;
roomOb.data = roomOb;
for (var i in newRoomOb) {
roomOb[i] = newRoomOb[i];
}
var WDDXxml = newRoomOb.Description.value;
if (WDDXxml.length > 2) {
var foo = new Wddx();
var ob = foo.deserialize(WDDXxml);
} else {
var ob = new Object();
}
roomOb.Description = ob;
break;
}
j++;
}
roomListUpdated(zone.rooms, "roomupdated", roomOb);
} else if (minorAction == "CreateRoom") {
var roomOb = newRoomOb;
roomOb.label = roomOb.Name.value;
roomOb.data = roomOb;
var WDDXxml = roomOb.Description.value;
var foo = new Wddx();
var ob = foo.deserialize(WDDXxml);
roomOb.Description = ob;
zone.rooms.push(roomOb);
roomListUpdated(zone.rooms, "roomcreated", roomOb);
} else if (minorAction == "DeleteRoom") {
var j = 0;
while (j < zone.rooms.length) {
var roomOb = zone.rooms[j];
if (roomOb.Name.value == newRoomOb.Name.value) {
var deleteIt = true;
var name = newRoomOb.Name.value;
if ((name == getRoom().Name.value) && (!joiningRoom)) {
deleteIt = false;
}
if (deleteIt) {
zone.rooms.splice(j, 1);
}
break;
}
j++;
}
roomListUpdated(zone.rooms, "RoomDeleted", name);
}
}
}
var MajorVersion = 3;
var MinorVersion = 2;
var SubVersion = 0;
var debug = false;
var showModeratorLabel = false;
var nodeNameList = {Users:true, Zones:true, UserVariables:true, RoomVariables:true, Rooms:true, Variables:true, BannedUsers:true, Plugins:true, Moderators:true, Words:true, RootWords:true, Templates:true};
var isConnected = false;
}
Symbol 583 MovieClip [__Packages.Wddx] Frame 0
class Wddx
{
var tzOffset, timezoneString, wddxPacket, packet, useTimeZoneInfo;
function Wddx () {
var i = 0;
while (i < 256) {
if ((((i < 32) && (i != 9)) && (i != 10)) && (i != 13)) {
var hex = i.toString(16);
if (hex.length == 1) {
hex = "0" + hex;
}
et[i] = ("<char code='" + hex) + "'/>";
at[i] = "";
} else if (i < 128) {
et[i] = chr(i);
at[i] = chr(i);
} else {
et[i] = ("&#x" + i.toString(16)) + ";";
etRev[("&#x" + i.toString(16)) + ";"] = chr(i);
at[i] = ("&#x" + i.toString(16)) + ";";
atRev[("&#x" + i.toString(16)) + ";"] = chr(i);
}
i++;
}
et[60] = "<";
et[62] = ">";
et[38] = "&";
etRev["<"] = "<";
etRev[">"] = ">";
etRev["&"] = "&";
at[60] = "<";
at[62] = ">";
at[38] = "&";
at[39] = "'";
at[34] = """;
atRev["<"] = "<";
atRev[">"] = ">";
atRev["&"] = "&";
atRev["'"] = "'";
atRev["""] = "\"";
tzOffset = new Date().getTimezoneOffset();
if (tzOffset >= 0) {
timezoneString = "-";
} else {
timezoneString = "+";
}
timezoneString = timezoneString + ((Math.floor(Math.abs(tzOffset) / 60) + ":") + (Math.abs(tzOffset) % 60));
}
function serialize(rootObj) {
delete wddxPacket;
var temp = new XML();
packet = new XML();
packet.appendChild(temp.createElement("wddxPacket"));
wddxPacket = packet.firstChild;
wddxPacket.attributes.version = "1.0";
wddxPacket.appendChild(temp.createElement("header"));
wddxPacket.appendChild(temp.createElement("data"));
if (serializeValue(rootObj, wddxPacket.childNodes[1])) {
return(packet);
}
return(null);
}
function serializeValue(obj, node) {
var bSuccess = true;
var val = obj.valueOf();
var tzString = null;
var temp = new XML();
if (obj == null) {
node.appendChild(temp.createElement("null"));
} else if (typeof(val) == "string") {
serializeString(val, node);
} else if (typeof(val) == "number") {
if (typeof(obj.getTimezoneOffset) == "function") {
if (useTimeZoneInfo) {
tzString = timezoneString;
}
node.appendChild(temp.createElement("dateTime"));
node.lastChild.appendChild(temp.createTextNode(((((((((((obj.getFullYear() + "-") + (obj.getMonth() + 1)) + "-") + obj.getDate()) + "T") + obj.getHours()) + ":") + obj.getMinutes()) + ":") + obj.getSeconds()) + tzString));
} else {
node.appendChild(new XML().createElement("number"));
node.lastChild.appendChild(new XML().createTextNode(val));
}
} else if (typeof(val) == "boolean") {
node.appendChild(temp.createElement("boolean"));
node.lastChild.attributes.value = val;
} else if (typeof(obj) == "object") {
if (typeof(obj.wddxSerialize) == "function") {
bSuccess = obj.wddxSerialize(this, node);
} else if ((typeof(obj.join) == "function") && (typeof(obj.reverse) == "function")) {
node.appendChild(temp.createElement("array"));
node.lastChild.attributes.length = obj.length;
var i = 0;
while (bSuccess && (i < obj.length)) {
bSuccess = serializeValue(obj[i], node.lastChild);
i++;
}
} else {
node.appendChild(temp.createElement("struct"));
if (typeof(obj.wddxSerializationType) == "string") {
node.lastChild.attributes.type = obj.wddxSerializationType;
}
for (var prop in obj) {
if (prop != "wddxSerializationType") {
bSuccess = serializeVariable(prop, obj[prop], node.lastChild);
if (!bSuccess) {
break;
}
}
}
}
} else {
bSuccess = false;
}
return(bSuccess);
}
function serializeVariable(name, obj, node) {
var bSuccess = true;
var temp = new XML();
if (typeof(obj) != "function") {
node.appendChild(temp.createElement("var"));
node.lastChild.attributes.name = (preserveVarCase ? (serializeAttr(name)) : (serializeAttr(name.toLowerCase())));
bSuccess = serializeValue(obj, node.lastChild);
}
return(bSuccess);
}
function serializeString(s, node) {
var tempString = "";
var temp = new XML();
var max = s.length;
node.appendChild(temp.createElement("string"));
var i = 0;
while (i < max) {
var char = (substring(s, i + 1, 1));
tempString = tempString + et[ord(substring(s, i + 1, 1))];
i++;
}
node.lastChild.appendChild(temp.createTextNode(tempString));
}
function serializeAttr(s) {
var tempString = "";
var max = s.length;
var i = 0;
while (i < max) {
tempString = tempString + at[ord(substring(s, i + 1, 1))];
i++;
}
return(tempString);
}
function deserialize(wddxPacket) {
if (typeof(wddxPacket) != "object") {
wddxPacket = new XML(wddxPacket);
}
var wddxRoot = new XML();
var wddxChildren = new Array();
var temp;
var dataObj = new Object();
while (wddxPacket.nodeName == null) {
wddxPacket = wddxPacket.firstChild;
}
wddxRoot = wddxPacket;
if (wddxRoot.nodeName.toLowerCase() == "wddxpacket") {
wddxChildren = wddxRoot.childNodes;
temp = 0;
while ((wddxChildren[temp].nodeName.toLowerCase() != "data") && (temp < wddxChildren.length)) {
temp++;
}
if (temp < wddxChildren.length) {
dataObj = deserializeNode(wddxChildren[temp].firstChild);
return(dataObj);
}
return(null);
}
return(null);
}
function deserializeNode(node) {
var nodeType = node.nodeName.toLowerCase();
if (nodeType == "number") {
var dataObj = node.firstChild.nodeValue;
return(Number(dataObj));
}
if (nodeType == "boolean") {
var dataObj = (String(node.attributes.value).toLowerCase() == "true");
return(dataObj);
}
if (nodeType == "string") {
var dataObj;
if (node.childNodes.length > 1) {
dataObj = "";
var i = 0;
i = 0;
while (i < node.childNodes.length) {
if (node.childNodes[i].nodeType == 3) {
dataObj = dataObj + deserializeString(node.childNodes[i].nodeValue);
} else if (node.childNodes[i].nodeName == "char") {
dataObj = dataObj + chr(parseInt(node.childNodes[i].attributes.code, 16));
}
i++;
}
} else {
dataObj = deserializeString(node.firstChild.nodeValue);
}
return(dataObj);
}
if (nodeType == "array") {
var dataObj = new Array();
var temp = 0;
var i = 0;
while (i < node.attributes.length) {
dataObj[i] = deserializeNode(node.childNodes[i].cloneNode(true));
i++;
}
return(dataObj);
}
if (nodeType == "datetime") {
var dtString = node.firstChild.nodeValue;
var tPos = dtString.indexOf("T");
var tzPos = dtString.indexOf("+");
var dateArray = new Array();
var timeArray = new Array();
var tzArray = new Array();
var dataObj = new Date();
if (tzPos == -1) {
tzPos = dtString.lastIndexOf("-");
if (tzPos < tPos) {
tzPos = -1;
}
}
dateArray = dtString.slice(0, tPos).split("-");
timeArray = dtString.slice(tPos + 1, tzPos).split(":");
tzArray = dtString.slice(tzPos).split(":");
dataObj.setFullYear(parseInt(dateArray[0]), parseInt(dateArray[1]) - 1, parseInt(dateArray[2]));
dataObj.setHours(parseInt(timeArray[0]), parseInt(timeArray[1]));
if (tzPos != -1) {
tzOffset = (parseInt(tzArray[0]) * 60) + parseInt(tzArray[1]);
dataObj.setMinutes(dataObj.getMinutes() - (dataObj.getTimezoneOffset() + tzOffset));
}
return(dataObj);
}
if (nodeType == "struct") {
var dataObj = new Object();
var i = 0;
while (i < node.childNodes.length) {
if (node.childNodes[i].nodeName.toLowerCase() == "var") {
dataObj[deserializeAttr(node.childNodes[i].attributes.name)] = deserializeNode(node.childNodes[i].firstChild);
}
i++;
}
return(dataObj);
}
if (nodeType == "recordset") {
var dataObj = new WddxRecordset(node.attributes.fieldNames.split(",").reverse(), parseInt(node.attributes.rowCount));
var i = (node.childNodes.length - 1);
while (i >= 0) {
if (node.childNodes[i].nodeName.toLowerCase() == "field") {
var attr = deserializeAttr(node.childNodes[i].attributes.name);
dataObj[attr].wddxSerializationType = "field";
var j = (node.childNodes[i].childNodes.length - 1);
while (j >= 0) {
dataObj[attr][j] = new Object();
var tempObj = deserializeNode(node.childNodes[i].childNodes[j]);
dataObj.setField(j, attr, tempObj);
j--;
}
}
i--;
}
return(dataObj);
}
}
function deserializeAttr(attr) {
var max = attr.length;
var i = 0;
var char;
var output = "";
while (i < max) {
char = substring(attr, i + 1, 1);
if (char == "&") {
var buff = char;
do {
char = substring(attr, i + 1, 1);
buff = buff + char;
i++;
} while (char != ";");
output = output + atRev[buff];
} else {
output = output + char;
}
i++;
}
return(output);
}
function deserializeString(str) {
var max = str.length;
var i = 0;
var char;
var output = "";
while (i < max) {
char = substring(str, i + 1, 1);
if (char == "&") {
var buff = char;
do {
i++;
char = substring(str, i + 1, 1);
buff = buff + char;
} while (char != ";");
output = output + etRev[buff];
} else {
output = output + char;
}
i++;
}
return(output);
}
var et = new Object();
var etRev = new Object();
var at = new Object();
var atRev = new Object();
var preserveVarCase = true;
var useTimezoneInfo = true;
}
Symbol 584 MovieClip [__Packages.WddxRecordset] Frame 0
class WddxRecordset
{
function WddxRecordset (arguments) {
if (arguments.length > 0) {
var val;
if (typeof((val = arguments[0].valueOf())) == "boolean") {
preserveFieldCase = arguments[0];
} else {
var cols = arguments[0];
var nLen = 0;
if (arguments.length > 1) {
if (typeof((val = arguments[1].valueOf())) == "boolean") {
preserveFieldCase = arguments[1];
} else {
nLen = arguments[1];
if (arguments.length > 2) {
preserveFieldCase = arguments[2];
}
}
}
var i = 0;
while (i < cols.length) {
var colValue = new Array(nLen);
var j = 0;
while (j < nLen) {
colValue[j] = null;
j++;
}
this[(preserveFieldCase ? (cols[i]) : (cols[i].toLowerCase()))] = colValue;
i++;
}
}
}
}
function duplicate() {
var copy = new WddxRecordset();
for (var i in this) {
if (i.toUpperCase() == "PRESERVEFIELDCASE") {
copy[i] = this[i];
} else if (this[i].isColumn()) {
copy.addColumn(i);
for (var j in this[i]) {
copy.setField(j, i, getField(j, i));
}
}
}
return(copy);
}
function isColumn(name) {
return((typeof(this[name]) == "object") && (name.indexOf("_private_") == -1));
}
function getRowCount() {
var nRowCount = 0;
for (var col in this) {
if (isColumn(col)) {
nRowCount = this[col].length;
break;
}
}
return(nRowCount);
}
function addColumn(name) {
var nLen = getRowCount();
var colValue = new Array(nLen);
var i = 0;
while (i < nLen) {
colValue[i] = null;
i++;
}
this[(preserveFieldCase ? (name) : (name.toLowerCase()))] = colValue;
}
function addRows(n) {
for (var col in this) {
if (isColumn(col)) {
var nLen = this[col].length;
var i = nLen;
while (i < (nLen + n)) {
this[col][i] = "";
i++;
}
}
}
}
function getField(row, col) {
return(this[(preserveFieldCase ? (col) : (col.toLowerCase()))][row]);
}
function setField(row, col, value) {
this[(preserveFieldCase ? (col) : (col.toLowerCase()))][row] = value;
}
function wddxSerialize(serializer, node) {
var colNamesList = "";
var colNames = new Array();
var i = 0;
for (var col in this) {
if (isColumn(col)) {
colNames[i++] = col;
if (colNamesList.length > 0) {
colNamesList = colNamesList + ",";
}
colNamesList = colNamesList + col;
}
}
var nRows = getRowCount();
node.appendChild(new XML().createElement("recordset"));
node.lastChild.attributes.rowCount = nRows;
node.lastChild.attributes.fieldNames = colNamesList;
var bSuccess = true;
i = 0;
while (bSuccess && (i < colNames.length)) {
var name = colNames[i];
node.lastChild.appendChild(new XML().createElement("field"));
node.lastChild.lastChild.attributes.name = name;
var row = 0;
while (bSuccess && (row < nRows)) {
bSuccess = serializer.serializeValue(this[name][row], node.lastChild.lastChild);
row++;
}
i++;
}
return(bSuccess);
}
var preserveFieldCase = true;
}
Symbol 25 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 100
stop();
Symbol 25 MovieClip Frame 101
stop();
Symbol 30 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 38 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 60 MovieClip Frame 107
_root.play();
stop();
Symbol 61 MovieClip Frame 1
_root.showTeaser(this);
stop();
Symbol 61 MovieClip Frame 2
_root.allowClick(this.linkBut);
Symbol 64 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 68 MovieClip Frame 239
_root.play();
stop();
Symbol 69 MovieClip Frame 1
_root.showPreroll(this);
stop();
Symbol 79 MovieClip Frame 1
_root.initSound(this);
stop();
Symbol 106 Button
on (press) {
_parent.gotoAndPlay(2);
}
Symbol 109 Button
on (press) {
gotoAndStop (2);
}
Symbol 124 MovieClip Frame 108
stop();
Symbol 127 MovieClip Frame 1
stop();
Symbol 132 Button
on (release) {
gotoAndStop (1);
}
Symbol 210 MovieClip Frame 1
_parent.back._visible = false;
stop();
Symbol 210 MovieClip Frame 2
_parent.back._visible = true;
Symbol 210 MovieClip Frame 5
_parent.next_but._visible = true;
Symbol 210 MovieClip Frame 6
_parent.next_but._visible = false;
Symbol 214 Button
on (press) {
ins.nextFrame();
}
Symbol 217 Button
on (press) {
ins.prevFrame();
}
Symbol 218 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 53
Symbol 231 MovieClip Frame 38
Symbol 237 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 1
stop();
_parent.fal1.gotoAndPlay(2);
Symbol 250 MovieClip Frame 109
stop();
Symbol 297 MovieClip Frame 1
Symbol 302 MovieClip Frame 1
Symbol 309 MovieClip Frame 1
Symbol 316 MovieClip Frame 1
Symbol 317 MovieClip Frame 1
stop();
Instance of Symbol 101 MovieClip "leaf" in Symbol 317 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 0.5;
}
Instance of Symbol 124 MovieClip "fal1" in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 250 MovieClip "fal2" in Symbol 317 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 317 MovieClip Frame 2
stop();
Instance of Symbol 101 MovieClip "leaf" in Symbol 317 MovieClip Frame 2
onClipEvent (enterFrame) {
this._rotation = this._rotation + 0.5;
}
Symbol 317 MovieClip Frame 3
stop();
Instance of Symbol 124 MovieClip "fal1" in Symbol 317 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 250 MovieClip "fal2" in Symbol 317 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
}
Symbol 317 MovieClip Frame 4
stop();
Symbol 317 MovieClip Frame 5
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 2
this.onEnterFrame = function () {
if (_parent.actscore > 0) {
txt = txt + (_parent.actscore - (_parent.actscore - 1));
_parent.actscore--;
trace(_parent.actscore);
} else {
gotoAndStop (1);
delete onEnterFrame;
}
};
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 8
stop();
Symbol 335 MovieClip Frame 15
_parent.hitme();
Symbol 335 MovieClip Frame 16
Symbol 335 MovieClip Frame 40
stop();
Symbol 336 MovieClip Frame 10
if (_parent._currentframe == _parent._totalframes) {
gotoAndStop (1);
_parent._parent.s1.gotoAndStop(1);
_parent._parent.N_hope._visible = false;
_parent._parent.l_jump._visible = true;
_parent._parent._parent.suicideFlag = true;
} else {
_parent._parent.s1.gotoAndPlay(2);
_parent._parent.N_hope._visible = true;
_parent._parent.l_jump._visible = false;
_parent._parent.drown._visible = false;
gotoAndPlay (1);
}
Symbol 337 MovieClip Frame 1
if (_parent._parent.pauseFlag) {
this.play();
} else {
this.stop();
}
Symbol 337 MovieClip Frame 45
stop();
Symbol 338 MovieClip Frame 38
stop();
Symbol 342 MovieClip Frame 27
stop();
Symbol 344 Button
on (press) {
if (_parent.pauseFlag) {
advance = 0;
drown._visible = false;
powermv.gotoAndStop(2);
delete frogSuicide.onEnterFrame;
frogSuicide.gotoAndStop(1);
}
}
on (release, releaseOutside) {
if (_parent.pauseFlag) {
_parent.s4.gotoAndPlay(2);
l_jump.gotoAndPlay(2);
power = 1.2 * powermv.powerbar._currentframe;
powermv.gotoAndStop(1);
initx = xpos;
inity = ypos;
finalx = _parent.bg.t_l._x;
finaly = _parent.bg.t_l._y;
xspeed = (power * (finalx - initx)) / 35000;
yspeed = (power * (finaly - inity)) / 35000;
power = 0;
moveme();
}
}
Symbol 345 MovieClip Frame 15
stop();
Symbol 346 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 2
this.onEnterFrame = function () {
if (_parent._parent.pauseFlag) {
if (_parent._parent.suicideFlag) {
if (_parent._name != "mc1") {
if (ctr > 0) {
ctr--;
if (ctr == 2) {
_parent._parent.dead++;
_parent._parent.Results();
removeMovieClip("_parent");
}
}
if (_parent.advance == _parent._parent.hold) {
_parent.drown._visible = true;
_parent.l_jump._visible = false;
_parent.N_hope._visible = false;
_parent.but.enabled = false;
if (_parent._xscale >= 100) {
_parent.drown.nextFrame();
if (_parent.drown._currentframe == 14) {
_parent._parent.f_d_s.gotoAndPlay(2);
_parent.drown.play();
}
_parent.scale = _parent.scale - _parent.gravity;
_parent.gravity = _parent.gravity + (_parent.gravity * 0.01);
_parent._xscale = _parent._xscale + (_parent.scale * 2);
_parent._yscale = _parent._yscale + (_parent.scale * 2);
_parent._x = _parent._x + (_parent.tmp_xspeed * _parent._xscale);
_parent._y = _parent._y + (_parent.tmp_yspeed * _parent._yscale);
ctr = 24;
}
} else {
_parent.advance++;
}
}
}
}
};
stop();
Symbol 348 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 8
stop();
Symbol 348 MovieClip Frame 15
_parent.hitme();
Symbol 348 MovieClip Frame 40
stop();
Symbol 349 MovieClip Frame 10
if (_parent._currentframe == _parent._totalframes) {
gotoAndStop (1);
_parent._parent.s2.gotoAndStop(1);
_parent._parent.N_hope._visible = false;
_parent._parent.l_jump._visible = true;
_parent._parent.drown._visible = true;
_parent._parent._parent.suicideFlag = true;
} else {
_parent._parent.s2.gotoAndPlay(2);
_parent._parent.N_hope._visible = true;
_parent._parent.l_jump._visible = false;
_parent._parent.drown._visible = false;
gotoAndPlay (1);
}
Symbol 350 MovieClip Frame 1
if (_parent._parent.pauseFlag) {
this.play();
} else {
this.stop();
}
Symbol 350 MovieClip Frame 45
stop();
Symbol 351 MovieClip Frame 27
stop();
Symbol 352 Button
on (press) {
if (_parent.pauseFlag) {
advance = 0;
drown._visible = false;
powermv.gotoAndStop(2);
delete frogSuicide.onEnterFrame;
frogSuicide.gotoAndStop(1);
}
}
on (release, releaseOutside) {
if (_parent.pauseFlag) {
_parent.s4.gotoAndPlay(2);
l_jump.gotoAndPlay(2);
power = 1 * powermv.powerbar._currentframe;
powermv.gotoAndStop(1);
initx = xpos;
inity = ypos;
finalx = _parent.bg.t_l._x;
finaly = _parent.bg.t_l._y;
xspeed = (power * (finalx - initx)) / 35000;
yspeed = (power * (finaly - inity)) / 35000;
power = 0;
moveme();
}
}
Symbol 355 MovieClip Frame 1
stop();
Symbol 355 MovieClip Frame 8
stop();
Symbol 355 MovieClip Frame 15
_parent.hitme();
Symbol 355 MovieClip Frame 40
stop();
Symbol 356 MovieClip Frame 10
if (_parent._currentframe == _parent._totalframes) {
gotoAndStop (1);
_parent._parent.s3.gotoAndStop(1);
_parent._parent.N_hope._visible = false;
_parent._parent.drown._visible = true;
_parent._parent.l_jump._visible = true;
_parent._parent._parent.suicideFlag = true;
} else {
_parent._parent.s3.gotoAndPlay(2);
_parent._parent.N_hope._visible = true;
_parent._parent.l_jump._visible = false;
_parent._parent.drown._visible = false;
gotoAndPlay (1);
}
Symbol 357 MovieClip Frame 1
if (_parent._parent.pauseFlag) {
this.play();
} else {
this.stop();
}
Symbol 357 MovieClip Frame 45
stop();
Symbol 358 MovieClip Frame 27
stop();
Symbol 359 Button
on (press) {
if (_parent.pauseFlag) {
advance = 0;
drown._visible = false;
powermv.gotoAndStop(2);
delete frogSuicide.onEnterFrame;
frogSuicide.gotoAndStop(1);
}
}
on (release, releaseOutside) {
if (_parent.pauseFlag) {
_parent.s4.gotoAndPlay(2);
l_jump.gotoAndPlay(2);
power = 0.8 * powermv.powerbar._currentframe;
powermv.gotoAndStop(1);
initx = xpos;
inity = ypos;
finalx = _parent.bg.t_l._x;
finaly = _parent.bg.t_l._y;
xspeed = (power * (finalx - initx)) / 35000;
yspeed = (power * (finaly - inity)) / 35000;
power = 0;
moveme();
}
}
Symbol 360 MovieClip Frame 1
function moveme() {
if (_parent.pauseFlag) {
scale = 6;
gravity = 1;
flag = 1;
ctr = 0;
l_ctr = 0;
tarFlag = false;
but.enabled = false;
this.onEnterFrame = function () {
if (ctr > 0) {
ctr--;
if (ctr == 2) {
_parent.Results();
removeMovieClip("");
}
}
if (_xscale >= 100) {
scale = scale - gravity;
gravity = gravity + (gravity * 0.01);
_xscale = (_xscale + (scale * 2));
_yscale = (_yscale + (scale * 2));
_x = (_x + ((xspeed * 2) * _xscale));
_y = (_y + ((yspeed * 2) * _xscale));
shader._x = shader._x - xspeed;
shader._y = shader._y - yspeed;
shader._xscale = shader._xscale + (scale * 0.9);
shader._yscale = shader._yscale + (scale * 0.9);
if (_parent.bg.bee.hitTest(l_jump.targ)) {
tarFlag = true;
if (tarFlag) {
_parent.bonus++;
my_pnt = 100;
_parent.bg.bee.gotoAndPlay(_totalframes);
_parent.score = _parent.score + my_pnt;
_parent.L_score = _parent.L_score + my_pnt;
_parent.sco.txt = _parent.score;
tarFlag = false;
_parent.pnt.gotoAndPlay(2);
_parent.pnt.pnt.gotoAndStop(4);
be_catch.gotoAndPlay(2);
}
}
}
if ((((_xscale <= 100) and (ctr == 0)) and (l_ctr == 0)) and (l_jump._currentframe == 8)) {
l_jump.gotoAndPlay(9);
but.enabled = false;
xa1._visible = true;
shader._alpha = 20;
}
if (((l_jump._currentframe > 8) and (l_jump._currentframe <= 15)) and (l_jump._visible == 1)) {
_x = (_x + ((xspeed * 1) * _xscale));
_y = (_y + ((yspeed * 1) * _xscale));
}
};
}
}
function hitme() {
if (_parent.pauseFlag) {
if (_parent.bg.eye.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
ctr = 20;
_parent.Life++;
l_jump._visible = true;
drown._visible = false;
my_pnt = 50;
_parent.t_l_s.gotoAndPlay(2);
_parent.score = _parent.score + my_pnt;
_parent.L_score = _parent.L_score + my_pnt;
_parent.sco.txt = _parent.score;
_parent.pnt._x = _x;
_parent.pnt._y = _y;
_parent.pnt.gotoAndPlay(2);
_parent.pnt.pnt.gotoAndStop(5);
} else if (_parent.bg.t_l.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
ctr = 20;
_parent.Life++;
l_jump._visible = true;
drown._visible = false;
_parent.t_l_s.gotoAndPlay(2);
my_pnt = 10;
_parent.score = _parent.score + my_pnt;
_parent.L_score = _parent.L_score + my_pnt;
_parent.sco.txt = _parent.score;
_parent.pnt._x = _x;
_parent.pnt._y = _y;
_parent.pnt.gotoAndPlay(2);
_parent.pnt.pnt.gotoAndStop(3);
} else if (_parent.bg.pond.hitTest(this._x + _parent._x, this._y + _parent._y, true)) {
ctr = 20;
_parent.dead++;
my_pnt = -5;
_parent.score = _parent.score + my_pnt;
_parent.L_score = _parent.L_score + my_pnt;
_parent.sco.txt = _parent.score;
_parent.pnt._x = _x;
_parent.pnt._y = _y;
_parent.pnt.gotoAndPlay(2);
_parent.pnt.pnt.gotoAndStop(2);
_parent.f_d_s.gotoAndPlay(2);
drown._visible = true;
l_jump._visible = false;
drown.gotoAndPlay(2);
l_jump.stop();
} else {
ctr = 20;
_parent.dead++;
my_pnt = -5;
_parent.score = _parent.score + my_pnt;
_parent.L_score = _parent.L_score + my_pnt;
_parent.sco.txt = _parent.score;
_parent.pnt._x = _x;
_parent.pnt._y = _y;
_parent.pnt.gotoAndPlay(2);
_parent.pnt.pnt.gotoAndStop(2);
_parent.f_d_s.gotoAndPlay(2);
drown._visible = true;
l_jump._visible = false;
drown.gotoAndPlay(2);
l_jump.stop();
}
}
}
scale = 7;
gravity = 1;
advance = 0;
ctr = 0;
power = 4;
tmp_initx = this._x;
tmp_inity = this._y;
tmp_finalx = _parent.bg.pond._x;
tmp_finaly = _parent.bg.pond._y;
tmp_xspeed = (power * (tmp_finalx - tmp_initx)) / 35000;
tmp_yspeed = (power * (tmp_finaly - tmp_inity)) / 35000;
Instance of Symbol 335 MovieClip "l_jump" in Symbol 360 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
stop();
}
Instance of Symbol 342 MovieClip "drown" in Symbol 360 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
gotoAndStop (1);
}
Symbol 360 MovieClip Frame 2
stop();
Instance of Symbol 348 MovieClip "l_jump" in Symbol 360 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 351 MovieClip "drown" in Symbol 360 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
gotoAndStop (1);
}
Symbol 360 MovieClip Frame 3
stop();
Instance of Symbol 355 MovieClip "l_jump" in Symbol 360 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 358 MovieClip "drown" in Symbol 360 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
gotoAndStop (1);
}
Symbol 361 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 24
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 20
gotoAndStop (1);
Symbol 376 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 20
gotoAndStop (1);
Symbol 378 MovieClip Frame 1
stop();
Symbol 378 MovieClip Frame 20
gotoAndStop (1);
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 10
gotoAndStop (1);
Symbol 382 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 10
gotoAndStop (1);
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 16
gotoAndPlay (2);
Symbol 385 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 12
gotoAndPlay (2);
Symbol 387 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 10
gotoAndPlay (2);
Symbol 389 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 12
stop();
Symbol 392 Button
on (press) {
_depth = getDepth();
this.swapDepths(_parent.getNextHighestDepth());
_parent.pauseFlag = false;
gotoAndStop (2);
}
Symbol 394 Button
on (rollOver) {
but.useHandCursor = false;
}
Symbol 397 Button
on (press) {
_parent.pauseFlag = true;
gotoAndStop (1);
}
Symbol 400 Button
on (press) {
this.swapDepths(_depth);
_parent.pauseFlag = true;
gotoAndStop (1);
}
Symbol 401 MovieClip Frame 1
_parent.allSounds.setVolume(100);
stop();
Symbol 401 MovieClip Frame 2
trace("Frog Name=" + _parent._parent.count);
_parent.allSounds.setVolume(0);
stop();
Symbol 409 Button
on (press) {
_root.allSounds.setVolume(100);
gotoAndStop (1);
}
Symbol 410 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 2
stop();
Symbol 413 Button
on (press) {
gotoAndPlay (1);
}
Symbol 434 Button
on (press) {
_parent.L_score = 0;
_parent.Life = 0;
_parent.dead = 0;
_parent.safe = 0;
_parent.bonus = 0;
_parent.Level++;
_parent.startFlag = true;
_parent.allSounds.start();
_parent.gotoAndStop("gp");
}
Symbol 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 10
stop();
Symbol 443 MovieClip Frame 1
totPerc = _parent.safe;
remPerc = totPerc % 10;
exPerc = totPerc - remPerc;
cnt = 0;
subCnt = 0;
Symbol 443 MovieClip Frame 2
if (cnt < exPerc) {
cnt = cnt + 10;
txtPerc = cnt + " %";
} else if (remPerc > 0) {
if (subCnt < remPerc) {
subCnt = subCnt + 1;
cnt = cnt + 1;
txtPerc = cnt + " %";
} else {
_parent.nxt.gotoAndPlay(2);
gotoAndStop (1);
}
} else {
_parent.nxt.gotoAndPlay(2);
gotoAndStop (1);
}
Symbol 443 MovieClip Frame 3
gotoAndPlay (2);
Symbol 451 Button
on (press) {
_parent.Life = 0;
_parent.dead = 0;
_parent.timer = 0;
_parent.score = 0;
_parent.total = 0;
_parent.allSounds.start();
_parent.gotoAndPlay("i");
}
Symbol 455 Button
on (release) {
nextFrame();
}
Symbol 462 MovieClip Frame 1
totPerc = _parent._parent.safe;
remPerc = totPerc % 10;
exPerc = totPerc - remPerc;
cnt = 0;
subCnt = 0;
Symbol 462 MovieClip Frame 2
if (cnt < exPerc) {
cnt = cnt + 10;
txtPerc = cnt + " %";
_parent.p_abtn.enabled = true;
} else if (remPerc > 0) {
if (subCnt < remPerc) {
subCnt = subCnt + 1;
cnt = cnt + 1;
txtPerc = cnt + " %";
_parent.p_abtn.enabled = true;
} else {
_parent.p_abtn.enabled = true;
gotoAndStop (1);
}
} else if (remPerc < 0) {
txtPerc = "0 %";
_parent.p_abtn.enabled = true;
gotoAndStop (1);
} else {
_parent.p_abtn.enabled = true;
gotoAndStop (1);
}
Symbol 462 MovieClip Frame 3
gotoAndPlay (2);
Symbol 464 Button
on (press) {
_parent.gotoAndPlay("i");
}
Symbol 471 Button
on (release) {
_parent.base1._visible = false;
_parent.p_abtn.enabled = false;
gotoAndStop (2);
}
Symbol 475 Button
on (release) {
_parent.base1._visible = true;
_parent.p_abtn.enabled = true;
gotoAndStop (1);
}
Symbol 507 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 2
dataload = new LoadVars();
dataload.gmid = _root.gmid;
dataload.tim = 0;
dataload.sendAndLoad("http://www.gaminghungama.com/getSingleToppers.php3", dataload, "POST");
dataload.onLoad = function (success) {
if (success) {
if (dataload.done == 1) {
_root.toppers = dataload.toppers;
_root.topscore = dataload.topscore;
nextFrame();
}
} else {
dataload.sendAndLoad("http://www.gaminghungama.com/getSingleToppers.php3", dataload, "POST");
}
};
topbgbtn.useHandCursor = false;
stop();
Symbol 507 MovieClip Frame 3
p = _root.toppers.split("|");
q = _root.topscore.split("|");
i = 0;
while (i <= 10) {
if (p[i]) {
this["t" + (i + 1)] = p[i];
if (q[i] == 1) {
this["s" + (i + 1)] = q[i];
} else {
this["s" + (i + 1)] = q[i];
}
this["n" + (i + 1)] = i + 1;
} else {
this["t" + (i + 1)] = "";
this["s" + (i + 1)] = "";
this["n" + (i + 1)] = "";
}
i++;
}
topbgbtn.useHandCursor = false;
Symbol 508 MovieClip Frame 1
Symbol 508 MovieClip Frame 2
_quality = "high";
perst.txt = 0;
f_s_txt.text = _parent.Life;
f_m_txt.text = _parent.dead;
bon_txt.text = _parent.bonus;
if (_parent.L_score <= 0) {
l_s_txt.text = 0;
} else {
l_s_txt.text = _parent.L_score;
}
if (_parent.score <= 0) {
t_s_txt.text = 0;
} else {
t_s_txt.text = _parent.score;
}
_parent.total = _parent.score;
_parent.totalscore = _parent.total;
submitbtn.enabled = false;
if (_parent.total <= 0) {
_parent.total = 0;
}
if (_parent.total >= 2500) {
submitbtn.enabled = true;
submitbtn._alpha = 100;
} else {
submitbtn.enabled = false;
submitbtn._alpha = 0;
}
p_abtn.enabled = false;
topbgbtn.useHandCursor = false;
stop();
Symbol 508 MovieClip Frame 3
function submitscore() {
var ob = new Object();
mydata = "submitpoints";
ob.mydata = mydata;
ob.username = _root.unm;
ob.gmsess = _root.gmsess;
ob.gmid = _root.gmid;
ob.score = _parent.totalscore;
if ((_parent.totalscore >= 2500) and (_parent.totalscore <= 4499)) {
ob.pnt = 200;
} else if ((_parent.totalscore >= 4500) and (_parent.totalscore <= 6499)) {
ob.pnt = 400;
} else if ((_parent.totalscore >= 6500) and (_parent.totalscore <= 9499)) {
ob.pnt = 600;
} else if ((_parent.totalscore >= 9500) and (_parent.totalscore <= 10499)) {
ob.pnt = 800;
} else if (_parent.totalscore >= 10500) {
ob.pnt = 1000;
}
trace(ob.score);
ob.tim = 0;
_root.es.pluginRequest("db_single", "blank", ob);
}
_root.intervalId = setInterval(submitscore, 15000);
submitscore();
stop();
Symbol 509 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 2
totalscore = 0;
L_score = 0;
Life = 0;
health = 0;
dead = 0;
hold = 0;
frogType = 0;
startFlag = true;
pauseFlag = true;
suicideFlag = false;
which_one = "";
generatetime = 0;
score = 0;
num_frog = 0;
bonus = 0;
prv_score = 0;
sco.txt = 0;
actscore = 0;
Instance of Symbol 317 MovieClip "bg" in Symbol 509 MovieClip Frame 2
/* no clip actions */
Symbol 509 MovieClip Frame 3
Level = 1;
Instance of Symbol 332 MovieClip "sco" in Symbol 509 MovieClip Frame 3
/* no clip actions */
Symbol 509 MovieClip Frame 4
function setLevel() {
if ((Level >= 1) && (Level <= 2)) {
generatetime = gen_timearray[Level - 1];
hold = hold_timearray[Level - 1];
num_frog = frogarray[Level - 1];
bg.gotoAndStop(1);
} else if ((Level >= 3) && (Level <= 4)) {
generatetime = gen_timearray[Level - 1];
hold = hold_timearray[Level - 1];
num_frog = frogarray[Level - 1];
bg.gotoAndStop(2);
} else if ((Level >= 5) && (Level <= 6)) {
generatetime = gen_timearray[Level - 1];
hold = hold_timearray[Level - 1];
num_frog = frogarray[Level - 1];
bg.gotoAndStop(3);
} else if ((Level >= 7) && (Level <= 8)) {
generatetime = gen_timearray[Level - 1];
hold = hold_timearray[Level - 1];
num_frog = frogarray[Level - 1];
bg.gotoAndStop(4);
} else if ((Level >= 9) && (Level <= 10)) {
generatetime = gen_timearray[Level - 1];
hold = hold_timearray[Level - 1];
num_frog = frogarray[Level - 1];
bg.gotoAndStop(5);
}
if (Level >= 2) {
bg.fal1._visible = true;
}
if (Level >= 4) {
bg.fal2._visible = true;
}
}
function Results() {
if (!startFlag) {
total_frog = frogarray[Level - 1];
if ((Life + dead) >= total_frog) {
for (all in this) {
if (all.slice(0, 4) eq "frog") {
removeMovieClip(this[all]);
}
}
delete this.onEnterFrame;
health = Life;
safe = Math.round((100 * Life) / total_frog);
if (safe >= 60) {
removeMovieClip(all);
if (Level == 10) {
gotoAndStop ("t_a");
} else {
gotoAndStop ("L_c");
}
} else {
removeMovieClip(froges);
gotoAndStop ("t_a");
}
}
}
}
function frogGenerater() {
if (startFlag) {
if (timer > generatetime) {
timer = 0;
posran = random(xarray.length);
xpos = parseInt(xarray.splice(posran, 1));
ypos = parseInt(yarray.splice(posran, 1));
if ((xarray.length == 0) && (yarray.length == 0)) {
xarray = new Array(-1, 61, 119, 169, 195, 221, 229, 211, 169, 117, 69, 19, -34, -155, -195, -229, -230, -209, -195, -210, -169);
yarray = new Array(-187, -170, -159, -128, -77, -24, 35, 92, 128, 140, 138, 125, 117, 156, 138, 103, 35, -11, -53, -120, -168);
}
mc1._x = xpos;
mc1._y = ypos;
count++;
duplicateMovieClip ("mc1", "frog" + count, count);
this["frog" + count].l_jump._visible = true;
this["frog" + count].gotoAndStop(1 + random(froggytype[Level]));
this["s" + (1 + random(froggytype[Level]))].gotoAndPlay(2);
this["frog" + count].xpos = xpos;
this["frog" + count].ypos = ypos;
tar_deg = Math.atan2(bg.t_l._y - ypos, bg.t_l._x - xpos);
final_deg = (tar_deg * 180) / Math.PI;
this["frog" + count]._rotation = parseInt(final_deg);
this["frog" + count].powermv._rotation = -parseInt(final_deg);
this["frog" + count].pnt._rotation = -parseInt(final_deg);
if (count == num_frog) {
startFlag = false;
}
}
}
}
timer = 0;
xarray = new Array(-1, 61, 119, 169, 195, 221, 229, 211, 169, 117, 69, 19, -34, -155, -195, -229, -230, -219, -202, -210, -169);
yarray = new Array(-187, -170, -159, -128, -77, -24, 35, 92, 128, 140, 138, 125, 117, 156, 138, 103, 35, -15, -61, -120, -168);
frogarray = new Array(10, 15, 20, 25, 30, 35, 40, 40, 40, 40);
forgType_array = new Array(1, 2, 3);
gen_timearray = new Array(40, 37, 34, 31, 28, 25, 40, 40, 40, 40);
hold_timearray = new Array(75, 70, 65, 60, 65, 70, 75, 75, 75, 75);
froggytype = new Array(1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3);
mc1._visible = false;
count = 0;
bee_count = 0;
setLevel();
this.onEnterFrame = function () {
if (pauseFlag) {
timer = timer + 1;
level_txt.text = Level;
if (score < 0) {
sco.txt = 0;
} else {
sco.txt = score;
}
frogGenerater();
}
};
stop();
mc1.gotoAndStop(4);
if (_parent.allSounds.getVolume() == 0) {
speaker.gotoAndStop(2);
} else {
speaker.gotoAndStop(1);
}
speaker.onPress = function () {
if (speaker._currentframe == 2) {
_parent.allSounds.setVolume(100);
speaker.gotoAndStop(1);
} else {
_parent.allSounds.setVolume(0);
speaker.gotoAndStop(2);
}
};
Instance of Symbol 372 MovieClip "pnt" in Symbol 509 MovieClip Frame 4
onClipEvent (load) {
this.swapDepths(10000);
}
Instance of Symbol 401 MovieClip in Symbol 509 MovieClip Frame 4
/* no clip actions */
Symbol 509 MovieClip Frame 6
f_s_txt.text = Life;
f_m_txt.text = dead;
bon_txt.text = bonus;
l_s_txt.text = L_score;
t_s_txt.text = score;
delete this.onEnterFrame;
stop();
Symbol 509 MovieClip Frame 7
bg.fal1.gotoAndStop(1);
bg.fal2.gotoAndStop(1);
delete this.onEnterFrame;
stop();
Instance of Symbol 317 MovieClip "bg" in Symbol 509 MovieClip Frame 7
/* no clip actions */
Symbol 529 MovieClip Frame 1
_root.allowClick(this.linkBut);
_root.minScoreCheck(playagain_btn, subMC_btn);
playagain_btn.onRelease = function () {
_root.playagainManager();
_root.funPlayagain();
};
subMC_btn.onRelease = function () {
_parent.gotoAndStop("score_submit");
};
topMC_btn.onRelease = function () {
_parent.gotoAndStop("load_top_ten");
};
Symbol 537 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 538 MovieClip Frame 1
if (_root.alien) {
gotoAndStop ("nGH");
} else {
gotoAndStop ("GH");
}
Symbol 538 MovieClip Frame 2
_root.checkSubmit(_parent);
stop();
Symbol 538 MovieClip Frame 3
playagain_btn.onRelease = function () {
_root.playagainManager();
_root.funPlayagain();
};
Symbol 580 MovieClip Frame 2
gh_hide_but.useHandCursor = false;
scorePanel.topMC_btn._visible = false;
stop();
Symbol 580 MovieClip Frame 20
scorePanel.subMC_btn._visible = false;
Symbol 580 MovieClip Frame 30
_root.getTop10(this);
stop();
Symbol 580 MovieClip Frame 40
p = _root.toppers.split("|");
q = _root.topscore.split("|");
i = 0;
while (i <= 10) {
if (p[i]) {
this["t" + (i + 1)] = p[i];
if (q[i] == 1) {
this["s" + (i + 1)] = q[i];
} else {
this["s" + (i + 1)] = q[i];
}
this["n" + (i + 1)] = i + 1;
} else {
this["t" + (i + 1)] = "";
this["s" + (i + 1)] = "";
this["n" + (i + 1)] = "";
}
i++;
}
playagain_btn.onRelease = function () {
_root.funPlayagain();
};
close_btn.onRelease = function () {
gotoAndStop ("score_top10");
};
stop();