Flash itself is a two-dimensional animation software, and can not directly make three-dimensional effect, sometimes we need three-dimensional effect to reflect the work, how to do it? You can use some small tips in flash, and then match the powerful action action script to simulate a realistic 3D effect. We use this method in flash to simulate a rambling space-time tunnel, the deep tunnel has been leading to a distant space-time, giving a very mysterious feeling.
1, first start flash, create a new movie, set the stage size of the movie for 550pixx400pix (in pixels), the background color of the film is dark green, color code for #003300.
2, a new graphic element, named BB, after you enter the editing area of the component, open the Color mixer panel, select the fill type as "radial gradient" in the Fill style Drop-down list, and then set the color of the left and right two sliders, where the color is green, the RGB color code is 0, 204, 153, the right slider color black, set the fill color, select the Ellipse tool, press the "Shift" key in the editing area to draw a positive circle.
3. Create a new movie clip symbol, named B, after entering the editing area of the component, drag the component bb from the library to the edit area, then insert a keyframe in frame 15th, move the ball a little farther to the left, then insert a keyframe at frame 30th, and then move the ball a little farther down to the right. According to the same method, the key frames are inserted in the 45th, 60 and 75 frames respectively, and a distance is moved to different directions, and finally the motion transition animation between the key frames is established, so as to make a small ball to shake back and forth.
4, back to the main scene, the first film to create a background. Open the Color mixer panel, select the fill type as radial gradient in the Fill style Drop-down list, and then set the color of the left and right two sliders, with the left-hand slider color black, the right-hand slider color green, and the RGB color code 0, 135, 8. After setting the fill color, select the Rectangle tool and draw a square in the stage that is slightly larger than the stage size.
5. Insert a layer above the background layer, drag component B to this layer, set its instance name to B0 in the property panel, and finally add the following action to frame 1th:
d=10;
r=0;
pai=3.14/180;
i=0;
DO{FLASH5 also provides a for loop
SetProperty ("/b" +i,_xscale,i);
SetProperty ("/b" +i,_yscale,i);
SetProperty ("/b" +i,_x,d*math.cos (pai*r) +200);
SetProperty ("/b" +i,_y,d*math.sin (pai*r) +200);
Using the most basic algorithm of circle drawing
r=r+10;
d=d+1;
i=i+1;
Duplicatemovieclip ("/b0", "B" +i,i);
Copy B0
}while (i$#@60;540);
where d is the radius, r is the angle, and the PAI has been converted to radians.
Action Action Script Description: First initialize RADIUS d, angle R and loop number I (number of copies of the movie), if the first time into the loop, B0 MovieClip will be defined as a position, and then copy the next one in the 1th level relative to B0 MovieClip, and named "B1" (Pay attention to the expression to use "+", where the sin and cos function used in front also must add "Math.", otherwise it would be wrong); Math.Cos (pai*r) +200 "200" is the center of the original position, 200 this position by the centre is relatively near, the future of the cycle is this: the latter a movieclip always than before a big I image point, the name is "B2,b3,b4 ...", The radius of the circle will gradually increase by 1 each time, such action to make the circle is the kind from afar gradually leaned over the circular channel.
So far, this is a good effect on the production completed, see, not bad?