Ist schon länger her, dass ich das gebastelt hab. Ich finde aber, es sieht nicht schlecht aus. Ist in keiner Weise Performanceoptimiert.
Verbesserungen und Kritik erwünscht

Copy&Paste:
ActionScript:
MovieClip.prototype.polygon = function(ox, oy, r, s) {
var rad = Math.PI*2, step = rad/s;
this.moveTo(ox+r, oy);
while (s--) {
this.lineTo(ox+r*Math.cos(rad-step*s), oy+r*Math.sin(rad-step*s));
}
};
Color.random = function() {
var a = random(0xffffff)+1;
return "0x"+a.toString(16);
};
MovieClip.prototype.polyShape = function(ox, oy, r, s, c) {
this.lineStyle(0, 0x000000, 0);
this.beginFill(c, 100);
this.polygon(ox, oy, r, s);
this.polygon(ox, oy, r*0.6, s);
this.endFill();
};
function randPoly() {
var mc = this.createEmptyMovieClip("mc"+d, d++), r, angle;
mc._x = _xmouse;
mc._y = _ymouse;
mc.polyShape(0, 0, random(maxR-1)+1, random(maxS-3)+3, Color.random());
mc.xSpeed = (!(random(2)) ? -1 : 1)*random(maxXSpeed);
mc.ySpeed = (!(random(2)) ? -1 : 1)*random(maxYSpeed);
mc.rotSpeed = (!(random(2)) ? -1 : 1)*rotSpeed;
mc.onEnterFrame = function() {
if (this._xscale>0) {
this._xscale -= scaleSpeed;
this._yscale -= scaleSpeed;
this._rotation -= this.rotSpeed;
this._alpha -= scaleSpeed;
this._x += this.xSpeed;
this._y += this.ySpeed;
this.ySpeed += grav;
this.xSpeed *= reibung;
} else {
this.removeMovieClip();
mcs--;
}
};
mcs++;
}
function init() {
if (!inited) {
inited = true;
scaleSpeed = 3;
rotSpeed = 6;
maxS = 6;
maxR = 50;
maxXSpeed = 10;
maxYSpeed = 10;
grav = 1;
reibung = 0.9;
d = mcs=0;
_quality = "low";
this.onMouseMove = randPoly;
}
}
init();
MfG