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

flash on 2011-6-2

Get Adobe Flash player
by toshi.nojima 02 Jun 2011
/**
 * Copyright toshi.nojima ( http://wonderfl.net/user/toshi.nojima )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/urVR
 */

package {
    import flash.display.*;
    import flash.text.*;
    
    import caurina.transitions.Tweener;
    [ SWF( frameRate=30, backgroundColor=0x000000 ) ]
    
    public class FlashTest extends Sprite {
        public function FlashTest() {
            
            var stg:Stage = this.stage;
            
            for( var i:int = 0; i < 100; i++ ) {
                var sp:Sprite = new Sprite();
                var G:Graphics = sp.graphics;
                var color:Number = Math.random() * 0xFFFFFF;
                G.lineStyle( 1, color, 0.6 );
                G.beginFill( color, 1 );
                G.drawCircle( 0, 0, 3 );
                G.endFill();
                
                var pos1:Number = Math.random() * stg.stageWidth;
                var pos2:Number = Math.random() * stg.stageWidth;
                
                sp.x = pos1;
                sp.y = stg.stageHeight / 2;
                sp.alpha = 1;
                
                this.addChild( sp );
                
                Tweener.addTween( sp, { x:pos2, time:6, alpha:0, transition:"easeOutExpo" } );
            }
        }
    }
}