Frame 1
stop();
Frame 2
stop();
mochi.as2.MochiAd.showPreGameAd({res:"340x410", id:"ce241e2621346da2"}, "");
Frame 3
stop();
Frame 4
stop();
Symbol 1 MovieClip [__Packages.mochi.as2.MochiAd] Frame 1
#initclip 1
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (mochi == undefined) {
_global.mochi = {};
}
if (!_global.mochi.hasOwnProperty("as2")) {
_global.mochi.as2 = {};
}
_global.mochi.as2.MochiAd = function () {
with (this) {
}
};
mochi.as2.MochiAd.getVersion = function () {
with (this) {
return(mochi.as2.MochiServices.getVersion());
}
};
mochi.as2.MochiAd.showPreGameAd = function (options) {
with (this) {
var DEFAULTS = {ad_progress:function (percent) {
}, ad_skipped:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
}, ad_finished:function () {
this.clip.play();
}, ad_started:function () {
this.clip.stop();
}, no_progress_bar:false, outline:13994812, background:16777161, color:16747008, method:"showPreloaderAd", regpt:"o", fadeout_time:250, ad_timeout:3000, clip:_root};
options = mochi.as2.MochiAd._parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
if (options.skip) {
ad_timeout = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.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 = mochi.as2.MochiAd._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;
mochi.as2.MochiAd.unload(_clip);
delete this.onEnterFrame;
}
};
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) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
chk.onEnterFrame = function () {
var _clip = this._parent._parent;
var loader = _clip;
while (!(loader.getBytesTotal() || (!loader))) {
loader = loader._parent;
}
if (!loader) {
loader = _root;
}
var ad_clip = this._parent._mochiad_ctr;
var elapsed = (getTimer() - this.started);
var finished = false;
var clip_total = loader.getBytesTotal();
var clip_loaded = loader.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(Math.min(ad_pcnt, clip_pcnt || 0), 100);
pcnt = Math.max(pcnt, this.last_pcnt);
this.last_pcnt = pcnt;
_inside._xscale = pcnt;
options.ad_progress(pcnt);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {pcnt:clip_pcnt, id:"hostLoadPcnt"}, clip._mochiad._containerLCName);
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;
}
}
};
}
};
mochi.as2.MochiAd.showClickAwayAd = function (options) {
with (this) {
var DEFAULTS = {ad_skipped:function () {
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_finished:function () {
}, ad_started:function () {
}, no_bg:true, res:"300x250", method:"showClickAwayAd", regpt:"o", fadeout_time:250, ad_timeout:2000, clip:_root};
options = mochi.as2.MochiAd._parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!mochi.as2.MochiAd.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 = mochi.as2.MochiAd._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) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
var sendHostProgress = false;
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;
}
};
}
};
mochi.as2.MochiAd.showInterLevelAd = function (options) {
with (this) {
var DEFAULTS = {ad_skipped:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
}, ad_finished:function () {
this.clip.play();
}, ad_started:function () {
this.clip.stop();
}, method:"showTimedAd", regpt:"o", fadeout_time:250, ad_timeout:2000, clip:_root};
options = mochi.as2.MochiAd._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 (!mochi.as2.MochiAd.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 = mochi.as2.MochiAd._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;
mochi.as2.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) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
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;
}
}
};
}
};
mochi.as2.MochiAd.showPreloaderAd = function (options) {
with (this) {
mochi.as2.MochiAd.showPreGameAd(options);
}
};
mochi.as2.MochiAd.showTimedAd = function (options) {
with (this) {
mochi.as2.MochiAd.showInterLevelAd(options);
}
};
mochi.as2.MochiAd._allowDomains = function (server) {
with (this) {
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);
}
};
mochi.as2.MochiAd.load = function (options) {
with (this) {
var DEFAULTS = {id:"_UNKNOWN_", depth:10333, method:"load", server:"http://x.mochiads.com/srv/1/", clip:_root};
options = mochi.as2.MochiAd._parseOptions(options, DEFAULTS);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = mochi.as2.MochiAd.getVersion();
var clip = options.clip;
if (!mochi.as2.MochiAd._isNetworkAvailable()) {
return(null);
}
if (clip._mochiad_loaded) {
return(null);
}
var depth = options.depth;
delete options.depth;
var mc = clip.createEmptyMovieClip("_mochiad", depth);
var wh = mochi.as2.MochiAd._getRes(options);
options.res = (wh[0] + "x") + wh[1];
var _local1 = "server";
options[_local1] = options[_local1] + options.id;
delete options.id;
clip._mochiad_loaded = true;
if (clip._url.indexOf("http") != 0) {
}
var lv = mc.createEmptyMovieClip("_mochiad_ctr", 1);
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (k == undefined) {
var k = null;
}
for (_reg0 in options) {
in options;
k = _reg0;
lv[k] = options[k];
}
for (_reg0 in options) {
}
var server = lv.server;
delete lv.server;
var hostname = mochi.as2.MochiAd._allowDomains(server);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var lc = new Object();
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;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
lv.lc = name;
lv.st = getTimer();
if (!options.skip) {
lv.loadMovie(server + ".swf", "POST");
}
return(mc);
}
};
mochi.as2.MochiAd.unload = function (clip) {
with (this) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (!((!clip.clip) || (!clip.clip._mochiad))) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
};
mochi.as2.MochiAd._isNetworkAvailable = function () {
with (this) {
if (System.security) {
var o = System.security;
if (o.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
};
mochi.as2.MochiAd._getRes = function (options) {
with (this) {
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]);
}
};
mochi.as2.MochiAd._parseOptions = function (options, defaults) {
with (this) {
var optcopy = {};
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (k == undefined) {
var k = null;
}
for (_reg0 in defaults) {
in defaults;
k = _reg0;
optcopy[k] = defaults[k];
}
for (_reg0 in defaults) {
}
if (options) {
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (k == undefined) {
var k = null;
}
for (_reg0 in options) {
in options;
k = _reg0;
optcopy[k] = options[k];
}
if ((in options) != null) {
// unexpected jump
}
}
if (_root.mochiad_options) {
var pairs = _root.mochiad_options.split("&");
var i = 0;
for ( ; i < pairs.length ; i++) {
var kv = pairs[i].split("=");
optcopy[unescape(kv[0])] = unescape(kv[1]);
}
}
if (optcopy.id == "test") {
}
return(optcopy);
}
};
mochi.as2.MochiAd.rpc = function (clip, callbackID, arg) {
with (this) {
arg.id;
if (arg.id != "setValue") {
if (arg.id != "getValue") {
if (arg.id != "runMethod") {
return;
mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value);
return;
var val = mochi.as2.MochiAd.getValue(clip, arg.objectName);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, val, clip._mochiad._containerLCName);
return;
}
}
} else {
mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value);
return;
var val = mochi.as2.MochiAd.getValue(clip, arg.objectName);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, val, clip._mochiad._containerLCName);
return;
var ret = mochi.as2.MochiAd.runMethod(clip, arg.method, arg.args);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, ret, clip._mochiad._containerLCName);
}
}
};
mochi.as2.MochiAd.setValue = function (base, objectName, value) {
with (this) {
var nameArray = Array(objectName.split("."));
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (i == undefined) {
var i = NaN;
}
i = 0;
for ( ; i < (nameArray.length - 1) ; i++) {
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (!((base[nameArray[i]] != undefined) && (base[nameArray[i]] != null))) {
return(undefined);
}
base = base[nameArray[i]];
}
base[nameArray[i]] = value;
}
};
mochi.as2.MochiAd.getValue = function (base, objectName) {
with (this) {
var nameArray = Array(objectName.split("."));
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (i == undefined) {
var i = NaN;
}
i = 0;
for ( ; i < (nameArray.length - 1) ; i++) {
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (!((base[nameArray[i]] != undefined) && (base[nameArray[i]] != null))) {
return(undefined);
}
base = base[nameArray[i]];
}
return(base[nameArray[i]]);
}
};
mochi.as2.MochiAd.runMethod = function (base, methodName, argsArray) {
with (this) {
var nameArray = Array(methodName.split("."));
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (i == undefined) {
var i = NaN;
}
i = 0;
for ( ; i < (nameArray.length - 1) ; i++) {
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (!((base[nameArray[i]] != undefined) && (base[nameArray[i]] != null))) {
return(undefined);
}
base = base[nameArray[i]];
}
if (typeof(base[nameArray[i]]) == "function") {
return(base[nameArray[i]].apply(base, argsArray));
}
return(undefined);
}
};
mochi.as2.MochiAd.containerNotify = function (clip, args, lcName) {
with (this) {
var container = clip._mochiad._mochiad_ctr.ad.app;
if (container.notify) {
container.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
};
mochi.as2.MochiAd.containerRpcResult = function (clip, callbackID, val, lcName) {
with (this) {
var container = clip._mochiad._mochiad_ctr.ad.app;
if (container.rpcResult) {
container.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
};
#endinitclip
Symbol 3 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
parameters = {Effect:"normal"};
properties = parameters;
}
} else {
// unexpected jump
}
var angle = 0;
var flicker = false;
var da = 20;
parameters.Effect;
if (parameters.Effect != "normal") {
if (parameters.Effect != "flicker") {
if (parameters.Effect != "no rotate") {
if (parameters.Effect != "flicker no rotate") {
// unexpected jump
// unexpected jump
flicker = true;
// unexpected jump
da = 0;
// unexpected jump
}
}
}
} else {
// unexpected jump
flicker = true;
// unexpected jump
da = 0;
// unexpected jump
da = 0;
flicker = true;
}
// unexpected jump
// unexpected jump
};
stop();
Symbol 18 MovieClip Frame 1
if (flicker) {
this._alpha = 100;
}
Symbol 18 MovieClip Frame 2
if (flicker) {
this._alpha = 75;
}
Symbol 18 MovieClip Frame 3
if (flicker) {
this._alpha = 50;
}
Symbol 18 MovieClip Frame 4
if (flicker) {
this._alpha = 25;
}
Symbol 18 MovieClip Frame 5
if ("reduce alpha" == parameters.Effect) {
this._alpha = 0;
}
angle = angle + da;
if (angle > 360) {
angle = angle % 360;
}
this._rotation = angle;
this.gotoAndPlay(1);
Symbol 19 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
parameters = {BgndColor:4291611852, BgndColorH:4294967295, BarColorL:4278242559, BarColorH:4278255615, TextColor:4284900966, BlinkDelay:-1, Text:"Loading:", DisplayMode:"Percent", WhenLoadedGoto:"Play Next Scene", HideWhenLoaded:true, EventFunction:"Events"};
properties = parameters;
}
} else {
// unexpected jump
}
var Progress = function () {
tellTarget ("..") {
gotoAndPlay("/:2");
}
};
// unexpected jump
// unexpected jump
var loadParameters = function (txt) {
tellTarget ("..") {
return(eval ("parameters." add txt));
}
};
// unexpected jump
// unexpected jump
var displaytext = function (mode, bytesloaded, bytestotal, pc) {
tellTarget ("..") {
if (mode != "Percent") {
if (mode != "Bytes") {
return;
percent.text = int(pc + 0.5) add "%";
return;
}
} else {
percent.text = int(pc + 0.5) add "%";
return;
percent.text = (bytesloaded add "/") add bytestotal;
return;
}
}
};
// unexpected jump
// unexpected jump
G_displaymode = loadParameters("DisplayMode");
G_goto = loadParameters("WhenLoadedGoto");
G_blinkdelay = loadParameters("BlinkDelay");
G_countdown = G_blinkdelay;
G_hide = loadParameters("HideWhenLoaded");
G_eventfunction = loadParameters("EventFunction");
G_framecount = 0;
G_v = 0;
if ("Bar Only" != G_displaymode) {
loading.text = loadParameters("Text");
}
progressbar.SetValue(0);
displaytext(G_displaymode, _parent.getBytesTotal(), _parent.getBytesTotal(), 100);
if ("Play Parent" == parameters.WhenLoadedGoto) {
_parent.stop();
}
// unexpected jump
// unexpected jump
};
stop();
Symbol 24 MovieClip Frame 1
if (!hasOwnProperty("_load")) {
_load = true;
tellTarget ("..") {
parameters = {BgndColor:4291611852, BgndColorH:4294967295, BarColorL:4278242559, BarColorH:4278255615, LimitMaximum:100, LimitMinimum:0, EventVar:"_root.value", Mode:"Manual"};
properties = parameters;
}
} else {
// unexpected jump
}
var SetValue = function (v) {
tellTarget ("..") {
v = v - G_limitmin;
v = v * (100 / G_scale);
if (v < 0) {
v = 0;
}
if (v > 100) {
v = 100;
}
bar._xscale = v;
}
};
// unexpected jump
// unexpected jump
var Setparameters = function (mode, eventvar, limitmin, limitmax) {
tellTarget ("..") {
G_mode = mode;
G_eventvar = eventvar;
G_limitmin = limitmin;
G_limitmax = limitmax;
G_scale = limitmax - limitmin;
G_poll = "Poll" == G_mode;
}
};
// unexpected jump
// unexpected jump
var loadParameter = function (txt) {
tellTarget ("..") {
return(eval ("parameters." add txt));
}
};
// unexpected jump
// unexpected jump
Setparameters(loadParameter("Mode"), loadParameter("EventVar"), loadParameter("LimitMinimum"), loadParameter("LimitMaximum"));
G_lastval = -1;
SetValue(G_limitmin);
// unexpected jump
// unexpected jump
};
nextFrame();
play();
Symbol 24 MovieClip Frame 3
tellTarget ("..") {
if (!G_poll) {
return(undefined);
}
if ("" == G_eventvar) {
return(undefined);
}
var v = eval (G_eventvar);
if (v != G_lastval) {
G_lastval = v;
SetValue(v);
}
};
gotoAndPlay (2);
Symbol 32 MovieClip Frame 2
stop();
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (bytesloaded == undefined) {
var bytesloaded = NaN;
}
delete _global.__resolve;
_global.__resolve = _global.__debugResolve;
if (bytestotal == undefined) {
var bytestotal = NaN;
}
if ("Demo Mode" != G_goto) {
bytesloaded = _parent.getBytesLoaded();
bytestotal = _parent.getBytesTotal();
} else {
G_framecount = (Number(G_framecount)+1);
bytesloaded = Number(G_framecount);
bytestotal = 500;
}
if (bytesloaded >= bytestotal) {
if ("Bar Only" != G_displaymode) {
loading._visible = true;
}
if (G_hide) {
this._visible = false;
}
Progress();
if (!(("Use EventFunction" != G_goto) || ("" == G_eventfunction))) {
_parent[G_eventfunction].call(_parent, _name, "Loaded");
}
this.stop();
return(undefined);
}
if (G_countdown == 0) {
G_countdown = G_blinkdelay;
if ("Bar Only" != G_displaymode) {
loading._visible = !loading._visible;
}
} else if (G_countdown > 0) {
G_countdown--;
}
G_v = (bytesloaded / bytestotal) * 100;
progressbar.SetValue(G_v);
displaytext(G_displaymode, bytesloaded, bytestotal, G_v);
this.gotoAndPlay("Loading");
Symbol 33 Button
on (release, keyPress "<Space>") {
gotoAndPlay("/:4");
}
Symbol 37 MovieClip Frame 1
if (!hasOwnProperty("_load16A92620")) {
_load16A92620 = true;
tellTarget ("..") {
var place_line = function () {
tellTarget ("..") {
x = 0;
for ( ; x < 10 ; x++) {
tiles_placed++;
if (field[x][0] != 0) {
push_blocks(x);
}
tile = things.attachMovie("tile", "tile_" + tiles_placed, tiles_placed, {_y:300, _x:25 + (32 * x)});
num = Math.floor(Math.random() * tile_unterschiede) + 1;
tile.gotoAndStop(num);
field[x][0] = tiles_placed;
}
}
};
var push_blocks = function (col_number) {
tellTarget ("..") {
i = 9;
for ( ; i >= 0 ; i--) {
if (field[col_number][i] != 0) {
if (i != 9) {
field[col_number][i + 1] = field[col_number][i];
var _local1 = "_y";
things["tile_" + field[col_number][i]][_local1] = things["tile_" + field[col_number][i]][_local1] - 32;
} else {
things._alpha = 50;
_root.attachMovie("ohno", "ohno", _root.getNextHighestDepth(), {_y:95, _x:100});
game_over = 1;
}
}
}
}
};
var remove_tiles = function (tx, ty, clicked) {
tellTarget ("..") {
tile_type = things["tile_" + field[tx][ty]]._currentframe;
if (!clicked) {
things["tile_" + field[tx][ty]].onEnterFrame = function () {
var _local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_yscale";
this[_local1]++;
_local1 = "_xscale";
this[_local1]++;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
_local1 = "_alpha";
this[_local1]--;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
field[tx][ty] = 0;
removed++;
if (ty == x2_horiz_pos) {
mult = 2;
}
}
if (!((field[tx + 1][ty] == 0) || (things["tile_" + field[tx + 1][ty]]._currentframe != tile_type))) {
remove_sound.gotoAndPlay(2);
remove_tiles(tx + 1, ty);
}
if (!((field[tx - 1][ty] == 0) || (things["tile_" + field[tx - 1][ty]]._currentframe != tile_type))) {
remove_sound.gotoAndPlay(2);
remove_tiles(tx - 1, ty);
}
if (!((field[tx][ty + 1] == 0) || (things["tile_" + field[tx][ty + 1]]._currentframe != tile_type))) {
remove_sound.gotoAndPlay(2);
remove_tiles(tx, ty + 1);
}
if (!((field[tx][ty - 1] == 0) || (things["tile_" + field[tx][ty - 1]]._currentframe != tile_type))) {
remove_sound.gotoAndPlay(2);
remove_tiles(tx, ty - 1);
}
}
};
var update_field = function () {
tellTarget ("..") {
i = 0;
for ( ; i < 10 ; i++) {
j = 1;
for ( ; j < 10 ; j++) {
if (!((field[i][j] == 0) || (field[i][j - 1] != 0))) {
falling = j - 1;
while (!((field[i][falling] != 0) || (falling < 0))) {
field[i][falling] = field[i][falling + 1];
var _local1 = "_y";
things["tile_" + field[i][falling + 1]][_local1] = things["tile_" + field[i][falling + 1]][_local1] + 32;
field[i][falling + 1] = 0;
falling--;
}
}
}
}
}
};
interval_speed = 100;
tile_unterschiede = 2;
field = Array();
removed = 0;
score = 0;
interval = interval_speed;
x2_horiz_pos = 0;
mult = 1;
game_over = 0;
turns = 0;
tiles_placed = 0;
x = 0;
for ( ; x < 10 ; x++) {
field[x] = Array();
y = 0;
for ( ; y < 10 ; y++) {
field[x][y] = 0;
}
}
_root.attachMovie("bg", "bg", _root.getNextHighestDepth());
_root.attachMovie("x2_horiz", "x2_horiz", _root.getNextHighestDepth(), {_x:10});
_root.createEmptyMovieClip("things", _root.getNextHighestDepth());
_root.createEmptyMovieClip("bar", _root.getNextHighestDepth());
_root.attachMovie("score", "score_obj", _root.getNextHighestDepth(), {_y:32, _x:350});
_root.onEnterFrame = function () {
tellTarget ("..") {
if (!game_over) {
interval--;
if (interval == 0) {
turns++;
interval = interval_speed - turns;
place_line();
x2_horiz_pos = Math.floor(Math.random() * 10);
x2_horiz._y = 300 - (x2_horiz_pos * 32);
}
bar.clear();
bar.lineStyle(6, 16773459);
bar.moveTo(10, 350);
bar.lineTo(328, 350);
bar.lineStyle(4, 15369216);
bar.moveTo(10, 350);
bar.lineTo(10 + ((318 * interval) / (interval_speed - turns)), 350);
}
}
};
onMouseDown = function () {
tellTarget ("..") {
if (!game_over) {
x_tile_clicked = Math.floor((_root._xmouse - 10) / 32);
y_tile_clicked = Math.floor((_root._ymouse - 300) / 32) * -1;
if (!((x_tile_clicked < 0) || ((x_tile_clicked > 9) || ((y_tile_clicked < 0) || (y_tile_clicked > 9))))) {
if (field[x_tile_clicked][y_tile_clicked] != 0) {
remove_tiles(x_tile_clicked, y_tile_clicked, 1);
update_field();
i = 1;
for ( ; i <= removed ; i++) {
score = score + (i * mult);
}
score_obj.score.text = "Score: " + score;
if (score > 400) {
tile_unterschiede = 3;
}
if (score > 800) {
tile_unterschiede = 4;
}
if (score > 1200) {
tile_unterschiede = 5;
}
if (score > 1600) {
tile_unterschiede = 6;
}
removed = 0;
mult = 1;
}
}
}
}
};
}
} else {
// unexpected jump
}
};
stop();
Symbol 51 MovieClip [tile] Frame 6
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 2
gotoAndStop(1);