Frame 1
stop();
startB.onPress = function () {
gotoAndStop (2);
};
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;
var pv;
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);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&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__("4fc96846", this, 10301, true);
Instance of Symbol 7 MovieClip in Frame 1
on (release) {
getURL ("http://www.gamegutter.com", "_blank");
}
Frame 2
function c(a, b, g, h, t) {
x = 0;
while (x < 16) {
if (s[x] & (1 << g)) {
if (t > 0) {
m[(a + (x % 4)) + ((b + (x >> 2)) * 15)] = -color[h];
} else {
if ((((m[(a + (x % 4)) + ((b + (x >> 2)) * 15)] > 0) or ((b + (x >> 2)) > 19)) or ((a + (x % 4)) < 0)) or ((a + (x % 4)) > 9)) {
return(1);
}
if (t < 0) {
m[(a + (x % 4)) + ((b + (x >> 2)) * 15)] = color[h];
}
}
}
x++;
}
}
function renderFrame() {
i = 0;
while (i < 2) {
c(11, i * 5, queue[i], Math.floor(queue[i] / 4), 1);
i++;
}
c(u, v, piece, Math.floor(piece / 4), 1);
game.clear();
game.lineStyle(2);
q = 300;
while (q--) {
if (m[q]) {
game.beginFill(Math.abs(m[q]));
if (m[q] < 0) {
delete m[q];
}
game.moveTo(8 + ((q % 15) * 15), 28 + (int(q / 15) * 15));
game.lineTo(23 + ((q % 15) * 15), 28 + (int(q / 15) * 15));
game.lineTo(23 + ((q % 15) * 15), 43 + (int(q / 15) * 15));
game.lineTo(8 + ((q % 15) * 15), 43 + (int(q / 15) * 15));
game.lineTo(8 + ((q % 15) * 15), 28 + (int(q / 15) * 15));
game.endFill();
}
}
}
function alterMatrix() {
v++;
if (c(u, v, piece, Math.floor(piece / 4), 0)) {
if (v < 0) {
game.removeMovieClip();
clearInterval(timer);
gotoAndStop (3);
} else {
v--;
q--;
c(u, v, piece, Math.floor(piece / 4), -1);
i = 0;
while (i < 20) {
x = 0;
while (m[x + (i * 15)]) {
x++;
}
if (x == 10) {
m.splice(i * 15, 15);
m.unshift(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
lines.text = int(lines.text) + 1;
score.text = int(score.text) + 10;
if (!(int(lines.text) % 10)) {
level.text = int(level.text) + 1;
clearInterval(timer);
timer = setInterval(alterMatrix, 520 - (int(level.txt) * 20));
}
}
i++;
}
i = (piece = queue.shift());
queue[3] = random(7) * 4;
v = -((u = 3));
}
}
renderFrame();
}
var queue = new Array();
var color = [13369344, 52224, 204, 13421568, 52428, 213912768, 13395456];
var game = createEmptyMovieClip("game", 2);
game._alpha = 50;
var w = ((z = 0));
var s = [4325376, 178954464, 8653312, null, 89458032, 268435455, 89520863, 83886080, 2183168, 178937791, 1615119, null, null, 167772160];
var m = [];
var v = (-((u = 3)));
lines.text = 0;
score.text = 0;
level.text = 1;
piece = random(28);
i = 0;
while (i < 4) {
queue[i] = random(7) * 4;
i++;
}
game.onKeyDown = function () {
var _local2 = Key.getCode();
switch (_local2) {
case 32 :
while (!c(u, v, piece, Math.floor(piece / 4), 0)) {
v++;
}
v--;
break;
case 37 :
u--;
if (c(u, v, piece, Math.floor(piece / 4), 0)) {
u++;
}
break;
case 38 :
var _local1 = piece++;
if (!(piece % 4)) {
piece = piece - 4;
}
if (c(u, v, piece, Math.floor(piece / 4), 0)) {
piece = _local1;
}
break;
case 39 :
u++;
if (c(u, v, piece, Math.floor(piece / 4), 0)) {
u--;
}
break;
case 40 :
_local1 = piece--;
if (((piece % 4) == 3) || ((piece % 4) < 0)) {
piece = piece + 4;
}
if (!c(u, v, piece, Math.floor(piece / 4), 0)) {
break;
}
piece = _local1;
}
renderFrame();
};
Key.addListener(game);
alterMatrix();
var timer = setInterval(alterMatrix, 500);
Frame 3
startB.onPress = function () {
gotoAndStop (2);
};