Frame 1
function otherOnEnterFrame() {
scode = rhythm.substr(beat, rhy - beat) + rhythm;
if ((song.position > nextup) && ((song.position - nextup) < 1500)) {
if (rhythm.charAt(beat) == "x") {
yblur = 64;
}
if (rhythm.charAt(beat) == "o") {
xblur = 64;
}
if (rhythm.charAt(beat) != ".") {
changeit();
}
beat = (beat + 1) % rhy;
nextup = int(beat * blen);
}
tcode = conv(song.position, 4);
bcode = conv(beat, 2);
xcode = conv(xblur, 2);
ycode = conv(yblur, 2);
blur = new flash.filters.BlurFilter(xblur, yblur, 1);
bmp[0].copyPixels(gif, fullscreen, origin);
if ((xblur * yblur) != 1) {
bmp[0].applyFilter(bmp[0], fullscreen, origin, blur);
}
if (xblur != 1) {
xblur = xblur / 2;
}
if (yblur != 1) {
yblur = yblur / 2;
}
}
function changeit() {
cc = ((cc + random(63)) + 1) % 64;
ccode = conv(cc, 2);
ctxt = colors[cc].toUpperCase();
x = cc % 4;
y = int(cc / 4) % 4;
z = int(cc / 16);
rect(1, 0, 0, 800, 700, ((4278190080 + (5570560 * x)) + (21760 * y)) + (85 * z));
}
function conv(cn, cd) {
rs = cn.toString(16).toUpperCase();
while (rs.length < cd) {
rs = "0" + rs;
}
return(rs);
}
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("megumi.gif");
fullscreen = new flash.geom.Rectangle(0, 0, 800, 700);
origin = new flash.geom.Point(0, 0);
focusRect = false;
tabEnabled = false;
bmp = new Array();
x = 0;
while (x < 2) {
bmp[x] = new flash.display.BitmapData(800, 700, true, 4278190080);
x++;
}
bh.attachBitmap(bmp[0], 0);
br.attachBitmap(bmp[1], 1);
bmp[0].copyPixels(gif, new flash.geom.Rectangle(0, 0, 800, 700), origin);
song = new Sound();
song.attachSound("song.wav");
song.start(0, 9999);
rhythm = "";
rhythm = rhythm + "x..xo...x...o...";
rhythm = rhythm + "x..xo...x...o...";
rhythm = rhythm + "x..xo...x...o...";
rhythm = rhythm + "x..xo...x...oxoo";
rhythm = rhythm + "x..xo...x...o...";
rhythm = rhythm + "x..xo...x...o...";
rhythm = rhythm + "x..xo...x...o...";
rhythm = rhythm + "x...o...x...oooo";
this.desiredFrameRate = 60;
this.callFunctionInt = setInterval(this, "otherOnEnterFrame", 1000 / this.desiredFrameRate);
rhy = length(rhythm);
blen = song.duration / rhy;
beat = (nextup = 0);
xblur = (yblur = 1);
colors = new Array();
colors[0] = "black";
colors[1] = "brick";
colors[2] = "crimson";
colors[3] = "red";
colors[4] = "turtle";
colors[5] = "sludge";
colors[6] = "brown";
colors[7] = "orange";
colors[8] = "green";
colors[9] = "grass";
colors[10] = "maize";
colors[11] = "citrus";
colors[12] = "lime";
colors[13] = "leaf";
colors[14] = "chartreuse";
colors[15] = "yellow";
colors[16] = "midnight";
colors[17] = "plum";
colors[18] = "pomegranate";
colors[19] = "rose";
colors[20] = "swamp";
colors[21] = "dust";
colors[22] = "dirt";
colors[23] = "blossom";
colors[24] = "sea";
colors[25] = "ill";
colors[26] = "haze";
colors[27] = "peach";
colors[28] = "spring";
colors[29] = "mantis";
colors[30] = "brilliant";
colors[31] = "canary";
colors[32] = "navy";
colors[33] = "grape";
colors[34] = "mauve";
colors[35] = "purple";
colors[36] = "cornflower";
colors[37] = "deep";
colors[38] = "lilac";
colors[39] = "lavender";
colors[40] = "aqua";
colors[41] = "steel";
colors[42] = "grey";
colors[43] = "pink";
colors[44] = "bay";
colors[45] = "marina";
colors[46] = "tornado";
colors[47] = "saltine";
colors[48] = "blue";
colors[49] = "twilight";
colors[50] = "orchid";
colors[51] = "magenta";
colors[52] = "azure";
colors[53] = "liberty";
colors[54] = "royalty";
colors[55] = "thistle";
colors[56] = "ocean";
colors[57] = "sky";
colors[58] = "periwinkle";
colors[59] = "carnation";
colors[60] = "cyan";
colors[61] = "turquoise";
colors[62] = "powder";
colors[63] = "white";
cc = 0;