Frame 1
stop();
num = 3;
vol = 100;
fscommand ("showmenu", "false");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
var MochiAd = {getVersion:function () {
return("2.1");
}, showPreGameAd:function (options) {
var _local1 = this;
var DEFAULTS = {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 = 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 (!MochiAd.load(options)) {
options.ad_finished();
} else {
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = MochiAd._getRes(options);
var _local3 = wh[0];
var h = wh[1];
mc._x = _local3 * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local3 * -0.5;
chk._y = h * -0.5;
var bar = chk.createEmptyMovieClip("_mochiad_bar", 4);
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(_local3 - 20, 0);
backing.lineTo(_local3 - 20, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var _local2 = bar.createEmptyMovieClip("_inside", 2);
_local2.beginFill(bar_color);
_local2.moveTo(0, 0);
_local2.lineTo(_local3 - 20, 0);
_local2.lineTo(_local3 - 20, 10);
_local2.lineTo(0, 10);
_local2.lineTo(0, 0);
_local2.endFill();
_local2._xscale = 0;
var outline = bar.createEmptyMovieClip("_outline", 3);
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(_local3 - 20, 0);
outline.lineTo(_local3 - 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 _local1 = this;
var _local2 = 100 * (1 - ((getTimer() - _local1.fadeout_start) / _local1.fadeout_time));
if (_local2 > 0) {
_local1._parent._alpha = _local2;
} else {
var _local3 = _local1._parent._parent;
MochiAd.unload(_local3);
delete _local1.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local1 = this.mc._mochiad_wait;
_local1.server_control = true;
_local1.started = getTimer();
_local1.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local1 = this;
var _clip = _local1._parent._parent;
var ad_clip = _local1._parent._mochiad_ctr;
var elapsed = (getTimer() - _local1.started);
var _local3 = false;
var clip_total = _clip.getBytesTotal();
var clip_loaded = _clip.getBytesLoaded();
var clip_pcnt = ((100 * clip_loaded) / clip_total);
var ad_pcnt = ((100 * elapsed) / chk.ad_msec);
var _inside = _local1._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(clip_pcnt || 0, ad_pcnt));
_local2 = Math.max(_local1.last_pcnt, _local2);
_local1.last_pcnt = _local2;
_inside._xscale = _local2;
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) {
_local3 = true;
}
}
if (elapsed > chk.ad_msec) {
_local3 = true;
}
if (((clip_total > 0) && (clip_loaded >= clip_total)) && (_local3)) {
if (_local1.server_control) {
delete _local1.onEnterFrame;
} else {
_local1.fadeout_start = getTimer();
_local1.onEnterFrame = chk.fadeFunction;
}
}
};
}
}, showInterLevelAd:function (options) {
var _local1 = this;
var DEFAULTS = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = 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 (!MochiAd.load(options)) {
options.ad_finished();
} else {
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = 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 _local1 = this;
var _local2 = 100 * (1 - ((getTimer() - _local1.fadeout_start) / _local1.fadeout_time));
if (_local2 > 0) {
_local1._parent._alpha = _local2;
} else {
var _local3 = _local1._parent._parent;
MochiAd.unload(_local3);
delete _local1.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local1 = this.mc._mochiad_wait;
_local1.server_control = true;
_local1.started = getTimer();
_local1.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local1 = this;
var ad_clip = _local1._parent._mochiad_ctr;
var elapsed = (getTimer() - _local1.started);
var _local2 = false;
if (!chk.showing) {
var _local3 = ad_clip.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (elapsed > chk.ad_timeout) {
_local2 = true;
}
}
if (elapsed > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (_local1.server_control) {
delete _local1.onEnterFrame;
} else {
_local1.fadeout_start = getTimer();
_local1.onEnterFrame = _local1.fadeFunction;
}
}
};
}
}, showTimedAd:function (options) {
MochiAd.showInterLevelAd(options);
}, showPreloaderAd:function (options) {
MochiAd.showPreGameAd(options);
}, _allowDomains:function (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);
}, _loadCommunicator:function (options) {
var _local2 = options;
var _local3 = arguments;
var DEFAULTS = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
_local2 = MochiAd._parseOptions(_local2, DEFAULTS);
_local2.swfv = _local2.clip.getSWFVersion() || 6;
_local2.mav = MochiAd.getVersion();
var clip = _local2.clip;
var clipname = ("_mochiad_com_" + _local2.id);
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (clip[clipname]) {
return(clip[clipname].lc);
}
var server = (_local2.com_server + _local2.id);
MochiAd._allowDomains(server);
delete _local2.id;
delete _local2.com_server;
var depth = _local2.depth;
delete _local2.depth;
var mc = clip.createEmptyMovieClip(clipname, depth);
var lv = mc.createEmptyMovieClip("_mochiad_com", 1);
for (var k in _local2) {
lv[k] = _local2[k];
}
var lc = new LocalConnection();
var name = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
lc.mc = mc;
lc.name = name;
lc.allowDomain = function (d) {
return(true);
};
lc.allowInsecureDomain = lc.allowDomain;
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lc._id = 0;
lc._queue = [];
lc.rpcResult = function (cb_arg) {
var cb = parseInt(cb_arg);
var _local2 = this._callbacks[cb];
if (!_local2) {
} else {
delete this._callbacks[cb];
var _local3 = [];
var _local1 = 2;
while (_local1 < _local2.length) {
_local3.push(_local2[_local1]);
_local1++;
}
_local1 = 1;
while (_local1 < arguments.length) {
_local3.push(arguments[_local1]);
_local1++;
}
var method = _local2[1];
var obj = _local2[0];
if (obj && (typeof(method) == "string")) {
method = obj[method];
}
if (method) {
method.apply(obj, _local3);
}
}
};
lc._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local3 = this._queue;
delete this._queue;
var ds = this.doSend;
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3[_local1];
ds.apply(this, _local2);
_local1++;
}
};
lc.doSend = function (args, cbobj, cbfn) {
var _local2 = arguments;
if (this._endpoint == null) {
var _local3 = [];
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(_local2[_local1]);
_local1++;
}
this._queue.push(_local3);
} else {
this._id = this._id + 1;
var id = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[id] = [cbobj, cbfn];
var slc = new LocalConnection();
var ss = slc.send(this._endpoint, "rpc", id, args);
}
};
lc._callbacks = {};
lc._callbacks[0] = [lc, "_didConnect"];
lv.st = getTimer();
lv.loadMovie(server + ".swf", "POST");
return(lc);
}, fetchHighScores:function (options, callbackObj, callbackMethod) {
var _local2 = options;
var _local1 = MochiAd._loadCommunicator({id:_local2.id});
if (!_local1) {
return(false);
}
var fncall = ["fetchHighScores", _local2];
_local1.doSend(["fetchHighScores", _local2], callbackObj, callbackMethod);
return(true);
}, sendHighScore:function (options, callbackObj, callbackMethod) {
var _local2 = options;
var _local1 = MochiAd._loadCommunicator({id:_local2.id});
if (!_local1) {
return(false);
}
var fncall = ["sendHighScore", _local2];
_local1.doSend(["sendHighScore", _local2], callbackObj, callbackMethod);
return(true);
}, load:function (options) {
var _local1 = options;
var DEFAULTS = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
_local1 = MochiAd._parseOptions(_local1, DEFAULTS);
_local1.swfv = _local1.clip.getSWFVersion() || 6;
_local1.mav = MochiAd.getVersion();
var clip = _local1.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (clip._mochiad_loaded) {
return(null);
}
var depth = _local1.depth;
delete _local1.depth;
var mc = clip.createEmptyMovieClip("_mochiad", depth);
var wh = MochiAd._getRes(_local1);
_local1.res = (wh[0] + "x") + wh[1];
_local1.server = _local1.server + _local1.id;
delete _local1.id;
clip._mochiad_loaded = true;
var _local2 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var k in _local1) {
_local2[k] = _local1[k];
}
var server = _local2.server;
delete _local2.server;
var hostname = MochiAd._allowDomains(server);
mc.onEnterFrame = function () {
var _local1 = this;
if (_local1._mochiad_ctr._url != _local1._url) {
_local1.onEnterFrame = function () {
var _local1 = this;
if (!_local1._mochiad_ctr) {
delete _local1.onEnterFrame;
MochiAd.unload(_local1._parent);
}
};
}
};
var _local3 = new LocalConnection();
var name = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local3.mc = mc;
_local3.name = name;
_local3.hostname = hostname;
_local3.allowDomain = function (d) {
return(true);
};
_local3.allowInsecureDomain = _local3.allowDomain;
_local3.connect(name);
mc.lc = _local3;
_local2.lc = name;
_local2.st = getTimer();
_local2.loadMovie(server + ".swf", "POST");
return(mc);
}, unload:function (clip) {
var _local1 = clip;
if (typeof(_local1) == "undefined") {
_local1 = _root;
}
if (_local1.clip && (_local1.clip._mochiad)) {
_local1 = _local1.clip;
}
if (!_local1._mochiad) {
return(false);
}
_local1._mochiad.removeMovieClip();
delete _local1._mochiad_loaded;
delete _local1._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var xy = options.res.split("x");
_local2 = parseFloat(xy[0]);
_local1 = parseFloat(xy[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]);
}, _parseOptions:function (options, defaults) {
var _local3 = {};
for (var k in defaults) {
_local3[k] = defaults[k];
}
if (options) {
for (var k in options) {
_local3[k] = options[k];
}
}
if (_root.mochiad_options) {
var pairs = _root.mochiad_options.split("&");
var _local1 = 0;
while (_local1 < pairs.length) {
var _local2 = pairs[_local1].split("=");
_local3[unescape(_local2[0])] = unescape(_local2[1]);
_local1++;
}
}
return(_local3);
}, _:null};
MochiAd.showPreGameAd({id:"d6e966b76edde01a", res:"400x400", background:15324866, color:7885614, outline:0, no_bg:true});
Frame 110
function spawn() {
jumlah++;
nama = "objx" + jumlah;
duplicateMovieClip ("_root.objawal", nama, jumlah + 500);
_root[nama].gojalan = 1;
}
function submit() {
url = "http://www.smileygamer.com/scripts/highscores.php";
lv = new LoadVars();
lv.id = 792;
lv.score = (score * 100) + (score % 97);
lv.player = n;
lv.sendAndLoad(url, lv, "GET");
}
jumlah = 0;
score = 0;
dept = 0;
name = "obj0";
stop();
bgm = new Sound();
starsound = new Sound();
drop = new Sound();
bgm.attachSound("bgm");
drop.attachSound("drop");
starsound.attachSound("starsound");
_root.bgm.start(0, 99999);
Instance of Symbol 14 MovieClip in Frame 110
onClipEvent (load) {
trigspawn = 0;
}
onClipEvent (enterFrame) {
if ((trigspawn < 0) && (_root.play == 1)) {
_root.spawn();
trigspawn = random(40);
}
trigspawn--;
}
Instance of Symbol 56 MovieClip in Frame 128
onClipEvent (load) {
qual = newarray();
qual = ["LOW", "MEDIUM", "HIGH", "BEST"];
p = _y;
l = _x;
r = _x + 320;
_x = (_x + (_root.num * 70));
}
onClipEvent (enterFrame) {
_root.num = math.floor((_x - kiri) / 80);
_quality = Qual[_root.num];
}
Instance of Symbol 56 MovieClip in Frame 128
onClipEvent (load) {
p = _y;
l = _x;
r = _x + 320;
_x = (_root.vol * 3.4);
}
onClipEvent (enterFrame) {
_root.vol = math.floor((_x - kiri) / 3.4);
_root.bgm.setVolume(_root.vol);
}
Frame 135
jumlah = 2;
play = 1;
stop();
Instance of Symbol 70 MovieClip "star" in Frame 135
onClipEvent (load) {
_alpha = 100;
}
onClipEvent (enterFrame) {
if (_root.play == 1) {
_x = (_x + speedx);
_rotation = (_rotation + speedx);
_y = (_y + (5 - speedy));
speedy = speedy * 0.9;
speedx = speedx * 0.9;
_alpha = (_alpha - 3);
if (_alpha < 0) {
removeMovieClip(this);
}
} else {
removeMovieClip(this);
}
}
Instance of Symbol 95 MovieClip "objawal" in Frame 135
onClipEvent (load) {
gotoAndStop(random(20) + 1);
go = 1;
_x = random(400);
_y = (-random(100));
_rotation = 0;
fall = 1;
speed = 5;
jatuh = 0;
}
onClipEvent (enterFrame) {
if ((_root.play == 1) && (gojalan == 1)) {
if (fall == 1) {
name = "obj" + _root.dept;
if ((hittest(_root[name]) && (!(_name === (name_x > (_root[name]._x - (_root[name]._width / 2)))))) && (_x < (_root[name]._x + (_root[name]._width / 2)))) {
_root.score = _root.score + (50 + (100 * _root.dept));
_root.dept++;
_name = ("obj" + _root.dept);
_root.name = _name;
temp = name;
_y = (_root[name]._y - _root[name]._height);
x = 0;
while (x < _root.dept) {
_root.jumlah++;
names = "star" + _root.jumlah;
duplicateMovieClip (_root.star, names, _root.jumlah + 1000);
_root.starsound.start();
_root[names].speedx = 10 - random(20);
_root[names].speedy = random(20);
_root[names]._x = _x;
_root[names]._y = _y;
x++;
}
fall = 0;
} else {
_y = (_y + speed);
}
} else if ((((_x > (_root[temp]._x - (_root[temp]._width / 2))) && (_x < (_root[temp]._x + (_root[temp]._width / 2)))) && (jatuh == 0)) && (_root[temp].jatuh == 0)) {
if (_x > (_root[temp]._x + 1)) {
_rotation = ((-math.abs(_root[temp]._x - _x)) / 4);
spdfall = math.abs(_root[temp]._x - _x) * 2;
_x = (_x - (math.abs(_root[temp]._x - _x) / 2));
} else if (_x < (_root[temp]._x - 1)) {
_rotation = (math.abs(_root[temp]._x - _x) / 4);
spdfall = (-math.abs(_root[temp]._x - _x)) * 2;
_x = (_x + (math.abs(_root[temp]._x - _x) / 2));
}
} else {
if (go == 1) {
_root.dept--;
_name = ("obj" + math.random());
_root.drop.start();
go = 0;
}
jatuh = 1;
speed++;
_y = (_y + speed);
_rotation = (_rotation + spdfall);
if (_y > 450) {
removeMovieClip(this);
}
}
} else {
_visible = 0;
removeMovieClip(this);
}
}
Instance of Symbol 97 MovieClip "obj0" in Frame 135
onClipEvent (load) {
jatuh = 0;
time = 2400;
sec = math.ceil((min * 60) - (time / 20));
min = math.ceil(time / 1200);
trigspawn = 0;
}
onClipEvent (enterFrame) {
min = math.floor(time / 1200);
sec = math.floor((time / 20) - (min * 60));
if ((time == 0) && (_root.play == 1)) {
pesan = "msg" + _root.jumlah;
duplicateMovieClip (_root.msg, pesan, _root.jumlah + 3000);
_root[pesan]._x = 200;
_root[pesan]._y = 200;
_root.play = 0;
}
if (sec < 10) {
sec = "0" + sec;
} else {
sec = sec;
}
if (min < 10) {
min = "0" + min;
} else {
min = min;
}
_root.timeview = (min + " :") + sec;
if (_root.play == 1) {
time--;
_x = (_x - ((_x - _root._xmouse) / 5));
if (_x < (_width / 2)) {
_x = (_width / 2);
} else if (_x > (400 - (_width / 2))) {
_x = (400 - (_width / 2));
}
}
}
Symbol 9 MovieClip Frame 1
var lv:LoadVars = new LoadVars();
lv.id = 792;
if (_root._url.indexOf("file://") > -1) {
lv.referer = "local";
} else {
lv.referer = _root._url.split("/")[2];
}
lv.sendAndLoad("http://www.smileygamer.com/scripts/tracking.php", lv, "GET");
this.onRelease = function () {
getURL ("http://www.smileygamer.com/?gameref=792", "_blank");
};
Symbol 22 Button
on (release) {
gotoAndStop ("playscr");
}
Symbol 23 Button
on (release) {
getURL ("http://www.smileygamer.com/highscores/food-stack.html?gameref=792", "_blank");
}
Symbol 24 Button
on (release) {
gotoAndStop ("insscr");
}
Symbol 25 Button
on (release) {
gotoAndStop ("opscr");
}
Symbol 26 Button
on (release) {
gotoAndStop ("crescr");
}
Symbol 34 Button
on (release) {
getURL ("http://www.smileygamer.com/?gameref=792", "_blank");
}
Symbol 37 Button
on (release) {
getURL ("http://www.smileygamer.com/?gameref=792", "_blank");
}
Symbol 42 Button
on (release) {
getURL ("http://www.smileygamer.com/freecontent.html?gameref=792", "_blank");
}
Symbol 45 Button
on (release) {
gotoAndStop ("mainscr");
}
Symbol 54 MovieClip Frame 34
gotoAndPlay (1);
Symbol 55 Button
on (release, releaseOutside) {
stopDrag();
}
on (press) {
startDrag ("", false, l, p, r, p);
}
Symbol 65 Button
on (release) {
if (_root.n ne "") {
_root.submit();
_visible = 0;
removeMovieClip(this);
getURL ("http://www.smileygamer.com/highscores/food-stack.html?gameref=792", "_blank");
_root.gotoAndStop("mainscr");
}
}
Symbol 97 MovieClip Frame 1
stop();