flash on 2011-2-22
♥0 |
Line 26 |
Modified 2011-02-22 03:44:27 |
MIT License
archived:2017-03-20 07:26:07
ActionScript3 source code
/**
* Copyright alambertsimon ( http://wonderfl.net/user/alambertsimon )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/rguV
*/
package {
import flash.display.*;
import flash.geom.Matrix
public class FlashTest extends Sprite {
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 FlashTest() {
mat= new Matrix();
colors=[0x000000,0xFFfffF];
alphas=[1,1];
ratios=[50,100];
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();
addChild(circ)
circ.x = 200
circ.y = 200
}
}
}