Thursday, July 29, 2010

Cool Flash Mouse particle effect


Effect Description:
Effect, the flashing around the jet to the particles continuously. When moving the mouse, the flashing particles will move along. The effect is mainly through the use of random numbers Math.random () to change the film _x, _y coordinates property, _alpha value of property to achieve transparency.

Design:
Open Flash MX, set the scene of the size 400px 脳 180px, black background, frame rate to 25fps. Shown in Figure 1.



Figure 1

First, design elements

1. New pressing the shortcut keys Ctrl + F8 a "particle" of the movie clip components.

2. Pressing the shortcut keys Shift + F9 to open "Color mixer" panel, shown in Figure 2 set. Among them, the color of the slider 5 are (from left to right): # FAFAFA, # FDFD11, # FBF26D, # F60000, # 240000. When the mouse into the way shown in Figure 2, click the left button you can add a slider. Hold down the slide pull panel, and then release the left mouse button, you can remove the slide.



Figure 2

3. Click the toolbar's "Emulating" tool, not sideline, shown in Figure 3. Then in the "particle" component to the scene pulled out a circle, the diameter is about 100px on it. Then again and again out of four small ray-like ellipse, shown in Figure 4.



Figure 3, Figure 4

4. Pressing the shortcut keys Ctrl + A in the "particle" elements in the scene to Select All, then click the "Edit" menu in the "optimization" command, or pressing the shortcut keys Ctrl + Shift + Alt to open the "most optimal curve" panel on the curve optimization, shown in Figure 5 set. Set up and click "OK" button. Under normal circumstances we must carry out this operation on the device to optimize the file.



Figure 5

5. New pressing the shortcut keys Ctrl + F8 a "particle animation" movie clip components. Then pressing the shortcut keys Ctrl + L open library, the library "particles" drag and drop components to the "particle animation" component section 1 of the scenes. Click the first one in the "particle" component, and in the "Properties" panel to it from the instance named "particle", shown in Figure 6.



Figure 6, Figure 7

Click on the layer 2 frame, press F6 key to insert a key frame. Pressing the shortcut keys Ctrl + T to open "deformation" panel, the first one in the "particle" size component is set to the original 25%, as shown in Figure 7. And then the first two in the "particle" size component is set to 200%.

6, click the "particle animation" long scenes in the first one, press F9 to open "action" panel, enter the following code:

/ / Change the "particle" component of the transparency and coordinates
particle._alpha -= 2;
particle._x + = Math.random () * 100 - 50;
particle._y + = Math.random () * 100 - 50;
Then click on the first two, according to F9 to open "action" panel, enter the code "gotoAndPlay (1);". In the code, Math.random () * 100 is taken between 0 to 100 a random number, when the random number is less than 50 times, minus 50 components of the coordinate value is negative. In this way, "particle" component will appear in the mouse left and right, but not always in the right side. If multiplied by 200, will have to subtract 100.

Second, design the main scene

1. Back to the main scene. Click the first one, according to F9 to open "action" panel, enter the following code:

i = 0;
Mouse.hide ();
Code "Mouse.hide ()" The role of the hidden mouse.

2. Click on the main scene in the first two, press F6 key to insert a key frame. The components from the library, "Particle Animation" drag and drop to two of the scenes and in the "Properties" panel to it from the instance named "part_mov". Then select the "particle animation" component, open the "deformation" panel size is set to 10%.

3. Click on the first two, according to F9 to open "action" panel, enter the following code:

/ / Copy the "particle animation" video components
i + +;
if (i> 20) (
i = 0;
)
duplicateMovieClip ("part_mov", "part_mov" + i, i);
this ["part_mov" + i]. _x = _xmouse;
this ["part_mov" + i]. _y = _ymouse;
Code "this [" part_mov "+ i]. _x = Xmouse" role is to assign the current mouse coordinates to the "particle animation" x-coordinate. Statement duplicateMovieClip () role is to copy movies.

3. Click No. 3, F6 key to insert a key frame, then F9 to open "action" panel, enter the code "gotoAndPlay (2);".

Effect here is complete.






相关链接:



Articles About Browser Tools



XML Or CSS Tools Guide



mySAP Human Resources



mp3 to aac converter



free download CONVERTER mp4 to 3gp



CSS Examples: Horizontal Style Input Boxes



Ts video format



Mp4 To 3gp Converter



COSCO Kawasaki's shipbuilding mode



Win32 Debug API part III



Fax TOOLS reviews



Reviews E-Mail Clients



"Sacred 2 Fallen Angel" mission concert details



DreamwaverMX And ASP.NET (1)



From the "advertised" to "point and to announce"



No comments:

Post a Comment