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

perlinNoiseのstitch境界

Get Adobe Flash player
by knd 15 Jan 2010
    Embed
package {
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.filters.ColorMatrixFilter;
	import flash.geom.Point;
    public class FlashTest extends Sprite {
            // write as3 code here..
		private var bmd:BitmapData;		
		private var pos:Point;
		public function FlashTest() 
		{
			bmd = new BitmapData(180,120, true, 0x0);
			pos = new Point();
			addEventListener(Event.ENTER_FRAME, redraw);
			redraw();
		}
		
		private function redraw(e:Event = null):void 
		{
			
			bmd.perlinNoise(80, 50, 4, 0, true, true, 6, false, [pos, pos]);
			pos.x+=2;
			pos.y+=2;
			if(pos.x > 500)
			{
				pos.x = 0;
				pos.y = 0;
			}
			graphics.clear();
			graphics.beginBitmapFill(bmd, null, true, true);
			graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
		}
		
    }
}