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

2009

Get Adobe Flash player
by ogty 02 Jan 2009
// forked from nitoyon's Hello World!!!
package{
    import flash.display.*;
    import flash.text.*;
    import caurina.transitions.Tweener;

    public class Foo extends Sprite{
        private var bd:BitmapData;
        public function Foo():void{
            var tf:TextField = new TextField();
            tf.textColor = 0x000000;
            tf.text = "2009";
            tf.autoSize = "left";
			var format:TextFormat = new TextFormat();
			format.size = 13;
			format.font = "_ゴシック";
			tf.setTextFormat( format );
            bd = new BitmapData(tf.width, tf.height, false, 0xffffff);
            bd.draw(tf);
           for(var i:int = 0; i < bd.width; i++){
                for(var j:int = 0; j < bd.height; j++){
					var color = bd.getPixel(i, j);
					if( !color ){
						var myCircle:Circle = new Circle();
						myCircle.x = i * 15;
						myCircle.y = j * 15;
						myCircle.alpha = 1;
						myCircle.scaleX = myCircle.scaleY = 0;
						addChild(myCircle);
                    Tweener.addTween(
                        myCircle, 
                        {
                            alpha: 1,
							scaleX: 1,
							scaleY: 1,
                            delay: (i + j) * .1 * Math.random(),
                            time: 1
                        }
                    );
					}
                }
            }
        }
    }
}


import flash.display.Sprite;
import flash.events.MouseEvent;
import caurina.transitions.Tweener;

class Circle extends Sprite{
    public function Circle():void{
		var color:uint = 0xFFFFFF*Math.random();
        graphics.beginFill(color);
        graphics.drawCircle(0, 0, 9);
        graphics.endFill();
		mouseEnabled = true;
		
		addEventListener( MouseEvent.MOUSE_OVER, onMouse );
    }
	function onMouse( event:MouseEvent ){
		var cc:Sprite = event.target as Sprite;
		Tweener.addTween( cc, { scaleX:1.5, scaleY:1.5,  time:0.5, transition:"easeOutBounce", 
						 onComplete:function():void{	Tweener.addTween( cc, { scaleX:1, scaleY:1,  time:0.5, delay:1, transition:"easeOutBounce" } );
							 } });
	}
}