Use Flash to make the watermark ripple effect in the photo easily

Source: Internet
Author: User

This tutorial uses Flash to make it easy to create a ripple effect on a picture.

Create a flash document, and then prepare a beautiful photo for the background, press Ctrl+j to adjust the properties.

Figure 1

Then the picture is converted to a movie clip, named Photo_mc, and then we set the location of the movie clip. Confirm that the movie clip is selected, we open the Alignment panel, and then set the following.

Figure 2

Then name the instance name:

Figure 3

Then add the following action for the first frame:

Import Flash.filters.DisplacementMapFilter;

Import Flash.display.BitmapData;

Import Flash.geom.Point;

This.createemptymovieclip ("Waterhold", this.getnexthighestdepth ());

Waterhold._visible = false;

var numofripples:number = 65;

var speed:number = 18;

for (var i:number = 0; I

var ripple:movieclip = Waterhold.attachmovie ("Wave", "Wave" +waterhold.getnexthighestdepth (), Waterhold.getnexthighestdepth (), {_x:random (stage.width), _y:random (Stage.height)});

Ripple.gotoandplay (Random (65));

}

Onenterframe = function () {

var bm:bitmapdata = new BitmapData (waterhold._width+65, waterhold._height+65, True, 0x50000000);

Bm.draw (Waterhold);

Photo_mc.filters = [New Displacementmapfilter (BM, new Point (0, 0),-1, 1, 1, speed)];

};

Then press Ctrl+f8 to create a new movie clip symbol. Here we make a watermark animation.

Figure 4

Then make a shape animation, the watermark spread open, first in the first frame to draw an ellipse, adjust the gradient fill.

Figure 5

Figure 6

In the first frame adjust to the minimum, the 75th frame adjusts to the maximum. Then do the shape animation.

and add the following code to frame 75th:

this._x = random (stage.width);

this._y = random (stage.height);

gotoAndPlay (Random (10));

Then set the link properties for the movie clip.

Figure 7

OK, then you can see the effect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.