Frame 1
MochiAd.showPreGameAd({id:"987e7ba147286cab", res:"550x400"});
Frame 2
function over() {
this.gotoAndPlay(21);
}
function out() {
this.gotoAndPlay(26);
}
function click() {
removeMovieClip("arrow");
gotoAndPlay (3);
}
function over1() {
this.gotoAndPlay(31);
}
function out1() {
this.gotoAndPlay(36);
}
function click1() {
if (bowser.hitTest(arrow)) {
removeMovieClip("arrow");
} else {
attachMovie("arrow", "arrow", 10);
arrow._x = 150;
arrow._y = 200;
}
}
function over2() {
this.gotoAndPlay(41);
}
function out2() {
this.gotoAndPlay(46);
}
function click2() {
getURL ("http://www.lbwebgames.com/games/highscores.php?game=bowserball", "_blank");
}
function over3() {
this.gotoAndPlay(51);
}
function out3() {
this.gotoAndPlay(56);
}
function click3() {
getURL ("http://www.lbwebgames.com", "_blank");
}
stop();
attachMovie("starter", "starter", 1);
starter._x = 390;
starter._y = 135;
starter.onRollOver = over;
starter.onRollOut = out;
starter.onRelease = click;
attachMovie("how", "how", 2);
how._x = 390;
how._y = 190;
how.onRollOver = over1;
how.onRollOut = out1;
how.onRelease = click1;
attachMovie("high", "high", 3);
high._x = 390;
high._y = 250;
high.onRollOver = over2;
high.onRollOut = out2;
high.onRelease = click2;
attachMovie("more", "more", 4);
more._x = 400;
more._y = 320;
more.onRollOver = over3;
more.onRollOut = out3;
more.onRelease = click3;
attachMovie("bowser", "bowser", 5);
bowser._x = 190;
bowser._y = 270;
Instance of Symbol 160 MovieClip [LB] in Frame 2
on (release) {
getURL ("http://www.lbwebgames.com", "_blank");
}
Frame 3
function getAngle(px1, py1, px2, py2) {
x = px2 - px1;
y = py2 - py1;
hyp = Math.sqrt((x * x) + (y * y));
cos = x / hyp;
rad = Math.acos(cos);
deg = 180 / (Math.PI / rad);
if (y < 0) {
deg = -deg;
} else if ((y == 0) and (x < 0)) {
deg = 180;
}
return(deg);
}
stop();
var score = 0;
var level = 1;
var counter1 = 0;
var counter2 = 0;
var counter3 = 0;
var counter4 = 0;
var mball = 1000;
var cball = 0;
ball = new Array();
i = mball - 1;
while (i >= 0) {
ball[i] = {startx:0, starty:0, targetx:0, targety:0, active:false, visible:false};
i--;
}
attachMovie("background", "background", 2);
background._x = 275;
background._y = 200;
attachMovie("bow1", "bow1", 3);
bow1._x = 75;
bow1._y = 75;
attachMovie("bow2", "bow2", 4);
bow2._x = 475;
bow2._y = 75;
attachMovie("bow3", "bow3", 5);
bow3._x = 475;
bow3._y = 335;
attachMovie("bow4", "bow4", 6);
bow4._x = 75;
bow4._y = 335;
attachMovie("marioh", "marioh", 1);
marioh._x = 275;
marioh._y = 200;
attachMovie("mario", "mario", 7);
mario._x = 275;
mario._y = 200;
attachMovie("level", "lvl", 8);
lvl._x = 285;
lvl._y = 35;
lvl.level = 1;
attachMovie("score", "scr", 9);
scr._x = 275;
scr._y = 20;
scr.score = 0;
myLoop = new Sound();
myLoop.attachSound("theme");
myLoop.start(0);
myLoop.onSoundComplete = function () {
myLoop.start(0);
};
var snd = new Sound();
snd.attachSound("die");
onEnterFrame = function () {
var _local3 = 9;
if (Key.isDown(37) and Key.isDown(38)) {
if ((mario._currentFrame < 9) or (mario._currentFrame > 12)) {
mario.gotoAndPlay(9);
}
mario._x = mario._x - _local3;
mario._y = mario._y - _local3;
marioh._x = marioh._x - _local3;
marioh._y = marioh._y - _local3;
} else if (Key.isDown(37) and Key.isDown(40)) {
if ((mario._currentFrame < 25) or (mario._currentFrame > 29)) {
mario.gotoAndPlay(25);
}
mario._x = mario._x - _local3;
mario._y = mario._y + _local3;
marioh._x = marioh._x - _local3;
marioh._y = marioh._y + _local3;
} else if (Key.isDown(39) and Key.isDown(38)) {
if ((mario._currentFrame < 5) or (mario._currentFrame > 8)) {
mario.gotoAndPlay(5);
}
mario._x = mario._x + _local3;
mario._y = mario._y - _local3;
marioh._x = marioh._x + _local3;
marioh._y = marioh._y - _local3;
} else if (Key.isDown(39) and Key.isDown(40)) {
if ((mario._currentFrame < 17) or (mario._currentFrame > 21)) {
mario.gotoAndPlay(17);
}
mario._x = mario._x + _local3;
mario._y = mario._y + _local3;
marioh._x = marioh._x + _local3;
marioh._y = marioh._y + _local3;
} else if (Key.isDown(37)) {
if ((mario._currentFrame < 29) or (mario._currentFrame > 33)) {
mario.gotoAndPlay(29);
}
mario._x = mario._x - _local3;
marioh._x = marioh._x - _local3;
} else if (Key.isDown(39)) {
if ((mario._currentFrame < 13) or (mario._currentFrame > 16)) {
mario.gotoAndPlay(13);
}
mario._x = mario._x + _local3;
marioh._x = marioh._x + _local3;
} else if (Key.isDown(38)) {
if ((mario._currentFrame < 21) or (mario._currentFrame > 25)) {
mario.gotoAndPlay(21);
}
mario._y = mario._y - _local3;
marioh._y = marioh._y - _local3;
} else if (Key.isDown(40)) {
if (mario._currentFrame > 4) {
mario.gotoAndPlay(1);
} else {
mario.play();
}
mario._y = mario._y + _local3;
marioh._y = marioh._y + _local3;
} else {
mario.gotoAndStop(2);
}
counter1++;
counter2++;
counter3++;
counter4++;
var _local4 = 190;
if (counter1 > (Math.ceil((Math.random() * _local4) - (3 * level)) + 15)) {
cball++;
if (cball > mball) {
cball = 0;
}
attachMovie("ball", "ball" + cball, 15 + cball);
this["ball" + cball]._x = 75;
this["ball" + cball]._y = 75;
ball[cball].active = true;
ball[cball].startx = 75;
ball[cball].starty = 75;
ball[cball].targetx = marioh._x;
ball[cball].targety = marioh._y;
counter1 = 0;
bow1.gotoAndPlay(2);
}
if (counter2 > (Math.ceil((Math.random() * _local4) - (3 * level)) + 15)) {
cball++;
attachMovie("ball", "ball" + cball, 15 + cball);
this["ball" + cball]._x = 475;
this["ball" + cball]._y = 75;
ball[cball].active = true;
ball[cball].startx = 475;
ball[cball].starty = 75;
ball[cball].targetx = marioh._x;
ball[cball].targety = marioh._y;
counter2 = 0;
bow2.gotoAndPlay(2);
}
if (counter3 > (Math.ceil((Math.random() * _local4) - (3 * level)) + 15)) {
cball++;
attachMovie("ball", "ball" + cball, 15 + cball);
this["ball" + cball]._x = 475;
this["ball" + cball]._y = 335;
ball[cball].active = true;
ball[cball].startx = 475;
ball[cball].starty = 335;
ball[cball].targetx = marioh._x;
ball[cball].targety = marioh._y;
counter3 = 0;
bow3.gotoAndPlay(2);
}
if (counter4 > (Math.ceil((Math.random() * _local4) - (3 * level)) + 15)) {
cball++;
attachMovie("ball", "ball" + cball, 15 + cball);
this["ball" + cball]._x = 75;
this["ball" + cball]._y = 335;
ball[cball].active = true;
ball[cball].startx = 75;
ball[cball].starty = 335;
ball[cball].targetx = marioh._x;
ball[cball].targety = marioh._y;
counter4 = 0;
bow4.gotoAndPlay(2);
}
i = mball - 1;
while (i >= 0) {
if (ball[i].active) {
this["ball" + i]._y = this["ball" + i]._y + (6 * (-Math.cos((Math.PI * (getAngle(ball[i].startx, ball[i].starty, ball[i].targetx, ball[i].targety) + 90)) / 180)));
this["ball" + i]._x = this["ball" + i]._x + (6 * Math.sin((Math.PI * (getAngle(ball[i].startx, ball[i].starty, ball[i].targetx, ball[i].targety) + 90)) / 180));
if ((this["ball" + i]._x > 560) or (this["ball" + i]._x < -10)) {
this["ball" + i].removeMovieClip();
score = score + level;
}
if ((this["ball" + i]._y > 410) or (this["ball" + i]._y < -10)) {
this["ball" + i].removeMovieClip();
score = score + level;
scr.score = score;
}
if ((score > (100 * level)) and (level < 5)) {
level++;
lvl.level = level;
}
}
i--;
}
var i = 0;
while (i < mball) {
if (this["ball" + i].hitTest(marioh)) {
removeMovieClip("mario");
removeMovieClip("marioh");
_root.myLoop.stop();
_root.snd.start(0, 1);
gotoAndPlay (4);
}
i++;
}
if (mario._x > 430) {
mario._x = 430;
marioh._x = 430;
}
if (mario._y > 350) {
mario._y = 350;
marioh._y = 350;
}
if (mario._x < 120) {
mario._x = 120;
marioh._x = 120;
}
if (mario._y < 50) {
mario._y = 50;
marioh._y = 50;
}
};
Frame 4
this.onEnterFrame = undefined;
removeMovieClip("starter");
removeMovieClip("how");
removeMovieClip("high");
removeMovieClip("more");
removeMovieClip("bow1");
removeMovieClip("bow2");
removeMovieClip("bow3");
removeMovieClip("bow4");
removeMovieClip("background");
removeMovieClip("lvl");
removeMovieClip("scr");
i = mball - 1;
while (i >= 0) {
if (ball[i].active) {
this["ball" + i].removeMovieClip();
}
i--;
}
Frame 5
function click() {
gotoAndPlay (3);
}
function click1() {
gotoAndPlay (2);
}
function click2() {
removeMovieClip("again");
removeMovieClip("title1");
removeMovieClip("submit");
gotoAndPlay (6);
}
stop();
attachMovie("again", "again", 1);
again._x = 452.9;
again._y = 271.2;
again.onRelease = click;
attachMovie("title1", "title1", 2);
title1._x = 276.9;
title1._y = 271.2;
title1.onRelease = click1;
attachMovie("submit", "submit", 3);
submit._x = 350;
submit._y = 200;
submit.onRelease = click2;
Instance of Symbol 160 MovieClip [LB] in Frame 5
on (release) {
getURL ("http://www.lbwebgames.com", "_blank");
}
Instance of Symbol 157 MovieClip [more1] in Frame 5
on (release) {
getURL ("http://www.lbwebgames.com", "_blank");
}
Frame 6
function click() {
gotoAndPlay (7);
sendAction = new LoadVars();
trace(pname);
sendAction.sendAndLoad((("http://www.lbwebgames.com/postscores.php?game=bowserball&pname=" + pname) + "&score=") + score, sendAction, "POST");
}
stop();
attachMovie("submit1", "submit1", 1);
submit1._x = 362;
submit1._y = 336;
submit1.onRelease = click;
Frame 7
function click() {
gotoAndPlay (3);
}
function click1() {
gotoAndPlay (2);
}
function click2() {
getURL ("http://www.lbwebgames.com/games/highscores.php?game=bowserball", "_blank");
}
stop();
attachMovie("again", "again", 1);
again._x = 371;
again._y = 303;
again.onRelease = click;
attachMovie("title1", "title1", 2);
title1._x = 176;
title1._y = 303;
title1.onRelease = click1;
attachMovie("high1", "high1", 3);
high1._x = 278;
high1._y = 213;
high1.onRelease = click2;
Symbol 40 MovieClip [mario] Frame 4
gotoAndPlay (1);
Symbol 40 MovieClip [mario] Frame 8
gotoAndPlay (5);
Symbol 40 MovieClip [mario] Frame 12
gotoAndPlay (9);
Symbol 40 MovieClip [mario] Frame 16
gotoAndPlay (13);
Symbol 40 MovieClip [mario] Frame 20
gotoAndPlay (17);
Symbol 40 MovieClip [mario] Frame 24
gotoAndPlay (21);
Symbol 40 MovieClip [mario] Frame 28
gotoAndPlay (25);
Symbol 40 MovieClip [mario] Frame 32
gotoAndPlay (29);
Symbol 45 MovieClip [bow1] Frame 1
stop();
Symbol 45 MovieClip [bow1] Frame 3
gotoAndPlay (1);
Symbol 51 MovieClip [bow2] Frame 1
stop();
Symbol 51 MovieClip [bow2] Frame 3
gotoAndPlay (1);
Symbol 56 MovieClip [bow3] Frame 1
stop();
Symbol 56 MovieClip [bow3] Frame 3
gotoAndPlay (1);
Symbol 59 MovieClip [bow4] Frame 1
stop();
Symbol 59 MovieClip [bow4] Frame 3
gotoAndPlay (1);
Symbol 63 MovieClip [ball] Frame 2
gotoAndPlay (1);
Symbol 75 MovieClip [starter] Frame 20
stop();
Symbol 75 MovieClip [starter] Frame 25
stop();
Symbol 75 MovieClip [starter] Frame 30
stop();
Symbol 94 MovieClip [how] Frame 30
stop();
Symbol 94 MovieClip [how] Frame 35
stop();
Symbol 94 MovieClip [how] Frame 41
stop();
Symbol 105 MovieClip [high] Frame 40
stop();
Symbol 105 MovieClip [high] Frame 45
stop();
Symbol 105 MovieClip [high] Frame 50
stop();
Symbol 115 MovieClip [more] Frame 50
stop();
Symbol 115 MovieClip [more] Frame 55
stop();
Symbol 115 MovieClip [more] Frame 60
stop();
Symbol 128 MovieClip [arrow] Frame 10
stop();
Symbol 131 MovieClip [bowser] Frame 1
stop();
Symbol 136 MovieClip [ballhit] Frame 2
stop();
Instance of Symbol 139 MovieClip [Symbol 1] in Symbol 140 MovieClip [title1] Frame 1
on (release) {
gotoAndPlay (2);
}
Symbol 197 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {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, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
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;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {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, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
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;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
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 _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_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 _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".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 _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}