forked from: Twennerなんです

by yasai
♥0 | Line 25 | Modified 2009-12-29 16:28:43 | MIT License
play

ActionScript3 source code

/**
 * Copyright yasai ( http://wonderfl.net/user/yasai )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/elel
 */

// forked from ozony's Twennerなんです
package {
    import caurina.transitions.Tweener;
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    public class tweener1 extends Sprite {
        public function tweener1() {
            stage.addEventListener(MouseEvent.CLICK , clickHandle);
                        
        }
        
       private function clickHandle(event:MouseEvent):void {
            var s:Sprite = new Sprite();
			s.x = mouseX;
			s.y = mouseY;
            s.graphics.beginFill((1 - Math.random() * Math.random()) * 0xFFFFFF);
            s.graphics.drawCircle(0, 0, 13*Math.random());
            s.graphics.endFill();
            addChild(s);
            
            Tweener.addTween(s, {
                time: 15,scaleX: 2,scaleY: 2,y:0 + (s.height / 2),transition: "easeOutBounce" ,
                onComplete: function():void{
                   removeChild(s);
               }
			});
		}
	}
}