[ff]: Realistic Water / Sea / Ocean
Just decided to do a part 2 of this popular simple effect, adding sky and a sun that reflects off the water. Could be cool.
/**
* Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/piKI
*/
// forked from bradsedito's Realistic Water / Sea / Ocean
// BradSedito
package {
import flash.geom.*;
import flash.display.*;
import gs.*;
import gs.easing.*;
[SWF(backgroundColor="0xFFFFFF")]
public class Cloud extends Sprite {
private var arr:Array = [ new Point(0,0), new Point(0,0), new Point(0,0)]
private var sea:BitmapData = new BitmapData( 465,265,true );
function Cloud() {
addChild( new Bitmap(sea) ).y = 200;
addEventListener( "enterFrame", onFrame);
this.rotationX = 296;
this.y = this.y+50;
TweenMax.to(this, 1, {tint:0x00ccff, ease:Quad.easeOut});
}
private function onFrame(e:*):void{
for(var i:int=0;i<3;i++) arr[i].x += (((i*3) % 4) - 2);
sea.perlinNoise(256,64,3,0,true,false,8,false,arr);
}
}
}