Frame 1
function otherOnEnterFrame() {
q = (q + 1) % 24;
if ((song.position > nextup) && ((song.position - nextup) < 1500)) {
goburst = false;
quickburst = 0;
if (rhythm.charAt(beat) == "o") {
goburst = true;
}
if (rhythm.charAt(beat) == "x") {
quickburst = 2;
}
beat = (beat + 1) % rhy;
nextup = int(beat * blen);
}
rect(0, 479, 0, 1, 360, 4278190080);
bmp[0].applyFilter(bmp[0], fullscreen, new flash.geom.Point(-5, 0), hblur);
rect(2, 0, 0, 480, 360, 0);
x = 0;
while (x < 50) {
tiny[x].xp = tiny[x].xp + tiny[x].xv;
if (tiny[x].xp < 0) {
tiny[x].xp = tiny[x].xp + 479;
}
rect(2, tiny[x].xp - 2, tiny[x].yp - 2, Math.abs(tiny[x].xv) + 2, Math.abs(tiny[x].xv) + 2, 4278190080);
rect(2, tiny[x].xp - 1, tiny[x].yp - 1, Math.abs(tiny[x].xv), Math.abs(tiny[x].xv), 4294967295);
x++;
}
x = 0;
while (x < 10) {
qq = (q + (x * 2)) % 24;
sm[x].xp = sm[x].xp + sm[x].xv;
if (sm[x].xp < -50) {
sm[x].xp = sm[x].xp + 529;
}
bmp[2].copyPixels(smalls, new flash.geom.Rectangle(50 * (qq % 6), 50 * int(qq / 6), 50, 50), new flash.geom.Point(sm[x].xp, sm[x].yp), null, null, true);
rect(0, random(478), random(330), 1, 1, 4294967295);
x++;
}
bmp[2].copyPixels(scroller, new flash.geom.Rectangle(0, 0, 1160, 20), new flash.geom.Point(sx, 344), null, null, true);
sx--;
if (sx == -690) {
sx = 0;
}
xp = xp + int(xv / d);
yp = yp + int(yv / d);
if (xp > (240 * d)) {
xv--;
} else {
xv++;
}
if (yp > (124 * d)) {
yv--;
} else {
yv++;
}
bmp[2].copyPixels(stars, new flash.geom.Rectangle(100 * (q % 6), 100 * int(q / 6), 100, 100), new flash.geom.Point(int(xp / d), int(yp / d)), null, null, true);
bmp[0].copyPixels(bmp[2], fullscreen, origin, null, null, true);
if (goburst || (quickburst > 0)) {
quickburst--;
x = -1;
while (x < 2) {
y = -1;
while (y < 2) {
bmp[1].copyPixels(bmp[2], fullscreen, new flash.geom.Point(x * 2, y * 2), null, null, true);
y++;
}
x++;
}
swapcolor(1, 4278190080, 4294967295);
bmp[1].applyFilter(bmp[1], fullscreen, new flash.geom.Point(-1, 0), oblur);
swapcolor(1, 4294967295, 0);
}
swapcolor(0, 4294967295, rainbow[q]);
bmp[1].applyFilter(bmp[1], fullscreen, new flash.geom.Point(-1, 0), oblur);
}
function swapcolor(swl, swold, swnew) {
bmp[swl].threshold(bmp[swl], fullscreen, origin, "==", swold, swnew, 4294967295, false);
}
function rect(l, x, y, w, h, c) {
bmp[l].fillRect(new flash.geom.Rectangle(x, y, w, h), c);
}
stop();
fullscreen = new flash.geom.Rectangle(0, 0, 480, 360);
origin = new flash.geom.Point(0, 0);
hblur = new flash.filters.BlurFilter(8, 1, 1);
oblur = new flash.filters.BlurFilter(2, 2, 1);
focusRect = false;
tabEnabled = false;
_root.createEmptyMovieClip("bh", 10);
bmp = new Array();
x = 0;
while (x < 3) {
bmp[x] = new flash.display.BitmapData(480, 360, true, 6710886);
bh.attachBitmap(bmp[x], x);
x++;
}
var stars = flash.display.BitmapData.loadBitmap("star.gif");
var smalls = flash.display.BitmapData.loadBitmap("small.gif");
var scroller = flash.display.BitmapData.loadBitmap("scroller.gif");
bh._xscale = (bh._yscale = 200);
rainbow = new Array();
rainbow[0] = 4294901760;
rainbow[1] = 4294909952;
rainbow[2] = 4294918144;
rainbow[3] = 4294926336;
rainbow[4] = 4294934528;
rainbow[5] = 4294942720;
rainbow[6] = 4294950912;
rainbow[7] = 4294959104;
rainbow[8] = 4294967040;
rainbow[9] = 4290834432;
rainbow[10] = 4286636032;
rainbow[11] = 4282437632;
rainbow[12] = 4278239232;
rainbow[13] = 4279279680;
rainbow[14] = 4280320128;
rainbow[15] = 4281360576;
rainbow[16] = 4282401023;
rainbow[17] = 4285542640;
rainbow[18] = 4288684256;
rainbow[19] = 4291825872;
rainbow[20] = 4294901952;
rainbow[21] = 4294901904;
rainbow[22] = 4294901856;
rainbow[23] = 4294901808;
q = 0;
d = 5;
xp = 233 * d;
yp = 116 * d;
xv = 14 * d;
yv = 16 * d;
nx = 479;
ny = 257;
sx = 480;
tiny = new Array();
x = 0;
while (x < 50) {
tiny[x] = new Object();
tiny[x].xp = nx;
tiny[x].yp = ny - 2;
tiny[x].xv = (x % 2) - 2;
nx = (((nx * ny) * ny) + 121) % 480;
ny = (((nx * nx) * ny) + 121) % 350;
x++;
}
nx = (((ny * ny) * nx) + 77) % 480;
ny = ((nx * nx) + 175) % 330;
sm = new Array();
x = 0;
while (x < 10) {
sm[x] = new Object();
sm[x].xp = nx;
sm[x].yp = ny - 50;
sm[x].xv = (x % 2) - 4;
nx = (((nx * ny) * ny) + 95) % 480;
ny = (((nx * nx) * ny) + 95) % 350;
x++;
}
song = new Sound();
song.attachSound("song.wav");
song.start(0, 9999);
rhythm = "";
rhythm = rhythm + "........o................o.....................o........x.x.x.x.x.xox.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x..x.x.x.x.x.x.x.x.x.xox.x.x.xox.x.x.x.x.x.x.x..............ox.x.x.x.x.x.x.xox.x.x.xox.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.xox.x.x.xox.x.x.x.x.x.x.xox.x.x.xox.x.x.x.x.x.x.x.x.x.x.x.x.x.x.xo...............";
rhy = length(rhythm);
blen = song.duration / rhy;
beat = (nextup = 0);
this.desiredFrameRate = 60;
this.callFunctionInt = setInterval(this, "otherOnEnterFrame", 1000 / this.desiredFrameRate);
Symbol 6 Button
on (release) {
getURL ("https://www.youtube.com/watch?v=08RNjCAjjfg");
}