Tile of gtLine Pattern
目標 : http://www.flickr.com/photos/birdbrid/3495765388/
// 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 CircleNest extends Sprite {
private var cx:int;
private var cy:int;
private var r:int=103;
public function CircleNest() {
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
{
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<=100; y+=1)
{
//var canvas:Sprite = new Sprite();
//addChild(canvas);
color = Math.random() * 0xff000000;
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<=100; x+=5)
{
fluc_y += Math.random()*range_y*2-range_y;
graphics.lineTo(x, y+fluc_y);
//rotation = 45;
}
}
}
}