In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

Math.random()がおもしろい。

Get Adobe Flash player
by nsmt 05 Apr 2009
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()
        
    }
}