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

forked from: forked from: forked from: Hello World!!!

Get Adobe Flash player
by WinField95 12 Aug 2011
    Embed
/**
 * Copyright WinField95 ( http://wonderfl.net/user/WinField95 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1iBi
 */

// forked from WinField95's forked from: forked from: Hello World!!!
// forked from msk's forked from: Hello World!!!
// forked from nitoyon's Hello World!!!
package{
    import flash.display.*;
    import flash.text.*;
    import flash.filters.*;
    import flash.geom.*;
    import caurina.transitions.Tweener;

    public class Foo extends Sprite{
        private var bd:BitmapData;
        public function Foo():void{
            var tf:TextField = new TextField();
            tf.defaultTextFormat = new TextFormat("",10,0x0,true);
            tf.textColor = 0xFF0000;
            tf.text = "RED";
            tf.autoSize = "left";
         
            bd = new BitmapData(tf.width, tf.height, false, 0x000000);
            //bd.draw(tf);
            //bd.applyFilter(bd, bd.rect, new Point(), new BlurFilter());
            bd.draw(tf);

            for(var i:int = 0; i < bd.width; i++){
                for(var j:int = 0; j < bd.height; j++){
                    Tweener.addTween(
                        randomize(addChild(new Circle(bd.getPixel(i, j)))), 
                        {
                            x: i * 10,
                            y: j * 10,
                            alpha: 1,
                            delay: (i + j) * .2 * Math.random(), 
                            time: 1
                        }
                    );
                }
            }
        }
        private function randomize(d:DisplayObject):DisplayObject{
            d.x = 400 * Math.random();
            d.y = 300 * Math.random();
            d.alpha = 0;
            return d;
        }
    }
}


import flash.display.Sprite;

class Circle extends Sprite{
    public function Circle(color:uint):void{
        graphics.beginFill(color);
        graphics.drawRect(9,9,9,9);
        graphics.endFill();
    }
}