Flash AS increased production of animation effects blisters
Effect Demo:
Click here to download the source files
If a painting, heavy workload and the effect is not good. We use AS copy of the statement to achieve blisters on the number of properties set to change transparency size. Video clip in the final set blisters around swing. This integrated together, we can achieve the effect of the rise in blisters.
Concrete steps
1, opened a new MX documents. File attributes and appropriate modifications (400 × 300, a blue background)
2, built a movie clip, named as the "h2o." After entering editors to use drawing tools, drawing a gradual filled blisters. As shown in Figure 1.

Figure 1 drawing blisters
3, returned to the scene, a layer named "h2o." From the library in the "h2o" video clips drop to the bottom of scenes, in the following attributes panel named its分身called "h2o." As shown in Figure 2.

Figure 2 layers "h2o"
4, the main scene of a new layer named "as." Add in a section AS:
I = 1
While (i <= 30) (
DuplicateMovieClip ( "h2o", "h2o" i, i);
SetProperty ( "h2o" i, _x, random (400));
SetProperty ( "h2o" i, _y, random (100) 300);
SetProperty ( "h2o" i, _xscale, random (60) 40);
SetProperty ( "h2o" i, _yscale, getProperty (eval ( "h2o" i), _xscale));
SetProperty ( "h2o" i, _alpha, random (30) 70);
I
)
_root.h2o._visible = 0
5, specific explained as follows:
I = 1 / / initialize variables
While (i <= 30) (/ / used to control the amount of water
DuplicateMovieClip ( "h2o", "h2o" i, i); / / Copy water
SetProperty ( "h2o" i, _x, random (400)) / / X axis in the random distribution of the water to reproduce
SetProperty ( "h2o" i, _y, random (100) 300); / / ibid., only replaced by Y-axis
SetProperty ( "h2o" i, _xscale, random (60) 40);
SetProperty ( "h2o" i, _yscale, getProperty (eval ( "h2o" i), _xscale));
/ / 2 AS above water is used to control the size.
SetProperty ( "h2o" i, _alpha, random (30) 70); / / used to control the transparency of water
I
)
_root.h2o._visible = 0 / / will be the main scenes in the water hidden.
6, selected film clips, "H2O," added AS:
OnClipEvent (load) (
Speed = random (5) 3;
)
OnClipEvent (enterFrame) (
This._y -= speed;
This._x = random (3)-random (3);
If (this._y <-15) (
This._y = random (100) 315;
)
)
7, the above AS statement means:
OnClipEvent (load) (/ / randomly assigned to the speed of water, water sports more real.
Speed = random (5) 3;
)
OnClipEvent (enterFrame) (
This._y -= speed; / / Y-axis water used to change the coordinates, so we look in the water is constantly on the rise.
This._x = random (3)-random (3); / / on the water in order to campaign more and more genuine, we on the water sloshing around about.
If (this._y <-15) (/ / This is the role of IF statements when the water out of the screen, back into the screen in the past.
This._y = random (100) 315;
)
)
8, preservation test!
Tags: css effects firefox, div effects






Leave a Reply