# Spiraling Stars

**URL:** https://forum.kirupa.com/t/spiraling-stars/175385
**Category:** contests
**Created:** [January 13, 2006, 8:33pm UTC](https://forum.kirupa.com/t/spiraling-stars/175385 "2006-01-13T20:33:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![freeskier89](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@freeskier89](https://forum.kirupa.com/u/freeskier89)
#### Post date: [January 13, 2006, 8:33pm UTC](https://forum.kirupa.com/t/spiraling-stars/175385/1 "2006-01-13T20:33:06Z")

</div>

He is my first submission :D. I will probably have more updates on it soon. Currently, it is 24 lines.

[AS]Stage.scaleMode= “noScale”;  
function CreateCircle(Name,width){  
\_root.depthvar++  
mc = \_root.createEmptyMovieClip (Name,depthvar);  
mc.lineStyle(width/4,0x5797D7,30);  
mc.beginFill(0x48BCE1,50);  
for(var t=0;t\<360;t+=10){  
if(t!=0) mc.lineTo((width\*.75+width\*.25_Math.sin(t_5_Math.PI/180))Math.cos(tMath.PI/180),(width_.75+width\*.25_Math.sin(t_5_Math.PI/180))Math.sin(Math.PI/180t));  
else mc.moveTo((width_.75+width\*.25_Math.sin(t_5_Math.PI/180))_ Math.cos(t_Math.PI/180),(width_.75+width\*.25_Math.sin(t_5_Math.PI/180))Math.sin(Math.PI/180t));  
}  
mc.endFill();  
return mc;  
}  
MovieClip.prototype.FollowPoint=function(x,y){  
this.\_x= this.\_x+(x-this.\_x)/5;  
this.\_y= this.\_y+(y-this.\_y)/5;  
}  
onEnterFrame=function(){  
dist=Math.sqrt((\_xmouse-mc0\_0.\_x)_(\_xmouse-mc0\_0.\_x)+(\_ymouse-mc0\_0.\_y)_(\_ymouse-mc0\_0.\_y));  
angle+=5;  
d\<70 ? d=70 : d=dist/1.4;  
nodesToFollow = [[\_xmouse+d_ Math.cos(angle_Math.PI/180) , \_ymouse+d_Math.sin(angle_Math.PI/180)],[\_xmouse+d_Math.cos((angle+120)_Math.PI/180) , \_ymouse+d_Math.sin((angle+120)_Math.PI/180)],[\_xmouse+d_Math.cos((angle+260)_Math.PI/180) , \_ymouse+d_Math.sin ((angle+260)_Math.PI/180)]];  
}  
for(var n=0;n\<3;n++){  
mc = CreateCircle(“mc”+n+“0");  
mc.n=n;  
mc.onEnterFrame=function(){  
this.FollowPoint(nodesToFollow[this.n][0],nodesToFollow[this.n][1]);  
}  
for(var n2=0;n2\<10;n2++){  
mc2=CreateCircle(“mc”+n+"”+(n2+1),20);  
mc2.FollowMc=root[“mc”+n+""+n2];  
mc2.\_alpha=mc2.\_xscale=mc2.\_yscale=(7-n2)_(100/7)  
mc2.onEnterFrame = function(){  
this.\_rotation=angle;  
this.FollowPoint(this.FollowMC.\_x,this.FollowMC.\_y);  
}  
}  
}  
[/AS]

Please let me know what you think!  
-freeskier89 🙂
