Silly Stars

Just been playing with my star:

drawStar = function (aRadius,bRadius,CircleX,CircleY,clip,colour) {
clip.beginFill(colour, Math.random()*70+30);
clip.moveTo(CircleX+bRadius*Math.cos(-Math.PI/5),CircleY-bRadius*Math.sin(-Math.PI/5));
for (var i = 0; i<11; i=i+2) {
clip.lineTo(CircleX+aRadius*Math.cos((i*(-Math.PI/5))),CircleY-aRadius*Math.sin((i*(-Math.PI/5))));
clip.lineTo(CircleX+bRadius*Math.cos(((i+1)*(-Math.PI/5))),CircleY-bRadius*Math.sin((i+1)*(-Math.PI/5)));
}
clip.endFill();
};
_root.onMouseDown = function() {
myStars = createEmptyMovieClip("starClip", i);
drawStar(Math.random()*50, 35, 10, 15, myStars, 0xFFCCFF);
drawStar(35, Math.random()*25, 0, 0, myStars, 0xFF3399);
drawStar(15, 10, -5, -5, myStars, 0xFDB0FD);
myStars._x = _root._xmouse;
myStars._y = _root._ymouse;
myStars.onEnterFrame = function() {
this._rotation= this._rotation+Math.random()*100;
};
if (i<10) {
i++;
} else {
i = 0;
}
};

hmm, maybe a bg something like : #00D5D5?
I think I like the really spikey ones.
Ok, must go do some work now I suppose. 🙂

Comments are closed.

Powered by WordPress. Designed by Woo Themes