Effects
The fourth category for special effects, the author will be introduced to the following two special effects of the practice:
Watermark
Grid switching:
Grid Fade in
This special effect is relatively simple, the picture does not need to cut, and the second kind of similar.
However, when the surface effect comes out, it looks a bit complicated and has different directions. If you write a mathematical equation it will be more troublesome, so use animation as a way to combine it.
Specific actions:
1 Create a new flash document with the stage size set to 400*300
2 Import a picture, is the picture just covers the entire stage (also allow beyond, but finally see not beyond the part)
3 Create a new two layer on the layer where the image is located. The mask layer that is the image layer below.
4 Create a new component in the mask layer MC, named Star_mask, without adding an instance name.
5 Double click the MC and enter the edit status.
6 Create an MC in the inside, the name and instance name are not limited (see figure below).
7 Double click the MC
8 in the inside Create a MC with the same name as the instance name, which is a fully transparent rectangle with no padding, and creates a tweened animation based on the following figure.
9 Insert a new layer, new one component, named control, instance name Control1, arranged in the timeline as follows: Where, 26 frames of code are
Stop ();
10 double-click the control component to create three keyframes, the code is as follows:
FRAME1:
i=0;
Frame2:
if (_parent._currentframe!= _parent._totalframes) {//Let the MC be created to playback end
_parent.attachmovie ("Light", "light" +i, I);//Copy a component in a library so that the mask layer expands so that the image is displayed, and the creation of the light component is described later
_parent["Light" +i]._x = _parent["star"]._x;//control the location after replication
_parent["Light" +i]._y = _parent["star"]._y;
}
i++;
Frame3:
gotoAndPlay (2);
11 Back to Star_mask, copy the components just edited, arrange the following figure.
Among them, the right MC should rotate 180 degrees respectively.
12 Creating Light components:
Insert-new symbol named Light, and then create an animation based on the following figure:
The color value of each point in the gradient is consistent with the background color. Transparency can be grasped by oneself.
13 Open the Library of the FLA file ("Window"-"library"), after locating the light component, right-click-"link", "Export for action script" and "Export in first frame"
Selected.
14 Test film, now see the picture has never been changed, but has not seen the surface effects.
15 Close the Test window.
16 back to the main scene, at the top of the layer on the Copy Star_mask components, and then point the top layer, the stage does not have the content of the right button, select "Paste to the current position", and then test, the effect of the.