SimpleGradientCircle
/**
* Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/jatZ
*/
// BradSedito 2011
// SimpleGradientCircle Class
package {
import flash.display.*;
import flash.geom.Matrix;
import flash.filters.BlurFilter;
public class SimpleGradientCircle extends Sprite
{
public var SW :Number = stage.stageWidth ;
public var SH :Number = stage.stageHeight ;
private var bF :BlurFilter = new BlurFilter( 75, 75, 3 );
private var mat :Matrix ;
private var colors :Array ;
private var alphas :Array ;
private var ratios :Array ;
private var circRad :Number = 0x100 ;
private var circ :Shape = new Shape() ;
public function SimpleGradientCircle()
{
mat= new Matrix();
colors = [0x000000,0xFFfffF];
alphas = [1,1];
ratios = [ 30, 150 ];
mat.createGradientBox( 2*(-circRad), 2*(-circRad), 0, circRad, circRad );
circ.graphics.lineStyle();
circ.graphics.beginGradientFill(GradientType.RADIAL,colors,alphas,ratios,mat);
circ.graphics.drawCircle(0,0,circRad);
circ.graphics.endFill();
circ.x = SW/2;
circ.y = SH/2;
circ.filters = [bF];
addChild(circ);
}
}
}