Frame 1
function onMouseDown() {
nextFrame();
delete onMouseDown;
}
MochiAd.showPreGameAd({id:"76d7cd5b2d691c00", res:"500x340"});
stop();
Stage.showMenu = false;
Frame 2
function onMouseDown() {
nextFrame();
delete onMouseDown;
}
stop();
Frame 157
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__("889d0aba", this, 10301, true);
mochi.MochiServices.connect("76d7cd5b2d691c00");
function onEnterFrame() {
if (!item) {
xAdd = 0;
sAdd = 0;
xsAdd = 0;
yAdd = -3;
} else {
xAdd = -90;
sAdd = 123;
xsAdd = 90;
yAdd = 37;
}
xAdd2 = ((ystart + yAdd) - T1._y) / easing;
T1._y = T1._y + xAdd2;
T2._y = T2._y + xAdd2;
T3._y = T3._y + xAdd2;
T1._x = T1._x + (((x1s + xAdd) - T1._x) / easing);
T2._x = T2._x + (((x2s + xAdd) - T2._x) / easing);
T2._xscale = T2._xscale + (((100 + sAdd) - T2._xscale) / easing);
}
function fade_in(time, color) {
F = _root.createEmptyMovieClip("FADE" + random(99), _root.getNextHighestDepth());
F._x = 0;
F._y = 0;
with (F) {
beginFill(color, 100);
moveTo(0, 0);
lineTo(Stage.width, 0);
lineTo(Stage.width, Stage.height);
lineTo(0, Stage.height);
lineTo(0, 0);
endFill();
}
F.timer = 0;
F.endTime = timer;
F.delay = time * 50;
F.onEnterFrame = function () {
F.timer++;
F._alpha = 100 - ((F.timer / F.delay) * 100);
if (F.timer >= F.delay) {
F.removeMovieClip();
}
};
}
stop();
Is.useHandCursor;
Pb.useHandCursor;
item = 0;
easing = 2;
x1s = T1._x;
x2s = T2._x;
ystart = T1._y;
xAdd = 0;
xsAdd = 0;
yAdd = 0;
Pb.onRollOver = function () {
item = false;
};
Pb.onRelease = function () {
gotoAndPlay (162);
};
Ib.onRollOver = function () {
item = true;
};
Ib.onRelease = function () {
gotoAndStop (158);
};
fade_in(1, 0);
Frame 158
function onMouseDown() {
nextFrame();
}
Frame 161
delete onMouseDown;
gotoAndStop (157);
Frame 163
function place_line() {
hasDead = false;
x = 0;
while (x < 10) {
tiles_placed++;
if (field[x][0] != 0) {
if (push_blocks(x)) {
hasDead = true;
}
}
tile = attachMovie("tile", "tile_" + tiles_placed, _root.getNextHighestDepth(), {_x:10 + (32 * x), _y:340});
num = Math.floor(Math.random() * (blocks - 1)) + 1;
tile.gotoAndStop(num);
field[x][0] = tiles_placed;
x++;
}
if (hasDead) {
L.gotoAndPlay(1);
lives--;
combo = 0;
if (lives <= 0) {
lives = 0;
Do = false;
i = 9;
while (i >= 0) {
clear_column(i);
i--;
}
Gameover._visible = true;
}
}
}
function clear_column(col_number) {
i = 9;
while (i >= 0) {
s = 0;
_root["tile_" + field[col_number][i]].gotoAndPlay(10);
field[col_number][i] = 0;
i--;
}
}
function push_blocks(col_number) {
dead = false;
i = 9;
while (i >= 0) {
if (field[col_number][i] != 0) {
if (i != 9) {
field[col_number][i + 1] = field[col_number][i];
_root["tile_" + field[col_number][i]].ny = _root["tile_" + field[col_number][i]].ny - 32;
} else {
dead = true;
clear_column(col_number);
}
}
i--;
}
return(dead);
}
function t(_tx, _ty) {
return(_root["tile_" + field[_tx][_ty]]);
}
function remove_tiles(tx, ty, clicked) {
r = 1;
C = t(tx, ty);
tile_type = _root["tile_" + field[tx][ty]]._currentframe;
if (!clicked) {
_root["tile_" + field[tx][ty]].did = true;
_root["tile_" + field[tx][ty]].gotoAndPlay(10);
field[tx][ty] = 0;
}
if ((C.b == true) or (((field[tx + 1][ty] != 0) and (t(tx + 1, ty)._currentframe == tile_type)) and (t(tx + 1, ty).did == false))) {
r = r + remove_tiles(tx + 1, ty);
}
if ((C.b == true) or (((field[tx - 1][ty] != 0) and (t(tx - 1, ty)._currentframe == tile_type)) and (t(tx - 1, ty).did == false))) {
r = r + remove_tiles(tx - 1, ty);
}
if ((C.b == true) or (((field[tx][ty + 1] != 0) and (t(tx, ty + 1)._currentframe == tile_type)) and (t(tx, ty + 1).did == false))) {
r = r + remove_tiles(tx, ty + 1);
}
if ((C.b == true) or (((field[tx][ty - 1] != 0) and (t(tx, ty - 1)._currentframe == tile_type)) and (t(tx, ty - 1).did == false))) {
r = r + remove_tiles(tx, ty - 1);
}
if ((C.b == true) or (((field[tx - 1][ty - 1] != 0) and (t(tx - 1, ty - 1)._currentframe == tile_type)) and (t(tx - 1, ty - 1).did == false))) {
r = r + remove_tiles(tx - 1, ty - 1);
}
if ((C.b == true) or (((field[tx + 1][ty - 1] != 0) and (t(tx + 1, ty - 1)._currentframe == tile_type)) and (t(tx + 1, ty - 1).did == false))) {
r = r + remove_tiles(tx + 1, ty - 1);
}
if ((C.b == true) or (((field[tx + 1][ty + 1] != 0) and (t(tx + 1, ty + 1)._currentframe == tile_type)) and (t(tx + 1, ty + 1).did == false))) {
r = r + remove_tiles(tx + 1, ty + 1);
}
if ((C.b == true) or (((field[tx - 1][ty + 1] != 0) and (t(tx - 1, ty + 1)._currentframe == tile_type)) and (t(tx - 1, ty + 1).did == false))) {
r = r + remove_tiles(tx - 1, ty + 1);
}
return(r);
}
function update_field() {
i = 0;
while (i < 10) {
j = 1;
while (j < 10) {
if ((field[i][j] != 0) and (field[i][j - 1] == 0)) {
falling = j - 1;
while ((field[i][falling] == 0) and (falling >= 0)) {
field[i][falling] = field[i][falling + 1];
_root["tile_" + field[i][falling + 1]].ny = _root["tile_" + field[i][falling + 1]].ny + 32;
field[i][falling + 1] = 0;
falling--;
}
}
j++;
}
i++;
}
}
function add_grid(xs, ys) {
bg = 0;
i = 0;
while (i < 320) {
j = 0;
while (j < 320) {
d = _root.getNextHighestDepth();
_root.attachMovie("btile", "btile" + bg, d, {_x:xs + i, _y:ys - j});
bg++;
j = j + 32;
}
i = i + 32;
}
}
function is_clear() {
i = 0;
while (i < 10) {
j = 0;
while (j < 10) {
if (field[i][j] != 0) {
return(false);
}
j++;
}
i++;
}
return(true);
}
function check_live(Lscore) {
if ((score - lastScore) > Lscore) {
lives++;
bombs++;
lastScore = score;
}
}
function create_combo(x, y, c) {
d = _root.getNextHighestDepth();
__C = _root.attachMovie("combo", "combo" + random(999), d, {_x:x, _y:y});
__C.Combo = c;
}
stop();
_root.deleteTiles = false;
Do = true;
combo = 0;
playSound = true;
var tickTime = new Array(300, 200, 150, 140, 130, 125, 122, 120, 119, 75);
var mCombo = new Array(0, 20, 50, 75, 100, 150, 175, 200, 250, 275);
m = 1;
M = 0;
Tick = 300;
mString = "x" + m;
showBlocks = true;
field = Array();
F.gotoAndStop(29);
flood = 0;
L.gotoAndStop(50);
FC.gotoAndStop(50);
bombs = 3;
interval = 250;
I = interval;
level = 1;
tick = 0;
var levels = new Array(250, 240, 220, 200, 180, 160, 150, 125, 100);
var lm = new Array(0, 200, 500, 700, 1200, 1700, 2300, 2800, 3800);
var ranks = new Array("Newbie brixter", "Begginer brixter", "Modest brixter", "Good brixter", "Pretty good brixter", "Incredible brixter", "Awesome brixter", "Amazing brixter", "Brixter Hero", "Ultimate brixter", "Master of all brixters", "God of Brixter", "Mega Men brixter", "Galaxial brixter", "Universal Master of Brixter", "Almost there...", "Yep! Just 5 more...", "Can't even wait :D", "You're a XXX brixter :D", "Rodney Mullen brixter", "Chuck Norris brixter");
var rankScore = new Array(0, 200, 500, 1300, 2500, 3800, 4900, 6000, 7000, 10000, 12000, 19000, 30000, 60000, 100000, 200000, 350000, 500000, 750000, 900000, 1000000);
currentRank = "Newbie brixter";
score = 0;
popeds = 0;
blocks = 4;
lastScore = 0;
lives = 3;
tiles_placed = 0;
add_grid(10, 300);
x = 0;
while (x < 10) {
field[x] = Array();
y = 0;
while (y < 10) {
field[x][y] = 0;
y++;
}
x++;
}
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 79) {
_root.deleteTiles();
}
if (Key.getCode() == 80) {
if (_root.Do and (_root.lives >= 1)) {
_root.Do = false;
Pause._visible = true;
}
}
};
Key.addListener(keyListener);
_root.onEnterFrame = function () {
mString = "x" + m;
if (Do) {
interval--;
if (combo != 0) {
M++;
}
tick++;
lastU++;
if (M >= Tick) {
M = 0;
combo = 0;
m = 1;
}
i = mCombo.length - 1;
while (i >= 0) {
if (combo >= mCombo[i]) {
m = i + 1;
Tick = tickTime[i];
break;
}
i--;
}
if (interval == 0) {
interval = I;
place_line();
}
i = 8;
while (i >= 0) {
if ((score / 10) >= lm[i]) {
I = levels[i];
level = i + 1;
blocks = Math.min(8, i + 3);
break;
}
i--;
}
i = rankScore.length - 1;
while (i >= 0) {
if ((score / 5) >= rankScore[i]) {
currentRank = ranks[i];
return;
}
i--;
}
}
};
onMouseDown = function () {
if (_root.Do == false) {
return(undefined);
}
x_tile_clicked = Math.floor((_root._xmouse - 10) / 32);
y_tile_clicked = -Math.floor((_root._ymouse - 300) / 32);
if ((((x_tile_clicked >= 0) and (x_tile_clicked <= 9)) and (y_tile_clicked >= 0)) and (y_tile_clicked <= 9)) {
if (field[x_tile_clicked][y_tile_clicked] != 0) {
s = remove_tiles(x_tile_clicked, y_tile_clicked, 1);
if (is_clear()) {
FC.gotoAndPlay(1);
score = score + 500;
}
if (s > 1) {
score = score + (Math.round(((s > 3) ? ((s - 1) * s) : (s - 1)) * (s / (s * 0.7))) * m);
popeds = popeds + (s - 1);
M = 0;
combo = combo + 1;
}
if ((s > 2) and playSound) {
sound.gotoAndStop(2);
}
check_live(7000);
update_field();
}
}
};
Instance of Symbol 156 MovieClip "Gameover" in Frame 163
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 167 MovieClip "Pause" in Frame 163
onClipEvent (load) {
_visible = false;
}
Frame 167
insert.password = true;
Frame 177
insert.password = true;
Frame 181
delete onEnterFrame;
delete onMouseDown;
delete onKeyDown;
mochi.MochiScores.showLeaderboard({boardID:"6ce1042d2a9d36a7", score:_root.score});
if (mochi.MochiServices.__get__connected() == false) {
ConnectError._visible = true;
_root.stop();
} else {
ConnectError._visible = false;
}
Frame 182
showBlocks = true;
i = 0;
while (i <= _root.tiles_placed) {
if (_root["tile_" + i] != undefined) {
removeMovieClip(_root["tile_" + i]);
}
i++;
}
_root.score = 0;
_root.tick = 0;
_root.combo = 0;
_root.s = 0;
_root.bombs = 3;
_root.lives = 3;
_root.Do = true;
gotoAndPlay (162);
Symbol 23 MovieClip [tile] Frame 1
function onEnterFrame() {
if (_root.deleteTiles) {
removeMovieClip(this);
}
_visible = _root.showBlocks;
bomb._visible = b;
Bump._visible = !_root.Do;
if (_currentframe > 10) {
_alpha = 100;
}
_x = (_x + ((nx - _x) / easing));
if (ny <= _y) {
_y = (_y + ((ny - _y) / easing));
} else if (ny > _y) {
_y = (_y + ((ny - _y) / 2));
}
}
poped = false;
did = false;
nx = _x;
ny = 300;
xs = _x;
ys = _y;
easing = 5;
b = false;
timer = ((Math.random() > 0.9999) ? true : false);
Timer._visible = timer;
Symbol 23 MovieClip [tile] Frame 10
if (timer == true) {
_root.M = -400;
}
gotoAndPlay (19);
Symbol 23 MovieClip [tile] Frame 19
easing = 7;
ny = ny - 32;
C = _root.s - 1;
if (C > 4) {
C = C + "!";
} else if (C <= 2) {
C = "";
}
Symbol 23 MovieClip [tile] Frame 37
removeMovieClip(this);
Symbol 25 MovieClip [btile] Frame 1
function onEnterFrame() {
_visible = _root.showBlocks;
}
Symbol 31 MovieClip [combo] Frame 20
removeMovieClip(this);
Symbol 33 MovieClip [Bomb] Frame 1
function onEnterFrame() {
i = 10;
while (i < 300) {
if ((_root._xmouse > i) and (_root._xmouse < (i + a))) {
Drx = i;
}
i = i + a;
}
i = 10;
while (i < 300) {
if ((_root._ymouse > i) and (_root._ymouse < (i + a))) {
Dry = i;
}
i = i + a;
}
if (drag) {
_root.Do = false;
if (_root._xmouse < 332) {
_y = Dry;
_x = Drx;
} else {
_x = (_root._xmouse - 15);
_y = (_root._ymouse - 15);
}
} else {
_root.Do = true;
if (_root._xmouse < 332) {
_root.bombs--;
_root.attachMovie("tileb", "tileb" + random(9999), _root.getNextHighestDepth(), {_x:Drx, _y:Dry});
}
removeMovieClip(this);
}
}
function onMouseUp() {
Do = true;
drag = false;
}
drag = true;
a = 32;
Symbol 36 MovieClip [tileb] Frame 1
Dx = _x / 32;
Dx = Math.round(Dx);
_root.clear_column(Dx);
Symbol 36 MovieClip [tileb] Frame 8
removeMovieClip(this);
Symbol 48 MovieClip Frame 1
function onEnterFrame() {
loaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (loaded != 100) {
bar._xscale = (mbar._xscale = loaded);
} else {
bar._xscale = (mbar._xscale = 100);
nextFrame();
}
}
stop();
Symbol 184 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.2");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}
Symbol 185 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.31");
}
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 _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local3, _root.getNextHighestDepth(), 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 (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 186 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 66 MovieClip Frame 1
_root.stop();
Symbol 66 MovieClip Frame 61
stopAllSounds();
_root.play();
stop();
Symbol 71 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 97 Button
on (release) {
getURL ("http://www.stickman.com.br", "_blank");
}
Symbol 105 MovieClip Frame 1
stop();
Symbol 105 MovieClip Frame 2
gotoAndStop (1);
Symbol 108 Button
on (press) {
if (_root.Do) {
_root.interval = _root.I;
_root.place_line();
}
}
Symbol 116 MovieClip Frame 1
function onEnterFrame() {
bar._xscale = (_root.interval / _root.I) * 100;
}
Symbol 121 MovieClip Frame 50
stop();
Symbol 123 MovieClip Frame 1
function onEnterFrame() {
if (((_root.bombs == 0) or (_root.lives == 0)) or (_root.Do == false)) {
_alpha = 50;
} else {
_alpha = 100;
}
}
function onRollOver() {
if (((_root.bombs == 0) or (_root.lives == 0)) or (_root.Do == false)) {
this.useHandCursor = false;
} else {
this.useHandCursor = true;
}
}
function onPress() {
if ((_root.bombs <= 0) or (_root.Do == false)) {
return(undefined);
}
d = _root.getNextHighestDepth();
b = _root.attachMovie("Bomb", "Bomb" + random(999), d, {_x:_root._xmouse - 15, _y:_root._ymouse - 15});
}
Symbol 133 MovieClip Frame 1
function onEnterFrame() {
bar._xscale = Math.max(0, (_root.M / _root.Tick) * 100);
bar._xscale = Math.min(bar._xscale, 100);
}
Symbol 134 MovieClip Frame 1
function onEnterFrame() {
bar._xscale = ((_root.combo - _root.mCombo[_root.m - 1]) / _root.mCombo[_root.m]) * 100;
}
Symbol 138 MovieClip Frame 1
onEnterFrame = function () {
if (_currentframe != 50) {
this.swapDepths(_root.getNextHighestDepth());
}
};
Symbol 138 MovieClip Frame 50
stop();
Symbol 150 Button
on (release) {
i = 0;
while (i <= _root.tiles_placed) {
if (_root["tile_" + i] != undefined) {
removeMovieClip(_root["tile_" + i]);
}
i++;
}
_root.score = 0;
_root.tick = 0;
_root.combo = 0;
_root.s = 0;
_root.bombs = 3;
_root.lives = 3;
_root.Do = true;
_visible = false;
}
Symbol 155 Button
on (release) {
_root.showBlocks = false;
_root.gotoAndStop("highscore");
_visible = false;
}
Symbol 156 MovieClip Frame 1
function onEnterFrame() {
if (this._visible) {
}
this.swapDepths(_root.getNextHighestDepth());
}
Symbol 164 MovieClip Frame 1
checked = true;
gotoAndStop (2);
Symbol 164 MovieClip Frame 2
function onRollOver() {
gotoAndStop (3);
}
function onRollOut() {
gotoAndStop (2);
}
function onPress() {
gotoAndStop (2);
}
function onRelease() {
gotoAndStop (3);
checked = !checked;
this="mCheck";//parameter overwritten
if ("mCheck") {
if (!checked) {
stopAllSounds();
} else {
_root.musicMC.gotoAndPlay(2);
}
}
Check._visible = checked;
}
function onReleaseOutside() {
gotoAndStop (2);
}
Symbol 166 Button
on (release) {
_visible = false;
_root.Do = true;
}
Symbol 167 MovieClip Frame 1
function onEnterFrame() {
if (this._visible) {
this.swapDepths(_root.getNextHighestDepth());
}
if (_root.Do) {
this._visible = false;
}
_root.playSound = sCheck.checked;
}
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 3
gotoAndStop (1);
Symbol 175 Button
on (release) {
if (insert.text == "ak/nb8") {
gotoAndStop (1);
}
}
Symbol 178 Button
on (release) {
if (insert.text == "ak/nb8") {
gotoAndStop (162);
}
}
Symbol 180 Button
on (release) {
_root.nextFrame();
}