Forked from: Altschuler's flash on 2010-1-29 diff:39 forked from: flash on 2010-1-29 azzurro510 forked:0favorite:1lines:39license : MIT License modified : 2010-01-31 00:54:43 Embed Tweet // 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; } } } Code Fullscreen Preview Fullscreen layola : 画花纹画花纹 画花纹 InterpolationMethod.LINEAR_RGB Matrix Math.cos Event.ENTER_FRAME Math.sin Event int Number