PDA

View Full Version : Spiral Circles



hybrid101
January 14th, 2006, 02:47 AM
well, following some tutorials, i'm now ready. found an effect and tried to replicate it. here goes...


var aD = [];
this.onEnterFrame = function(){
aD.push(tD = this.createEmptyMovieClip("dot"+(i = (++i > 100000 ? 0 : i)), i));
tD.idx = aD.length;
tD._x = tD.tx = _xmouse;
tD._y = tD.ty = _ymouse;
n1 = Math.sin((i % 360) * (Math.PI/180));
n2 = Math.sin(((i+120) % 360) * (Math.PI/180));
n3 = Math.sin(((i+240) % 360) * (Math.PI/180));
col = ((0x9F + (0x5F * n1) << 16) | (0x9F + (0x5F * n2) << 8) | (0x9F + (0x5F * n3)));
tD.lineStyle(14,col,100);
tD.lineTo(0.5,0);
tD.onEnterFrame = function(){
this._x = this.tx + (Math.cos(this.ang += 0.3) * (this.rad++));
this._y = this.ty + (Math.sin(this.ang) * (this.rad));
if((this._alpha-=0.85) < 0){
this._parent.aD.splice(this.idx,1);
this.removeMovieClip();
}
}
}

Sinister Shadow
January 14th, 2006, 05:41 AM
Wow! Definitely liking this! :thumb2:

Gelatine Cow
January 14th, 2006, 11:23 AM
So. Fweakin. Awesome.

Sinister Shadow
January 14th, 2006, 11:30 AM
I'm liking this one so much I had to post twice just to say it! :love:

Seb Hughes
January 14th, 2006, 01:37 PM
WOW Jules, im definatly loving this one.

phorte
January 14th, 2006, 08:03 PM
now thats awsome!

hybrid101
January 15th, 2006, 04:44 AM
thanks guys! i'm looking to improve it more...

McGiver
January 15th, 2006, 06:54 AM
wow awesome :)