forked from: Liquid1000000
// forked from psyark's Liquid1000000
package {
import flash.display.*;
import flash.events.Event;
import flash.geom.Point;
[SWF(width=465, height=465, backgroundColor=0x000000, frameRate=30)]
public class Liquid extends Sprite
{
private const NUM_OF_PARTICLES: int = 1000000;
public function Liquid() {
var screen:BitmapData;
var bmpdata:BitmapData;
screen = bmpdata = new BitmapData(465, 465, false, 0x000000);
var rnd:Function = Math.random;
var seed:uint;
var offset:Array = [new Point(), new Point()];
addChild(new Bitmap(screen));
addEventListener(Event.ENTER_FRAME, function (event:Event):void
{
var i:uint = 0
while(i<3)
{
seed = rnd()*1000;
//bmpdata.perlinNoise(100, 100, 2, 0, false, true, 3, false, offset);
i++
}
offset[0].x += 4;
offset[1].y += 4;
screen.perlinNoise(100, 100, 2, rnd(), false, true, 3, false, offset);
});
}
}
}