Posted By

shalomfriss on 11/01/11


Tagged

actionscript effect wave


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

PawelGIX
shalomfriss


Actionscript 3 Wave Effect


 / Published in: ActionScript 3
 

  1. var bm:BitmapData=new BitmapData(img_mc.width, img_mc.height);
  2. var disp:DisplacementMapFilter = new DisplacementMapFilter(bm,new Point(0,0),1,2,20,25, DisplacementMapFilterMode.CLAMP);
  3. var offsets:Array = [new Point(0, 0), new Point(0, 0)];
  4.  
  5. addEventListener(Event.ENTER_FRAME, doUpdate);
  6. function doUpdate(evt:Event):void
  7. {
  8. offsets[0].x -=4;
  9. offsets[1].y -=1;
  10. bm.perlinNoise(45, 20, 2 ,50, true, false, 7, true, offsets);
  11. img_mc.filters=[disp];
  12. }

Report this snippet  

You need to login to post a comment.