package { import flash.display.Sprite; import flash.events.*; import flash.utils.Timer; import flash.utils.setInterval; import caurina.transitions.Tweener; public class Howa extends Sprite { var ci = new Array(); var timer:Timer; public function Howa():void { timer = new Timer(20); timer.addEventListener(TimerEvent.TIMER, posi); timer.start(); } function posi(e:Event):void{ var color = 0xFFFFFF * Math.random(); var cir:Cir = new Cir(color); cir.x = mouseX + (40 * Math.random() - 20); cir.y = mouseY+ (40 * Math.random() - 20); addChild(cir); cir.alpha -= 0.1; if(cir.alpha == 0){ removeChild(cir); } Tweener.addTween(cir, { time: 3, scaleX: 5, scaleY: 5, alpha: 0, onComplete: function():void{ removeChild(cir); } }); } } } import flash.display.Sprite; class Cir extends Sprite{ var l:Number = 5; function Cir(col):void{ graphics.beginFill(col); graphics.drawCircle(0,0,l); graphics.endFill(); } } flash on 2009-10-6