Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("e206b273", this, 10301, true);
function formatNumberWithCommas(num) {
var _local1 = num + "";
if (_local1.length < 4) {
return(_local1);
}
return((formatNumberWithCommas(_local1.slice(0, -3)) + ",") + _local1.slice(-3));
}
function reloadScoresAndStats() {
var _local3 = new LoadVars();
var _local2 = new LoadVars();
_local3.sendAndLoad((filepath + prefix) + "getgamesplayed.php", _local3, "GET");
_local3.onLoad = function (ok) {
if (ok) {
statsText = formatNumberWithCommas(this.games_played) + " games played\n";
statsText = statsText + (formatNumberWithCommas(this.points) + " points scored\n");
statsText = statsText + (formatNumberWithCommas(this.levels) + " levels completed\n");
statsText = statsText + (formatNumberWithCommas(this.balls_moved) + " balls moved\n");
var _local2 = new LoadVars();
_local2.sendAndLoad((filepath + prefix) + "veg30_getscore.php", _local2, "GET");
_local2.onLoad = function (ok) {
if (ok) {
namesText = this.nickname0 + newline;
scoresText = this.score0 + newline;
namesText = namesText + (this.nickname1 + newline);
scoresText = scoresText + (this.score1 + newline);
namesText = namesText + (this.nickname2 + newline);
scoresText = scoresText + (this.score2 + newline);
namesText = namesText + (this.nickname3 + newline);
scoresText = scoresText + (this.score3 + newline);
namesText = namesText + (this.nickname4 + newline);
scoresText = scoresText + (this.score4 + newline);
setTexts();
}
};
}
};
}
_lockroot = true;
loading_mc._alpha = 0;
var nickname = "";
var password = "";
var group = "";
var loggedIn = false;
var filepath = "http://www.omgames.co.uk/";
var deadlock = "deadlock/user/";
var prefix = "games/multiball/scripts/";
var rootMenu = new ContextMenu();
rootMenu.hideBuiltInItems();
_root.menu = rootMenu;
var scoresText = "";
var namesText = "";
var statsText = "";
reloadScoresAndStats();
Frame 2
loading_mc._alpha = loading_mc._alpha + 2;
if (loading_mc._alpha >= 100) {
gotoAndStop ("ad");
}
Frame 3
gotoAndPlay ("loading");
Frame 9
MochiAd.showPreloaderAd({id:"6498ea65357ea133", res:"500x500"});
Frame 10
function setTexts() {
stats_txt.text = statsText;
names_txt.text = namesText;
scores_txt.text = scoresText;
}
vol = 100;
stats_txt.text = statsText;
names_txt.text = namesText;
scores_txt.text = scoresText;
_root.gameOver_mc._visible = false;
if (((statsText == "") || (namesText == "")) || (scoresText == "")) {
reloadScoresAndStats();
}
stop();
Instance of Symbol 85 MovieClip "vol_mc" in Frame 10
onClipEvent (load) {
if (_root.vol == 100) {
gotoAndStop ("100");
} else if (_root.vol == 50) {
gotoAndStop ("50");
} else {
gotoAndStop ("0");
}
}
on (release) {
if (_root.vol == 100) {
_root.vol = 50;
gotoAndStop ("50");
} else if (_root.vol == 50) {
_root.vol = 0;
stopAllSounds();
gotoAndStop ("0");
} else {
_root.vol = 100;
gotoAndStop ("100");
}
}
Frame 14
var numCircles = 1;
var numTriangles = 0;
var triangleId = 0;
var maxTriangles = 5;
var nextLevelScore = 5;
var score = 0;
var level = 1;
var gameOver = false;
var moves = 0;
var border = 50;
var screenWidth = 500;
var screenHeight = 500;
var MAX_TRIANGLE_SPEED = 3;
var MIN_TRIANGLE_SPEED = 1;
var mX = 0;
var mY = 0;
nextLevel_mc._alpha = 0;
gameOver_mc._visible = false;
duplicateMovieClip (circle_mc, "circle_mc" + numCircles, _root.getNextHighestDepth());
reloadScoresAndStats();
triangle_mc._visible = false;
gotoAndPlay ("gameLoop");
Instance of Symbol 67 MovieClip [circle_mc] "circle_mc" in Frame 14
onClipEvent (load) {
_alpha = 0;
age = 0;
id = _root.numCircles;
while (!okPos) {
_x = ((Math.random() * (_root.screenWidth - (_root.border << 1))) + _root.border);
_y = ((Math.random() * (_root.screenHeight - (_root.border << 1))) + _root.border);
okTestPos = true;
var i = 1;
while (i <= _root.numCircles) {
if (i != id) {
if (this.hitTest(eval ("_root.circle_mc" + i))) {
okTestPos = false;
}
}
i++;
}
okPos = okTestPos;
}
sound = new Sound(this);
sound.attachSound("twinkle_snd");
sound.onSoundComplete = function () {
sound = null;
};
sound.setVolume(_root.vol);
sound.start(0, 0);
gotoAndPlay ("start");
}
onClipEvent (enterFrame) {
if (id < 0) {
removeMovieClip(this);
return(undefined);
}
if (_root.gameOver) {
stopDrag();
return(undefined);
}
_x = (_x + xV);
_y = (_y + yV);
xV = xV * 0.9;
yV = yV * 0.9;
if (_x > (_root.screenWidth - _width)) {
stopDrag();
_x = (_root.screenWidth - _width);
} else if (_x < 0) {
stopDrag();
_x = 0;
}
if (_y > (_root.screenHeight - _height)) {
stopDrag();
_y = (_root.screenHeight - _height);
} else if (_y < 0) {
stopDrag();
_y = 0;
}
if (age < 100) {
age++;
_alpha = age;
} else {
if (this._x > (_root.screenWidth - 50)) {
if (this.hitTest(_root.rightWall_mc)) {
xV = -xV;
}
}
if (this._x < 50) {
if (this.hitTest(_root.leftWall_mc)) {
xV = -xV;
}
}
if (this._y > (_root.screenHeight - 50)) {
if (this.hitTest(_root.bottomWall_mc)) {
yV = -yV;
}
}
if (this._y < 50) {
if (this.hitTest(_root.topWall_mc)) {
yV = -yV;
}
}
var i = 1;
while (i <= _root.numCircles) {
if (i != id) {
if (this.hitTest(eval ("_root.circle_mc" + i))) {
if (eval ("_root.circle_mc" + i).age >= 100) {
_root.gameOver = true;
eval ("_root.circle_mc" + i).gotoAndPlay("pop");
gotoAndPlay ("pop");
}
}
}
i++;
}
}
}
on (press) {
if (_root.gameOver) {
return(undefined);
}
if (age < 50) {
return(undefined);
}
_root.moves++;
xV = 0;
yV = 0;
oldX = _x;
oldY = _y;
dragging = true;
startDrag (this);
}
onClipEvent (mouseUp) {
if (dragging) {
dragging = false;
xV = _x - oldX;
yV = _y - oldY;
oldX = -1;
oldY = -1;
stopDrag();
}
}
onClipEvent (mouseMove) {
if ((oldX > 0) && (oldY > 0)) {
oldX = _x;
oldY = _y;
}
}
Instance of Symbol 201 MovieClip "triangle_mc" in Frame 14
onClipEvent (load) {
speed = Math.max(Math.random() * _root.MAX_TRIANGLE_SPEED, _root.MIN_TRIANGLE_SPEED);
frame = Math.ceil(((speed - _root.MIN_TRIANGLE_SPEED) / (_root.MAX_TRIANGLE_SPEED - _root.MIN_TRIANGLE_SPEED)) * 100);
gotoAndStop(frame);
if (Math.random() > 0.5) {
if (Math.random() > 0.5) {
xV = -speed;
this._rotation = 270;
_x = _root.screenWidth;
_y = ((Math.random() * (_root.screenHeight - (_width << 1))) + _width);
} else {
xV = speed;
this._rotation = 90;
_x = 0;
_y = ((Math.random() * (_root.screenHeight - (_height << 1))) + _height);
}
} else if (Math.random() > 0.5) {
yV = -speed;
this._rotation = 0;
_x = ((Math.random() * (_root.screenWidth - (_width << 1))) + _width);
_y = _root.screenHeight;
} else {
yV = speed;
this._rotation = 180;
_x = ((Math.random() * (_root.screenWidth - (_width << 1))) + _width);
_y = 0;
}
}
onClipEvent (enterFrame) {
if (_root.gameOver) {
return(undefined);
}
_y = (_y + yV);
_x = (_x + xV);
var i = 1;
while (i <= _root.numCircles) {
if (this.hitTest(eval ("_root.circle_mc" + i))) {
if (eval ("_root.circle_mc" + i).age >= 100) {
eval ("_root.circle_mc" + i).gotoAndPlay("pop");
_root.gameOver = true;
}
}
i++;
}
outOfBounds = false;
if (_y > (_root.screenHeight + _height)) {
outOfBounds = true;
} else if (_x > (_root.screenWidth + _width)) {
outOfBounds = true;
} else if (_y < (-_height)) {
outOfBounds = true;
} else if (_x < (-_width)) {
outOfBounds = true;
}
if (outOfBounds) {
removeMovieClip(this);
_root.score++;
_root.numTriangles--;
}
}
Frame 15
triangle_mc.xV = 0;
triangle_mc.yV = 0;
triangle_mc.enabled = false;
circle_mc.id = -1;
if (gameOver) {
gotoAndStop ("gameOver");
}
if (score >= nextLevelScore) {
level++;
nextLevelScore = nextLevelScore + (level << 1);
numCircles++;
circle_mc.duplicateMovieClip("circle_mc" + numCircles, _root.getNextHighestDepth());
MAX_TRIANGLE_SPEED = MAX_TRIANGLE_SPEED + 0.1;
maxTriangles++;
displayNextLevel = 1;
}
if (displayNextLevel == 1) {
nextLevel_mc._alpha++;
}
if (nextLevel_mc._alpha >= 100) {
displayNextLevel = 2;
}
if (displayNextLevel == 2) {
nextLevel_mc._alpha--;
}
if (nextLevel_mc._alpha <= 0) {
displayNextLevel = 0;
}
if ((Math.random() > 0.95) && (numTriangles < maxTriangles)) {
triangleId++;
duplicateMovieClip (_root.triangle_mc, "triangle_mc" + triangleId, _root.getNextHighestDepth());
numTriangles++;
}
Frame 16
gotoAndPlay ("gameLoop");
Frame 24
var get_lv = new LoadVars();
var i = 1;
while (i <= _root.numCircles) {
eval ("_root.circle_mc" + i)._alpha = 50;
i++;
}
get_lv.onLoad = function (ok) {
if (ok) {
if (score > 0) {
username_mc._visible = true;
submitScore_btn._visible = true;
submitScore_btn.enabled = true;
}
}
};
get_lv.balls_moved = moves;
get_lv.levels = level - 1;
get_lv.points = score;
get_lv.sendAndLoad((filepath + prefix) + "setgamesplayed.php", get_lv, "GET");
if (score <= 0) {
response_txt.text = "";
username_mc._visible = false;
submitScore_btn._visible = false;
submitScore_btn.enabled = false;
password_mc._visible = false;
} else {
if (nickname != "") {
username_mc.username_txt.text = nickname;
}
if (password != "") {
password_mc.password_txt.text = password;
password_mc.password_txt.password = true;
}
response_txt.text = "Enter your name in the text box above to submit your score.";
}
username_mc.username_txt.onSetFocus = function () {
if (username_mc.username_txt.text == "Enter nickname here") {
username_mc.username_txt.text = "";
}
};
password_mc.password_txt.onSetFocus = function () {
if (password_mc.password_txt.text == "Enter password here") {
password_mc.password_txt.text = "";
password_mc.password_txt.password = true;
}
};
sound = new Sound(this);
sound.attachSound("pop_snd");
sound.onSoundComplete = function () {
sound = null;
};
sound.setVolume(vol);
sound.start(0, 0);
var i = 1;
while (i <= triangleId) {
eval ("_root.triangle_mc" + i).gotoAndPlay("pop");
i++;
}
gameOver_mc.gameOver_txt.text = (((("Game Over\n\nScore: " + score) + "\nLevel: ") + level) + "\nBall Moves: ") + moves;
gameOver_mc.swapDepths(99999);
Symbol 67 MovieClip [circle_mc] Frame 30
_alpha = 0;
gotoAndStop (1);
Symbol 67 MovieClip [circle_mc] Frame 100
frame = Math.ceil(Math.random() * 10);
gotoAndStop(frame);
Symbol 220 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
var _local30 = {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, _local30);
var _local20 = options.clip;
var _local26 = 11000;
var _local29 = options.ad_timeout;
delete options.ad_timeout;
var _local23 = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local6 = _local20._mochiad;
_local6.onUnload = function () {
options.ad_finished();
};
var _local15 = _getRes(options);
var _local4 = _local15[0];
var _local14 = _local15[1];
_local6._x = _local4 * 0.5;
_local6._y = _local14 * 0.5;
var chk = _local6.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local25 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local27 = options.outline;
delete options.outline;
var _local5 = _local8.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local21);
_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 = _local8.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local25);
_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 _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local27, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local26;
chk.ad_timeout = _local29;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = _local23;
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;
}
};
_local6.lc.adLoaded = function (width, height) {
};
_local6.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 showTimedAd(options) {
var _local16 = {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, _local16);
var _local10 = options.clip;
var _local13 = 11000;
var _local15 = options.ad_timeout;
delete options.ad_timeout;
var _local12 = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local3 = _local10._mochiad;
_local3.onUnload = function () {
options.ad_finished();
};
var _local6 = _getRes(options);
var _local17 = _local6[0];
var _local14 = _local6[1];
_local3._x = _local17 * 0.5;
_local3._y = _local14 * 0.5;
var chk = _local3.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local13;
chk.ad_timeout = _local15;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = _local12;
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;
}
};
_local3.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 _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 _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
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 _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
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) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
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 _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
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 _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_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);
}
}
Symbol 221 MovieClip [__Packages.VegFunc] Frame 0
class VegFunc
{
function VegFunc () {
}
static function zerofill(n) {
if (n < 10) {
return("0" + n.toString());
}
return(n.toString());
}
}
Symbol 79 Button
on (release) {
gotoAndStop ("gameInit");
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 51
stop();
Symbol 85 MovieClip Frame 101
stop();
Symbol 93 Button
on (release) {
getURL ("http://www.omgames.co.uk/", "_blank");
}
Symbol 201 MovieClip Frame 1
stop();
Symbol 201 MovieClip Frame 150
stop();
Symbol 206 Button
on (release) {
var i = 1;
while (i <= numCircles) {
removeMovieClip(eval ("_root.circle_mc" + i));
i++;
}
var i = 1;
while (i <= triangleId) {
removeMovieClip(eval ("_root.triangle_mc" + i));
i++;
}
_root.gameOver_mc._visible = false;
removeMovieClip(_root.gameOver_mc);
gotoAndPlay ("gameInit");
}
Symbol 215 Button
on (release) {
submitScore_btn.enabled = false;
response_txt.text = "";
var valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
nickname = username_mc.username_txt.text;
var i = 0;
while (i < nickname.length) {
if (valid.indexOf(nickname.charAt(i)) < 0) {
response_txt.text = "Please enter an alphanumeric name (a-z, A-Z, 0-9)";
submitScore_btn.enabled = true;
return(undefined);
}
i++;
}
if (nickname.length > 2) {
response_txt.text = "Sending score...";
submit_btn.enabled = false;
var insert_lv = new LoadVars();
var today = new Date();
insert_lv.onLoad = function (ok) {
if (ok) {
if (this.errorcode == "0") {
scoreId = this.id;
response_txt.text = "Score was added to the database";
username_mc.username_txt.selectable = false;
submitScore_btn.enabled = false;
} else {
submitScore_btn.enabled = true;
response_txt.text = errorMsgs[Number(this.errorcode)];
if (this.errorcode == "3") {
msg_ta.text = msg_ta.text + (": " + this.msg);
}
}
} else {
response_txt.text = "Error sending score";
submitScore_btn.enabled = true;
}
};
insert_lv.nickname = nickname;
insert_lv.score = score;
insert_lv.level = level;
dateposted = (((VegFunc.zerofill(today.getDate()) + "-") + VegFunc.zerofill(today.getMonth() + 1)) + "-") + today.getFullYear();
insert_lv.dateposted = dateposted;
insert_lv.group_name = "";
insert_lv.registered_user = "0";
insert_lv.sendAndLoad((filepath + prefix) + "veg30_insertscore.php", insert_lv, "GET");
} else {
response_txt.text = "Name must be longer than 2 characters";
submitScore_btn.enabled = true;
}
}
Symbol 218 Button
on (release) {
var i = 1;
while (i <= numCircles) {
removeMovieClip(eval ("_root.circle_mc" + i));
i++;
}
var i = 1;
while (i <= triangleId) {
removeMovieClip(eval ("_root.triangle_mc" + i));
i++;
}
_root.gameOver_mc._visible = false;
removeMovieClip(_root.gameOver_mc);
gotoAndPlay ("gameMenu");
}