Effects animation effect:
source File Download >>>>>>
specific production steps:
1, the production of random numbers
Create a new 400px*300px Flash document with black background. According to Ctrl+f8 built a MC, in this MC to build a dynamic text, variable name is num,
Add as on its frame
This enables dynamic text to display numbers from 0 to 9.
2, return to the main scene, according to Ctrl+f8 built a MC, press Ctrl+l Open the library, from the library just made a good MC, the instance name is set to Mynum,
Add the following as on the frame
for (Var i=1;i<10;i++) { Mynum.duplicatemovieclip ("MyNum" +i,i); this["MyNum" +i]._y=mynum._y+i*mynum._height*0.7; this["MyNum" +i]._alpha=10* (10-i) +10; } |
Code Explanation: Copy 9 MC, and let them longitudinal isometric arrangement, 0.7 of the role is to reduce the spacing between the MC. The last line is to make the transparency gradient from top to bottom.
3, return to the main film, from the library dragged out of the production of a good MC, the instance name is set to Mynum,
Add as on this MC
Onclipevent (load) { _alpha = Random (95) +5; A = ((100-_alpha) *4) *0.08+4; _y =-mynum._height*10; _x = random (400); _xscale = _yscale=1.2* ((_alpha*0.4) *2+30); } Onclipevent (enterframe) { _y + A; if (_y>300) { This.removemovieclip (); } } |
Code interpretation: When the MC loaded randomly set its transparency, and based on the transparency of the MC to set the speed of movement and scaling ratio. The y-coordinate of the MC is above the scene, and the x-coordinate is the random value.
When the MC enters the frame, let it move down, and remove the MC when it is beyond the scene.
4, in the main movie frame add the following as, constantly copy MC, forming digital flow effect.
var n = 0; Onenterframe = function () { Mynum.duplicatemovieclip ("Ball" +n++, N); if (n>300) { n=0; } }; |
This example is finished, thank you for watching.