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: Tile of gtLine Pattern

目標 : http://www.flickr.com/photos/birdbrid/3495765388/
/**
 * Copyright ahchang ( http://wonderfl.net/user/ahchang )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/5wq9
 */

// forked from ahchang's Tile of gtLine Pattern
// forked from ahchang's forked from: color line
// forked from uranodai's color line
/**
* 目標 : http://www.flickr.com/photos/birdbrid/3495765388/
**/

package {
    import flash.display.Sprite;
    
    [SWF(width=600, height=600, frameRate=30, backgroundColor=0x000000)]
    
    public class RectTile extends Sprite {
        private var cx:int;
        private var cy:int;
        private var r:int=103;
        
        public function RectTile() {
            init();
        }
        
        private function init():void {
            for (var i:uint=0; i<10; i++) {
                cx = i * r * 1;
                
                for (var j:uint=0; j<10; j++) {
                    cy = j * r * 1;
                    var circle:Sprite = new gtLine(cx, cy, r);
                    addChild(circle);
                }
            }
        }
    }
}

import flash.display.Sprite;

class gtLine extends Sprite
{
    private var cx:int = 50;
    private var cy:int = -50;
    
    public function gtLine(x:int, y:int, r:uint=103)
    {
        var color:Number;
        var range_y:int = 1;
        var fluc_y:Number;
        
        graphics.beginFill(0x000000);
        graphics.drawRect(0, 0, r, r);
        graphics.endFill();
        this.x = x;
        this.y = y;
        
        for(var y:int=0; y<=150; y+=1)
        {
            var canvas:Sprite = new Sprite();
            addChild(canvas);
            color = Math.random() * 0xff000000;
            canvas.graphics.lineStyle(1, color, 1);
            fluc_y = 0;
            fluc_y += Math.random()*range_y*2-range_y;
            canvas.graphics.moveTo(0, y+fluc_y);
                        
            for(var x:int=5; x<=100; x+=5)
            {
                fluc_y += Math.random()*range_y*2-range_y;
                canvas.graphics.lineTo(x, y+fluc_y);
                canvas.x = cx;
                canvas.y = cy;
                canvas.rotation = 45;
                
            }
        }
    }
}