flash on 2009-8-5

by hacker_9p8x8mco
♥0 | Line 27 | Modified 2009-08-05 12:30:34 | MIT License
play

ActionScript3 source code

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

// forked from nsmt's Math.random()がおもしろい。
package {
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import caurina.transitions.*;
    
    [SWF(width="465", height="465", backgroundColor="#ffffff", frameRate="60")]
    
    public class FlashTest extends Sprite {
        private var maru:Sprite;
        
        public function FlashTest() {
            
            init();
        }
        
        private function init():void {
			
			for(var i:int = 1; i<=20; i++) {
				
				maru = new Sprite();
				addChild(maru);
				
				maru.graphics.beginFill(Math.random()*0xffffff);
				maru.graphics.drawCircle(0, 0, Math.random()*4.5);
				maru.graphics.endFill();
				
				maru.x = Math.random()*stage.stageWidth;
				maru.y = Math.random()*stage.stageHeight;
				maru.alpha = 0;
				
			
				Tweener.addTween(maru, {scaleX:20, scaleY:20, time:2, delay:0.2*i, alpha:Math.random(), transition:"easeOutElastic"});
			}
		}	//init()
        
    }
}