Welll mates, me here to enter za contest :pir:
Haveing some fun with this first flash KaleidoScope thingy.
The xmouse positions influences the number of corners of the star.
Hope you like it
Stage.scaleMode = "noScale";
this.createEmptyMovieClip("shape", 10);
import flash.filters.*;
import flash.display.*;
t = 1;
function onEnterFrame() {
img.dispose();
var img = new flash.display.BitmapData(400, 400, true, 16777215);
img.draw(this);
this.attachBitmap(img, 3, 0, true);
this.filters = [new flash.filters.BlurFilter(3, 3, 2)];
p = Math.min(Math.abs(_xmouse-200),200)/200;
drawShape(this.shape, 200, 200, 200, 50, 3+Math.min(Math.floor(p*7),7), t++);
}
function drawShape(mc, cx, cy, rmax, rmin, corners, rotation) {
mc.clear();
mc.lineStyle(3, newRgb(t), 100, 0, 0, 0, 0, 0);
mc.moveTo(cx+rmax*Math.abs(Math.sin(t/20))*Math.cos(Math.sin(t/10)), cy+rmax*Math.sin(Math.sin(t/10))*Math.abs(Math.sin(t/20)));
for (var x = 0;x<=6.283185;x+=6.283185/corners){
mc.lineTo(cx+rmax*Math.abs(Math.sin(t/20))*Math.cos(x+Math.sin(t/10)), cy+rmax*Math.sin(x+Math.sin(t/10))*Math.abs(Math.sin(t/20)));
mc.lineTo(cx+rmin*Math.abs(Math.sin(t/50))*Math.cos(x+6.283185/corners/2), cy+rmin*Math.sin(x+6.283185/corners/2)*Math.abs(Math.sin(t/50)));
}
mc.filters = [new flash.filters.GlowFilter(newRgb(t+300), 100, 5, 5, 100)];
}
function newRgb(t) {
return (Math.floor(256*Math.abs(Math.sin(t/30)) << 16)+Math.floor(256*Math.abs(Math.sin(t/25)) << 8)+Math.floor(256*Math.abs(Math.sin(t/20))));
}
this.createEmptyMovieClip("shape", 10);
t = Math.floor(Math.random()*100000);