0 Replies - 1631 Views - Last Post: 13 June 2007 - 10:07 AM

#1 Dilerious   User is offline

  • D.I.C Regular
  • member icon

Reputation: 2
  • View blog
  • Posts: 280
  • Joined: 30-December 05

Water Effect

Posted 13 June 2007 - 10:07 AM

Description: First of all create a new flash document, (ctrl + N, or file -> New) Create a new movie clip, do this by going to Insert -> New Symbol Or for the keyboard shortcut, it's ctrl + f8. Select "Movie clip" for the type, and name it what you wish. It then takes you inside the movie clip you just created. Add an image, or something that may look good with water, I left it blank, doing this, makes the background wave around like water. Go out of the movie clip by clicking "scene 1" on the timeline. Open the Library by going to Window -> Library or press ctrl + L for the shortcut. Drag out the movie clip you just made. In the properties panel at the bottom, type in the instance name of "water_mc" Make a new layer, and name this actions. Click on the first frame of this layer and type in the following code.
import flash.display.*;
import flash.geom.*;
import flash.filters.*;
myBitmap = new BitmapData(390,293,false,0);
pt = new Point(0,0);
mpoint = new Point(0,0);
myDispl = new DisplacementMapFilter(myBitmap, mpoint,1,2,10,50);
water_mc.myList = new Array();
water_mc.filters = water_mc.myList;
i = 1;
this.onEnterFrame = function()
filterList = water_mc.filters;
offset = new Array();
offset[1] = new Object();
offset[1].x = i;
offset[1].y = i/8;
myBitmap.perlinNoise(45,5,3,50,true,false, 7,true,offset);
filterList.mapBitmap = myBitmap;
water_mc.filters = filterList;

Is This A Good Question/Topic? 0
  • +

Page 1 of 1