Frame 1
function printbig(wherex, wherey, fgcolor) {
if (fgcolor == -1) {
bmp.copyPixels(map, new flash.geom.Rectangle((wherex * 16) + 8, wherey * 16, 16, 16), new flash.geom.Point((wherex * 16) + 24, (wherey * 16) + 24));
} else {
bmp.copyPixels(colorbig, new flash.geom.Rectangle(16 * fgcolor, 0, 16, 16), new flash.geom.Point((wherex * 16) + 24, (wherey * 16) + 24), map, new flash.geom.Point((wherex * 16) + 8, wherey * 16), true);
}
}
function printsmall(wherex, wherey, what, fgcolor) {
if (what == -1) {
bmp.copyPixels(colorsmall, new flash.geom.Rectangle(8 * fgcolor, 0, 8, 8), new flash.geom.Point((wherex * 8) + 16, ((wherey * 8) + 24) + 16), map, new flash.geom.Point(wherex * 8, (wherey * 8) + 16), true);
} else {
bmp.copyPixels(colorsmall, new flash.geom.Rectangle(8 * fgcolor, 0, 8, 8), new flash.geom.Point((wherex * 8) + 16, ((wherey * 8) + 24) + 16), map, new flash.geom.Point(what * 8, 16), true);
}
}
function digits(od) {
fd = int(od / 100) % 10;
sd = int(od / 10) % 10;
td = od % 10;
return((chr(fd + 48) + chr(sd + 48)) + chr(td + 48));
}
Stage.scaleMode = "noScale";
Stage.showMenu = false;
focusRect = false;
tabEnabled = false;
bmp = new flash.display.BitmapData(160, 96, false, 4278190080);
var map = flash.display.BitmapData.loadBitmap("map.png");
var colorbig = flash.display.BitmapData.loadBitmap("colorbig.png");
var colorsmall = flash.display.BitmapData.loadBitmap("colorsmall.png");
inmask.createEmptyMovieClip("pic", 1000);
inmask.attachBitmap(bmp, 1);
inmask._xscale = (inmask._yscale = 600);
blur = new flash.filters.BlurFilter(4, 4, 3);
bx = 0;
by = 0;
c = 0;
then = (now = 0);
today = new Date();
curtime = today.getTime();
units = int(curtime / 15120000000);
units++;
goal = units * 15120000000;
togo = goal - curtime;
if (togo < 4752000000) {
togo = togo + 15120000000;
}
music = new Sound();
music.attachSound("music");
music.start(0, 9999);
noise = new Sound();
noise.attachSound("noise");
timeout = false;
this.createEmptyMovieClip("mainloop", 10);
mainloop.onEnterFrame = function () {
now = getTimer();
diff = now - then;
then = now;
togo = togo - diff;
if (togo > 0) {
days = int(togo / 86400000);
hours = int(togo / 3600000) % 24;
minutes = int(togo / 60000) % 60;
seconds = int(togo / 1000) % 60;
mills = togo % 1000;
bmp.applyFilter(bmp, new flash.geom.Rectangle(cxn, cyn, 152, 96), new flash.geom.Point(cxp, cyp), blur);
dd = digits(days);
printsmall(0, 0, ord(dd.charAt(0)) - 48, 0);
printsmall(1, 0, ord(dd.charAt(1)) - 48, 0);
printsmall(2, 0, ord(dd.charAt(2)) - 48, 0);
printsmall(3, 0, 10, 0);
dd = digits(hours);
printsmall(4, 0, ord(dd.charAt(1)) - 48, 0);
printsmall(5, 0, ord(dd.charAt(2)) - 48, 0);
printsmall(6, 0, 10, 0);
dd = digits(minutes);
printsmall(7, 0, ord(dd.charAt(1)) - 48, 0);
printsmall(8, 0, ord(dd.charAt(2)) - 48, 0);
printsmall(9, 0, 10, 0);
dd = digits(seconds);
printsmall(10, 0, ord(dd.charAt(1)) - 48, 0);
printsmall(11, 0, ord(dd.charAt(2)) - 48, 0);
printsmall(12, 0, 10, 0);
dd = digits(mills);
printsmall(13, 0, ord(dd.charAt(0)) - 48, 0);
printsmall(14, 0, ord(dd.charAt(1)) - 48, 0);
printsmall(15, 0, ord(dd.charAt(2)) - 48, 0);
x = 0;
while (x < 7) {
printbig(x, 0, -1);
printbig(x, 2, -1);
x++;
}
x = 0;
while (x < 16) {
printsmall(x, 1, -1, 0);
x++;
}
bmp.applyFilter(bmp, new flash.geom.Rectangle(cxn, cyn, 152, 96), new flash.geom.Point(cxp, cyp), blur);
bmp.fillRect(new flash.geom.Rectangle(0, 0, 160, 1), 4278190080);
bmp.fillRect(new flash.geom.Rectangle(0, 95, 160, 1), 4278190080);
bmp.fillRect(new flash.geom.Rectangle(0, 0, 1, 96), 4278190080);
bmp.fillRect(new flash.geom.Rectangle(0, 159, 1, 96), 4278190080);
bw = c % 32;
if (bw > 15) {
bw = 31 - bw;
}
wb = (c + 16) % 32;
if (wb > 15) {
wb = 31 - wb;
}
dd = digits(days);
printsmall(0, 0, ord(dd.charAt(0)) - 48, wb);
printsmall(1, 0, ord(dd.charAt(1)) - 48, wb);
printsmall(2, 0, ord(dd.charAt(2)) - 48, wb);
printsmall(3, 0, 10, bw);
dd = digits(hours);
printsmall(4, 0, ord(dd.charAt(1)) - 48, wb);
printsmall(5, 0, ord(dd.charAt(2)) - 48, wb);
printsmall(6, 0, 10, bw);
dd = digits(minutes);
printsmall(7, 0, ord(dd.charAt(1)) - 48, wb);
printsmall(8, 0, ord(dd.charAt(2)) - 48, wb);
printsmall(9, 0, 10, bw);
dd = digits(seconds);
printsmall(10, 0, ord(dd.charAt(1)) - 48, wb);
printsmall(11, 0, ord(dd.charAt(2)) - 48, wb);
printsmall(12, 0, 10, bw);
dd = digits(mills);
printsmall(13, 0, ord(dd.charAt(0)) - 48, wb);
printsmall(14, 0, ord(dd.charAt(1)) - 48, wb);
printsmall(15, 0, ord(dd.charAt(2)) - 48, wb);
x = 0;
while (x < 7) {
printbig(x, 0, (c + (x * 3)) % 64);
printbig(x, 2, (c + ((x + 7) * 3)) % 64);
x++;
}
x = 0;
while (x < 16) {
printsmall(x, 1, -1, (c + x) % 16);
x++;
}
c = (c + 1) % 64;
dx = (_xmouse - 480) / 288;
dy = (_ymouse - 288) / 288;
if (dx < -1) {
dx = -1;
}
if (dx > 1) {
dx = 1;
}
if (dy < -1) {
dy = -1;
}
if (dy > 1) {
dy = 1;
}
bx = bx + dx;
by = by + dy;
cxn = 0;
cyn = 0;
cxp = 0;
cyp = 0;
if (bx < -1) {
cxn = 1;
bx++;
}
if (bx > 1) {
cxp = 1;
bx--;
}
if (by < -1) {
cyn = 1;
by++;
}
if (by > 1) {
cyp = 1;
by--;
}
} else {
if (timeout == false) {
timeout = true;
music.stop();
noise.start(0, 9999);
}
bmp.fillRect(new flash.geom.Rectangle(0, 0, 160, 96), 4278255873 * random(16));
printsmall(0, 0, 0, 0);
printsmall(1, 0, 0, 0);
printsmall(2, 0, 0, 0);
printsmall(3, 0, 10, 0);
printsmall(4, 0, 0, 0);
printsmall(5, 0, 0, 0);
printsmall(6, 0, 10, 0);
printsmall(7, 0, 0, 0);
printsmall(8, 0, 0, 0);
printsmall(9, 0, 10, 0);
printsmall(10, 0, 0, 0);
printsmall(11, 0, 0, 0);
printsmall(12, 0, 10, 0);
printsmall(13, 0, 0, 0);
printsmall(14, 0, 0, 0);
printsmall(15, 0, 7, 0);
x = 0;
while (x < 7) {
printbig(x, 0, -1);
printbig(x, 2, -1);
x++;
}
x = 0;
while (x < 16) {
printsmall(x, 1, -1, 0);
x++;
}
}
};