forked from: flash on 2010-1-29
/**
* Copyright azzurro510 ( http://wonderfl.net/user/azzurro510 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/d5iY
*/
// forked from Altschuler's flash on 2010-1-29
package {
import flash.geom.Matrix;
import flash.display.Sprite;
import flash.events.Event;
import flash.display.GradientType;
import flash.display.SpreadMethod;
import flash.display.InterpolationMethod;
[SWF (backgroundColor = "0x0", frameRate = "30", width = "465", height = "465")]
public class drawGraphics extends Sprite {
private var n : Number = 0;
private const r : Number = 200;
public function drawGraphics() {
stage.addEventListener(Event.ENTER_FRAME, draw);
}
private function draw(event : Event):void {
graphics.clear();
graphics.lineStyle(1,0,.5);
graphics.moveTo(r,r);
graphics.lineGradientStyle(
GradientType.RADIAL,
[0xFF0000, 0xFFFF00, 0x00FF00, 0x00FFFF, 0x0000FF],
[ 1.0 , 1.0, 1.0, 1.0 , 1.0],
[ 0 , 64 , 128 , 192 , 255],
new Matrix(
1 , 0 ,
0 , 1 ,
0 , 0
),
SpreadMethod.REPEAT,
InterpolationMethod.LINEAR_RGB,
0.0
);
for (var i : int = 0; i < r; i += 1) {
graphics.lineTo(r + (i * Math.cos(i + (i * n))), r + (i * Math.sin(i + (i * n))));
}
n += .001;
}
}
}