Frame 1
function getItNow() {
if (_root._url.indexOf("file:", -1)) {
fileRef.download(_root._url, "Star Chase.swf");
}
}
game_id = "1b8a863353e6f183";
mochi.MochiServices.connect(game_id);
_root.kongregateServices.connect();
var loadText = "Download a free copy of this game.";
var myMenu = new ContextMenu();
var fileRef = (new flash.net.FileReference());
var newMenuItem = new ContextMenuItem(loadText, getItNow);
myMenu.customItems.push(newMenuItem);
myMenu.hideBuiltInItems();
myMenu.builtInItems.quality = true;
myMenu.builtInItems.zoom = true;
_root.menu = myMenu;
Frame 2
stop();
savedata = SharedObject.getLocal("star");
if (savedata.data.highscore == null) {
savedata.data.highscore = 0;
}
Instance of Symbol 8 MovieClip in Frame 2
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
perc1ent = int((loaded / total) * 100);
perc1 = ("" + perc1ent) + "%";
gotoAndStop(perc1ent);
if (loaded == total) {
_root.gotoAndPlay(2);
}
}
Frame 3
stop();
Mouse.show();
Instance of Symbol 11 MovieClip "play" in Frame 3
on (release) {
_root.gotoAndPlay("play");
}
Instance of Symbol 15 MovieClip "opt" in Frame 3
on (release) {
_root.gotoAndPlay("options");
}
Frame 4
stop();
Mouse.show();
var my_sound = new Sound();
my_sound.onSoundComplete = function () {
my_sound.start();
};
my_sound.onLoad = function (success) {
song_title.text = "";
album_title.text = "";
if (success) {
my_sound.start();
}
if (my_sound.id3.songtitle) {
song_title.text = my_sound.id3.songtitle;
}
if (my_sound.id3.artist) {
song_title.text = song_title.text + my_sound.id3.artist;
}
if (my_sound.id3.album) {
album_title.text = my_sound.id3.album;
}
};
Instance of Symbol 17 MovieClip "menu_but" in Frame 4
on (release) {
_root.gotoAndPlay("menu");
}
Instance of Symbol 23 MovieClip "Slider" in Frame 4
onClipEvent (enterFrame) {
_root.my_sound.setVolume(-(ControlBar.targets - 100));
_root.my_sound.setPan((_parent.Panner.ControlBar.targets - 50) * 2);
}
Instance of Symbol 23 MovieClip "Panner" in Frame 4
onClipEvent (load) {
ControlBar._y = 50;
}
Instance of Symbol 27 MovieClip "loadery" in Frame 4
on (release) {
_parent.my_sound.stop("default_sound");
if ((_parent.loads.text != "") && (_parent.loads.text != "default")) {
if ((_parent.loads.text.indexOf(".mp3") != (_parent.loads.text.length - 4)) && (_parent.loads.text.indexOf(".MP3") != (_parent.loads.text.length - 4))) {
_parent.loads.text = _parent.loads.text + ".mp3";
}
if (_parent.loads.text.indexOf("www") == 0) {
_parent.my_sound.loadSound("http://" + _parent.loads.text, false);
} else if (_parent.loads.text.indexOf("C:") == 0) {
_parent.my_sound.loadSound("file:///" + _parent.loads.text, false);
} else if (_parent.loads.text.indexOf(":") == 1) {
_parent.my_sound.loadSound("file:///" + _parent.loads.text, false);
} else {
_parent.my_sound.loadSound(_parent.loads.text, false);
}
} else {
_parent.my_sound.attachSound("default_sound");
_parent.my_sound.start();
}
}
Frame 5
stop();
Instance of Symbol 39 MovieClip "star" in Frame 5
onClipEvent (load) {
_xscale = 20;
}
onClipEvent (enterFrame) {
Mouse.hide();
_rotation = (_rotation + (_xscale / 80));
_x = _root._xmouse;
_y = _root._ymouse;
_xscale = (_xscale + (0.25 + (_xscale / 4000)));
_yscale = _xscale;
}
Instance of Symbol 42 MovieClip "staring" in Frame 5
onClipEvent (load) {
function TwistIt() {
_root._rotation = (_root._rotation * _root._rotation) + 1;
_root.beer = potato_salad;
}
createEmptyMovieClip("tail", 16);
createEmptyMovieClip("tail_border", 17);
trail_array = new Array(30);
taily_array = new Array(30);
_root.mayo = _parent.star._xscale;
}
onClipEvent (enterFrame) {
tail.clear();
tail.lineStyle(4.5, 16777011, 60);
tail_border.clear();
tail_border.lineStyle(9, 0, 0);
if (_parent.star._xscale > _root.mayo) {
_root.mayo = _parent.star._xscale;
}
MyScript.slideTo(this, (-_parent.star._x) + 500, (-_parent.star._y) + 500, 3 + (_root.mayo / 32));
yellow._rotation = yellow._rotation + 5;
tail.moveTo(0, 0);
tail_border.moveTo(0, 0);
trail_array[0] = _x;
taily_array[0] = _y;
i = 0;
while (i < trail_array.length) {
if (trail_array[i] != null) {
tail.lineTo(trail_array[i] - _x, taily_array[i] - _y);
tail_border.lineTo(trail_array[i] - _x, taily_array[i] - _y);
}
i++;
}
i = trail_array.length - 2;
while (i >= 0) {
trail_array[i + 1] = trail_array[i];
taily_array[i + 1] = taily_array[i];
i--;
}
a = false;
j = 1;
while (j <= 30) {
checker = eval ("_root.star.hitter.point_" + j);
a = a || (collision(checker));
j++;
}
if (this.hitTest(_root.star.hitter._x + _root.star._x, _root.star.hitter._y + _root.star._y, true) || (a)) {
_parent.star._xscale = _parent.star._xscale - (1.5 + (_root.mayo / 8));
if (_parent.star._xscale < 15) {
_root.gotoAndPlay("gameOver");
}
}
}
Instance of Symbol 42 MovieClip "starling" in Frame 5
onClipEvent (load) {
function TwistIt() {
_root._rotation = (_root._rotation * _root._rotation) + 1;
_root.beer = potato_salad;
}
createEmptyMovieClip("tail", 16);
createEmptyMovieClip("tail_border", 17);
trail_array = new Array(20);
taily_array = new Array(20);
_root.mayo = _parent.star._xscale;
}
onClipEvent (enterFrame) {
tail.clear();
tail.lineStyle(4.5, 16724787, 60);
tail_border.clear();
tail_border.lineStyle(9, 0, 0);
if (_parent.star._xscale > _root.mayo) {
_root.mayo = _parent.star._xscale;
}
MyScript.slideTo(this, _parent.star._x, _parent.star._y, 3 + (_root.mayo / 32));
yellow._rotation = yellow._rotation + 5;
tail.moveTo(0, 0);
tail_border.moveTo(0, 0);
trail_array[0] = _x;
taily_array[0] = _y;
i = 0;
while (i < trail_array.length) {
if (trail_array[i] != null) {
tail.lineTo(trail_array[i] - _x, taily_array[i] - _y);
tail_border.lineTo(trail_array[i] - _x, taily_array[i] - _y);
}
i++;
}
i = trail_array.length - 2;
while (i >= 0) {
trail_array[i + 1] = trail_array[i];
taily_array[i + 1] = taily_array[i];
i--;
}
a = false;
j = 1;
while (j <= 30) {
checker = eval ("_root.star.hitter.point_" + j);
a = a || (collision(checker));
j++;
}
if (this.hitTest(_root.star.hitter._x + _root.star._x, _root.star.hitter._y + _root.star._y, true) || (a)) {
_parent.star._xscale = _parent.star._xscale - (0.5 + (_parent.star._xscale / 64));
if (_parent.star._xscale < 15) {
_root.gotoAndPlay("gameOver");
}
}
}
Instance of Symbol 42 MovieClip "staring" in Frame 5
onClipEvent (load) {
function TwistIt() {
_root._rotation = (_root._rotation * _root._rotation) + 1;
_root.beer = potato_salad;
}
createEmptyMovieClip("tail", 16);
createEmptyMovieClip("tail_border", 17);
trail_array = new Array(20);
taily_array = new Array(20);
_root.mayo = _parent.star._xscale;
}
onClipEvent (enterFrame) {
tail.clear();
tail.lineStyle(4.5, 3407667, 60);
tail_border.clear();
tail_border.lineStyle(9, 0, 0);
if (_parent.star._xscale > _root.mayo) {
_root.mayo = _parent.star._xscale;
}
MyScript.slideTo(this, (-_parent.star._y) + 500, (-_parent.star._x) + 500, 1 + (_root.mayo / 16));
yellow._rotation = yellow._rotation + 5;
tail.moveTo(0, 0);
tail_border.moveTo(0, 0);
trail_array[0] = _x;
taily_array[0] = _y;
i = 0;
while (i < trail_array.length) {
if (trail_array[i] != null) {
tail.lineTo(trail_array[i] - _x, taily_array[i] - _y);
tail_border.lineTo(trail_array[i] - _x, taily_array[i] - _y);
}
i++;
}
i = trail_array.length - 2;
while (i >= 0) {
trail_array[i + 1] = trail_array[i];
taily_array[i + 1] = taily_array[i];
i--;
}
a = false;
j = 1;
while (j <= 30) {
checker = eval ("_root.star.hitter.point_" + j);
a = a || (collision(checker));
j++;
}
if (this.hitTest(_root.star.hitter._x + _root.star._x, _root.star.hitter._y + _root.star._y, true) || (a)) {
_parent.star._xscale = _parent.star._xscale - (1.5 + (_root.mayo / 32));
if (_parent.star._xscale < 15) {
_root.gotoAndPlay("gameOver");
}
}
}
Instance of Symbol 42 MovieClip "starling" in Frame 5
onClipEvent (load) {
function TwistIt() {
_root._rotation = (_root._rotation * _root._rotation) + 1;
_root.beer = potato_salad;
}
createEmptyMovieClip("tail", 16);
createEmptyMovieClip("tail_border", 17);
trail_array = new Array(25);
taily_array = new Array(25);
_root.mayo = _parent.star._xscale;
}
onClipEvent (enterFrame) {
tail.clear();
tail.lineStyle(4.5, 10040319, 60);
tail_border.clear();
tail_border.lineStyle(9, 0, 0);
if (_parent.star._xscale > _root.mayo) {
_root.mayo = _parent.star._xscale;
}
MyScript.slideTo(this, _parent.star._y, _parent.star._x, random(5) + (_root.mayo / (8 + random(48))));
yellow._rotation = yellow._rotation + 5;
tail.moveTo(0, 0);
tail_border.moveTo(0, 0);
trail_array[0] = _x;
taily_array[0] = _y;
i = 0;
while (i < trail_array.length) {
if (trail_array[i] != null) {
tail.lineTo(trail_array[i] - _x, taily_array[i] - _y);
tail_border.lineTo(trail_array[i] - _x, taily_array[i] - _y);
}
i++;
}
i = trail_array.length - 2;
while (i >= 0) {
trail_array[i + 1] = trail_array[i];
taily_array[i + 1] = taily_array[i];
i--;
}
a = false;
j = 1;
while (j <= 30) {
checker = eval ("_root.star.hitter.point_" + j);
a = a || (collision(checker));
j++;
}
if (this.hitTest(_root.star.hitter._x + _root.star._x, _root.star.hitter._y + _root.star._y, true) || (a)) {
_parent.star._xscale = _parent.star._xscale - (1.5 + (_root.mayo / 28));
if (_parent.star._xscale < 15) {
_root.gotoAndPlay("gameOver");
}
}
}
Frame 6
stop();
Mouse.show();
score = Math.round(_root.mayo * 1000) - 20000;
if (savedata.data.highscore >= score) {
high.text = "Your highscore:\n" + savedata.data.highscore;
} else {
savedata.data.highscore = score;
high.text = "Your new highscore:\n" + savedata.data.highscore;
}
_root.kongregateStats.submit("--Super Star Score--", score);
Instance of Symbol 49 MovieClip "submit" in Frame 6
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"0b6b1d806bd2b17d", score:score, res:"500x500", preloaderDisplay:true, previewScores:true});
}
Instance of Symbol 15 MovieClip "opt" in Frame 6
on (release) {
_root.gotoAndPlay("options");
}
Instance of Symbol 17 MovieClip "menu_but" in Frame 6
on (release) {
_root.gotoAndPlay("menu");
}
Symbol 50 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 51 MovieClip [__Packages.MyScript] Frame 0
class MyScript
{
function MyScript () {
}
static function pullTo(particle1, particle2, distance, error_on_1st, elastic) {
var _local5 = 1 - error_on_1st;
var _local4 = particle1._x - particle2._x;
var _local3 = particle1._y - particle2._y;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local1 = -Math.atan2(_local4, _local3);
var _local2 = (_local8 - distance) * elastic;
particle1._x = particle1._x + ((_local2 * error_on_1st) * Math.sin(_local1));
particle1._y = particle1._y - ((_local2 * error_on_1st) * Math.cos(_local1));
particle2._x = particle2._x - ((_local2 * _local5) * Math.sin(_local1));
particle2._y = particle2._y + ((_local2 * _local5) * Math.cos(_local1));
}
static function randomList(xer) {
var _local3 = new Array();
while (_local3.length < xer) {
var _local2 = true;
while (_local2) {
_local2 = false;
var _local4 = random(xer) + 1;
var _local1 = 0;
while (_local1 < (_local3.length + 1)) {
if (_local4 == _local3[_local1]) {
_local2 = true;
}
_local1++;
}
}
_local3.push(_local4);
}
return(_local3);
}
static function between(x, y) {
var _local1 = (x + y) / 2;
return(_local1);
}
static function constraint(particle1, particle2, distance, error_on_1st) {
var _local5 = 1 - error_on_1st;
var _local4 = particle1._x - particle2._x;
var _local3 = particle1._y - particle2._y;
var _local8 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local1 = -Math.atan2(_local4, _local3);
var _local2 = _local8 - distance;
particle1._x = particle1._x + ((_local2 * error_on_1st) * Math.sin(_local1));
particle1._y = particle1._y - ((_local2 * error_on_1st) * Math.cos(_local1));
particle2._x = particle2._x - ((_local2 * _local5) * Math.sin(_local1));
particle2._y = particle2._y + ((_local2 * _local5) * Math.cos(_local1));
}
static function distanceTo(x_one, y_one, x_two, y_two) {
var _local2 = x_one - x_two;
var _local1 = y_one - y_two;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
return(_local3);
}
static function moveToward(mover, x_two, y_two, speed) {
var dis_x = (x_two - mover._x);
var dis_y = (mover._y - y_two);
var a_ = (Math.atan(dis_y / dis_x) / (Math.PI/180));
if (dis_x < 0) {
a_ = a_ + 180;
}
if ((dis_x >= 0) && (dis_y < 0)) {
a_ = a_ + 360;
}
a_ = a_ / 57.2957795130823;
with (Math) {
var xspd = (cos(a_) * speed);
var yspd = (sin(a_) * speed);
}
mover._x = mover._x + xspd;
mover._y = mover._y - yspd;
}
static function slideTo(mover, x_two, y_two, speed) {
var dis_x = (x_two - mover._x);
var dis_y = (mover._y - y_two);
var m_ = (Math.atan(dis_y / dis_x) / (Math.PI/180));
if (dis_x < 0) {
m_ = m_ + 180;
}
if ((dis_x >= 0) && (dis_y < 0)) {
m_ = m_ + 360;
}
m_ = m_ / 57.2957795130823;
with (Math) {
var xspd = (cos(m_) * speed);
var yspd = (sin(m_) * speed);
if (abs(xspd) > abs(dis_x)) {
xspd = dis_x;
}
if (abs(yspd) > abs(dis_y)) {
yspd = dis_y;
}
mover._x = mover._x + xspd;
mover._y = mover._y - yspd;
}
}
static function directionTo(x_one, y_one, x_two, y_two) {
var _local2 = x_two - x_one;
var _local3 = y_one - y_two;
var _local1 = Math.atan(_local3 / _local2) / (Math.PI/180);
if (_local2 < 0) {
_local1 = _local1 + 180;
}
if ((_local2 >= 0) && (_local3 < 0)) {
_local1 = _local1 + 360;
}
return(_local1);
}
static function MoveDirection(target, angle, speed) {
target._x = target._x + (Math.cos(angle / (Math.PI/180)) * speed);
target._y = target._y + (Math.sin(angle / (Math.PI/180)) * speed);
}
}
Symbol 52 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 20 Button
on (press) {
startDrag (this, false, left, top, right, bottom);
}
on (release) {
stopDrag();
}
on (releaseOutside) {
stopDrag();
}
Instance of Symbol 22 MovieClip "ControlBar" in Symbol 23 MovieClip Frame 1
onClipEvent (load) {
top = 0;
bottom = 100;
left = _x;
right = _x;
targets = Math.round(100 * (_y / 100));
}
onClipEvent (mouseMove) {
targets = Math.round(100 * (_y / 100));
}
Symbol 35 MovieClip Frame 1
stop();