Frame 1
ang = 0;
_size = (size = 100);
step = random(360) + 1;
offset = 0;
dirty = 0;
incr = (-step) / 360;
arrsize = 360 / step;
vals = [];
i = 0;
lastx = (lasty = 0);
r = (g = (b = 0));
colincr = 3;
col = 0;
level = this;
clearInst = function () {
var i = 0;
while (i <= ang) {
level["line" + i].removeMovieClip();
i = i + step;
}
};
onUnload = clearInst;
_root.keyList = new Object();
Key.addListener(_root.keyList);
_root.keyList.onKeyUp = function () {
if (Key.getCode() == 32) {
clearInst();
vals = [];
i = (ang = 0);
step = random(360) + 1;
incr = (-step) / 360;
arrsize = 360 / step;
size = _size;
r = (g = (b = 0));
lastx = (lasty = 0);
}
};
onMouseDown = function () {
onEnterFrame = draw;
};
onMouseUp = function () {
delete onEnterFrame;
};
draw = function () {
mc = createEmptyMovieClip("line" + ang, ang);
rad = (ang * Math.PI) / 180;
with (mc) {
lineStyle(0, 0, 10);
if (ang > step) {
moveTo(lastx + 275, lasty + 200);
}
if (vals[i].x == null) {
vals[i] = {};
vals[i].x = Math.cos(rad);
vals[i].y = Math.sin(rad);
vals[i].off = (Math.random() * offset) - (0.5 * offset);
lastx = (vals[i].x * size) + vals[i].off;
lasty = (vals[i].y * size) + vals[i].off;
} else {
lastx = ((vals[i].x * size) + vals[i].off) + ((Math.random() * dirty) - (0.5 * dirty));
lasty = ((vals[i].y * size) + vals[i].off) + ((Math.random() * dirty) - (0.5 * dirty));
}
if (ang > step) {
lineTo(lastx + 275, lasty + 200);
}
i++;
i = i % arrsize;
}
size = Math.cos(ang) * _size;
ang = ang + step;
};
Symbol 4 MovieClip Frame 60
stop();