Forked from: gaziya's BitmapDataのエフェクトお試し3 diff:13 渦巻き gaziya forked:1favorite:4lines:41license : MIT License modified : 2011-11-24 20:27:41 Embed Tweet package { import flash.geom.ColorTransform; import flash.geom.Matrix; import flash.events.Event; import flash.display.Shape; import flash.display.BitmapData; import flash.display.Bitmap; import flash.display.Sprite; public class FlashTest extends Sprite { public function FlashTest() { graphics.beginFill(0x003333) graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight) var canvas:BitmapData=new BitmapData(stage.stageWidth,stage.stageHeight,true,0x0) addChild(new Bitmap(canvas)) var shape:Shape = new Shape with (shape) { graphics.beginFill(0xff3300) graphics.drawCircle(0,0,5) } addEventListener(Event.ENTER_FRAME, loop) var theta:Number = 0 var radius:int = 200 function loop(e:Event):void { var colorTransform:ColorTransform = new ColorTransform colorTransform.alphaMultiplier = 0.995 canvas.colorTransform(canvas.rect, colorTransform) var split:int = 8 for (var i:int= 0;i<split;i++) { var matrix:Matrix = new Matrix matrix.translate(stage.stageWidth/2,stage.stageHeight/2) matrix.translate(radius*Math.cos(2*Math.PI/split*i+theta),radius*Math.sin(2*Math.PI/split*i+theta)) canvas.draw(shape,matrix) } theta -= 0.005*Math.PI theta %= 2*Math.PI radius-- if (radius < 20) radius = 200 } } } } Code Fullscreen Preview Fullscreen savage69kr tjoen andrewexex88.. civet split translate Matrix Math.PI addEventListener Event.ENTER_FRAME Math.cos addChild Math.sin Event Sprite Number int sort new page view favorite forked pv509 スプライン曲線で追跡中 gaziya forked:1 favorite:5lines:57 (diff:41)