Flash produces realistic animation of current effects

Source: Internet
Author: User

Through a rectangular limit of x-axis, y-axis motion, continuous copying, forming a current simulation effect.

Specific steps

1, run Flash MX, set document properties to black background, size 200*200 pixels.

2, create a new movie clip named "box". Using the tool, draw a borderless rectangle with 1.6*1 pixels to make a gradient fill. As shown in Figure 1.

Figure 1: Drawing the box element

3, import a current through the analog sound, and place this sound file in the movie clip "sound."

4, back to the main scene, drag the movie clip "box" into the scene. In the following property panel, name the movie clip box "D." and extend to frame 3rd. As shown in Figure 2.

Figure 2: Movie Clip scoring body name

5, first build a layer, named as.

In frame 1th Add as:

SetProperty ("D", _visible, "0");/the film clip "D" is not visible in frame 1th

Frame 2nd Add as:

y=100; Initializing variables
for (i=1;i<=250;i++) {
Y =y+ Random (3)-1;
Duplicatemovieclip ("D", "D" add I, I);
SetProperty ("D" Add I, _x, i);
SetProperty ("D" Add I, _y, y);
}

Frame 3rd Add as:

gotoAndPlay (2); Do a little loop

6, create a new layer named sound, drag the movie clip "sound" that you just made to the scene and extend it to frame 3rd.

7, test, save. Please refer to source file

Click here to download the source file



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.