Effects
A long time ago, I have seen an onion skin special effects animation is like, but for a while, also forget where was seen, today to everyone to do a similar effect let everyone see the effect, which use of ActionScript very little, this example only do you learn to study the use of it! Everyone in the actual use can be changed by themselves, if you can learn flash helpful words will be gratified. First look at the effect:
Click here to download the source code
Specific production process:
1. Open Flash MX 2004 first modify the document's properties: Modify the->> document as shown in the following illustration:
2. Press Ctrl+f8 to create a new graphic class component called tar, and draw a red square without a border in the image editing screen with a rectangular tool. You can try to change the color when you make it yourself.
3. After painting, press Ctrl+f8 to create a new movie fragment class component called TARMC. In frame 1th, drag the component tar from the library to the edit area, and then press F6 to insert the keyframe in frame 20th, frame 40th, and 60th, respectively. Then on the 20th, 40 and 60 frames respectively on the square to do a certain rotation and contraction deformation, so that 4 key frame objects as shown in the following diagram, observe the direction of the progressive color to distinguish between each frame. Then drag the square of frame 60th to the far right and place the objects in the 20th and 40 frames between the 1th and 60th frame objects, as shown in the following figure. Set frame properties for motion gradients in frame 1th, frame 20th, and frame 40th. You can also adjust the deformation process of the square itself, making this piece of film look smoother.
(larger picture, please pull the scroll bar to watch)
4. Now back to the main scene, the movie fragment component TARMC dragged to the screen, click on this instance, in the property panel to set the instance name to movie, see the figure below, this is to facilitate our immediate actions call. Then press the F5 key in frame 8th to insert a frame.
5. To create an onion skin effect, create a new layer. On this new layer, insert 8 empty frames by pressing the 8 F7 key on frame 1th through 8th. Then we add the actions script to the animation from frame 2nd. The scripts and explanations are as follows:
Code for Frame 2nd:
Duplicatemovieclip ("movie", onion1,1), or copy a movie fragment named movie and rename it to onion1 with a depth of 1.
SetProperty ("movie", _alpha,85)//Set the transparency of the copied movie fragment named movie to 85.
Code for Frame 3rd:
Duplicatemovieclip ("movie", onion2,2), or copy a movie fragment named movie and rename it to onion2 with a depth of 2.
SetProperty ("movie", _alpha,70)//Set the transparency of the copied movie fragment named movie to 70.
Code for Frame 4th:
Duplicatemovieclip ("movie", onion3,3), or copy a movie fragment named movie and rename it to Onion3 with a depth of 3.
SetProperty ("movie", _alpha,55)//Set the transparency of the copied movie fragment named Movie to 55.
Code for Frame 5th:
Duplicatemovieclip ("movie", onion4,4), or copy a movie fragment named movie and rename it to onion4 with a depth of 4.
SetProperty ("movie", _alpha,40)//Set the transparency of the copied movie fragment named Movie to 40.
Code for Frame 6th:
Duplicatemovieclip ("movie", onion5,5), or copy a movie fragment named movie and rename it to onion5 with a depth of 5.
SetProperty ("movie", _alpha,25)//Set the transparency of the copied movie fragment named movie to 25.
Code for Frame 7th:
Duplicatemovieclip ("movie", onion6,6), or copy a movie fragment named movie and rename it to onion6 with a depth of 6.
SetProperty ("movie", _alpha,10)//Set the transparency of the copied movie fragment named Movie to 10.
Code for Frame 8th:
Stop ()//stops playing.
OK, then press Ctrl+enter to test the film! If you feel bad, then adjust the proportions! or change the color of the square. Good luck!