Frame 1
function otherOnEnterFrame() {
z = 0;
while (z < speed) {
sx = random(int(size / 20) + 3) + 1;
sy = random(int(size / 20) + 3) + 1;
rx = random(319 - sx) + sx;
ry = random(239 - sy) + sy;
rect(1, rx - sx, ry - sy, (sx * 2) + 1, (sy * 2) + 1, bmp[0].getPixel(rx, ry) + 4278190080);
z++;
}
size = size - 1;
if (size == 0) {
size = 40;
frame = (frame + 1) % 12;
bmp[0].copyPixels(gif, new flash.geom.Rectangle(0, 240 * frame, 320, 240), origin);
}
}
function rect(l, x, y, w, h, c) {
bmp[l].fillRect(new flash.geom.Rectangle(x, y, w, h), c);
}
var gif = flash.display.BitmapData.loadBitmap("pixelism.gif");
fullscreen = new flash.geom.Rectangle(0, 0, 320, 240);
origin = new flash.geom.Point(0, 0);
focusRect = false;
tabEnabled = false;
_root.createEmptyMovieClip("bh", 10);
bmp = new Array();
x = 0;
while (x < 2) {
bmp[x] = new flash.display.BitmapData(320, 240, true, 4278190080);
bh.attachBitmap(bmp[x], x);
x++;
}
bh._xscale = (bh._yscale = 200);
q = 0;
speed = 60;
size = 150;
frame = 0;
bmp[0].copyPixels(gif, new flash.geom.Rectangle(0, 240 * frame, 320, 240), origin);
song = new Sound();
song.attachSound("song.mp3");
song.start(0, 999);
x = 0;
while (x < 32) {
e = x * 10;
rect(1, e, 0, 10, 10, bmp[0].getPixel(e, 0) + 4278190080);
rect(1, e, 230, 10, 10, bmp[0].getPixel(e, 230) + 4278190080);
if (x < 24) {
rect(1, 0, e, 10, 10, bmp[0].getPixel(0, e) + 4278190080);
rect(1, 310, e, 10, 10, bmp[0].getPixel(310, e) + 4278190080);
}
x++;
}
this.desiredFrameRate = 60;
this.callFunctionInt = setInterval(this, "otherOnEnterFrame", 1000 / this.desiredFrameRate);