test(1)
/**
* Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/eHQk
*/
// [BradSedito]2011
package
{
import flash.display.Sprite;
import flash.events.Event;
import gs.*;
import gs.easing.*;
import flash.filters.BlurFilter;
import flash.filters.GlowFilter;
[SWF( frameRate = 120 )];
public class Orbital extends Sprite
{
/////////////// var //// :TYPE //VALUE
public var spr :Sprite = new Sprite();
private var rad :Number = 0;
private var num :int = 360;
private var blurr:BlurFilter = new BlurFilter( 10,10,3 );
public function Orbital()
{
spr.x = spr.y = (230);
this.addChild(spr);
this.addEventListener(Event.ENTER_FRAME, this.Draw);
}
private function Draw(e:Event):void
{
spr.graphics.clear();
for(var i:int=0;i<num;i++)
{
var colr:int,colg:int,colb:int;
colr =( Math.sin( (i*360/num+rad) * Math.PI/180) +1) * 255/2;
colg =( Math.sin( (i*360/num+120+rad) * Math.PI/180) +1) * 255/2;
colb =( Math.sin( (i*360/num-120+rad) * Math.PI/180) +1) * 255/2;
spr.graphics.beginFill( colr * 256 * 256 + colg * 256 + colb);
spr.graphics.drawCircle(Math.cos((i*360/num+rad)*Math.PI/180)*160,Math.sin((i*360/num+rad)*Math.PI/180)*160,20);
spr.filters = [blurr];
spr.graphics.endFill();
}
rad+=2;
}
}//END (PUBLIC)CLASS "ORBITAL0
}//END PACKAGE "ORBITAL"