The following code makes a BitmapData object with Perlin noise, and then uses that object as a bitmap fill. Because the stitch parameter is false, the edges are visible as it tiles. : BitmapData : Graphics Flash / Flex / ActionScript examples
The following code makes a BitmapData object with Perlin noise, and then uses that object as a bitmap fill. Because the stitch parameter is false, the edges are visible as it tiles.
private var _bitmapData:BitmapData = new BitmapData(200, 200);
public function Main() { var shape:Shape = new Shape(); shape.graphics.lineStyle(0, 0, 0); shape.graphics.beginBitmapFill(_bitmapData); shape.graphics.drawRect(0, 0, 600, 400); shape.graphics.endFill(); addChild(shape);
var timer:Timer = new Timer(1000); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start();