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: color line

目標 : http://www.flickr.com/photos/birdbrid/3495765388/
Get Adobe Flash player
by makc3d 14 May 2009
    Embed
// forked from ahchang's forked from: color line (license: WTFPL v2 http://sam.zoy.org/wtfpl/)
// forked from uranodai's color line
/**
* 目標 : http://www.flickr.com/photos/birdbrid/3495765388/
**/

package {
    import flash.display.Sprite;
    
    [SWF(width="465", height="465", backgroundColor="#000000")]
    
    public class gtLine extends Sprite
    {
        public var colors:Array = [];
        public function gtLine()
        {
            addEventListener ("enterFrame", loop);
        }
        public function loop (e:*):void
        {
            var width:Number = stage.stageWidth;
            var height:Number = stage.stageHeight;
            var color:Number;
            var range_y:int = 1;
            var fluc_y:Number;
            graphics.clear ();
            for(var y:int=0; y<height; y+=2)
            {
                if (colors.length < y + 1) {
                    colors [y] = Math.random() * 0xff000000;
                }
                color = colors [y];
                graphics.lineStyle(1, color, 1);
                fluc_y = 0;
                fluc_y += Math.random()*range_y*2-range_y;
                graphics.moveTo(0, y+fluc_y);
                
                for(var x:int=5; x<=width; x+=5)
                {
                    fluc_y += Math.random()*range_y*2-range_y;
                    graphics.lineTo(x, y+fluc_y);
                }
            }
        }
    }
}