The study of Sphere luminous effect and foundation action

Source: Internet
Author: User
Tags array insert modify setinterval

After the tutorial, in this article will introduce to you: ruler, grid, to create a better circular picture special effects, and to introduce the content of action, I hope you like!

Start learning below:

First, let's take a look at the initial effect:

Please click here to view the previous 1-19 steps, the specific production effect.

  Download the animation material of this website

1. First create a new Flash file, save as "Planet_start.fla"

2. Press Ctrl+r first to import a background picture (or "File"-"Import"-->> "Import to Stage")

3. Open the Library window "window"-->> "library" (or press ctrl+l directly)

4. In the Library window, double-click the icon for the picture you just imported.

Note that you want to remove the Allow smoothing option.

5. Then we'll revise the size of our movie: "Modify"-->> "Document" (CTRL+J).

Set the size of the document according to the size of the picture, and set the frame rate to 30fps.

6. Click to select your picture, press F8 ("Modify"-->> "convert to Symbol"), enter a name space, behavior: Film clips, registration: Adjust to the right leg (click the right leg).

7. The value of x and Y is set to 0 in the property panel.

8. Confirm that the current instance BG has been selected, and then "edit"-->> "copy" (Ctrl + C) to copy it. Then insert the-->> layer or click the Insert Layer button to insert a new layer. Select Layer 2, and then "edit"-->> "paste to current position" or press the CTRL+SHIFT+V key directly.

9. Press F8 key to convert it to a component, the name is: Planet, behavior: Movie clip, register: right leg.

10. Click "View"-->> "align"-->> "to Zishangsu" and remove "align objects".

11. In the Library window, double-click the "Planet" icon to open, and now let's edit it.

  The above content has been in the previous article in the 1--19 step to do the detailed introduction, here is not in the detailed description.

12. Lock Layer 1 and insert a new layer, then open the View menu and select Ruler. As shown in figure:

13. Drag the horizontal and vertical two guides from the upper ruler and the left ruler respectively, and place them as shown in the figure.

14. Adjust the display ratio of the image. Adjust guides (no decimals!), view-->> "guides"-->> "Lock Guides"

15. Select the Ellipse tool or press O directly, then set the line to very thin in the properties panel, then turn on the color mixer to select the fill color and set Alpha to 0. (The last article has been introduced, here is no longer spoken)

16. Then hold down the SHIFT key and draw a circle, just to cover the circle in the figure. As shown in figure:

17. Select the contents of the fill of the circle, then delete it, and then remove the display guides and lock guides options, and enlarge the ratio for the next adjustment line to prepare. As shown in figure:

18. Adjust the round edge:

To use the partial selection tool:

1 pick out all strokes and use the arrow tool to move it.

2 Discard the selection and set each node.

When a curve is next to the pointer, you can adjust the stroke. As shown in figure:




In order to be able to make a good effect you should delete some nodes, regardless of what method you use to make the effect as shown in the diagram is the purpose.

19. Select the Paint Bucket tool, fill the circle, and lock the layer. As shown in figure:

20. Unlock layer 1, copy movie clip "Space" instance, insert new layer and paste to current position. Select the layer that contains the circle, and then right-click the layer to select a mask.

21. Unlock the Mask layer, click the first Keyframe, and then create the tween animation. As shown in figure:

22. Select the "Space" movie clip instance on the stage. And then set it as shown:

Locks the mask layer. The color of the planet changes, while the colors of the other frames do not change.

Insert all 3 layers into the keyframe at frame 90th. Inserts a keyframe (F6) into the mask layer at 4,7,10,13. Unlock the Mask layer. Set the color of the instance in 1,7,13 frame for no effect. Test your videos.

You can also try to apply the color effect of the advanced settings on Layer 1. Save the FLA file.

  Download fla (PLANET_START.FLA)

23. It is time to add some luminous effects to the planet. Select Layer 1 and set it to hidden, then insert the new layer of the object. In the file properties, change the background color to black or dark blue. Unlock the Mask layer, select the first keyframe, click on the stage to select a circle, copy it, and lock the mask layer. Select the layer we just created, press Ctrl+shift+v to paste the circle to the current layer.

Open the window-->> design panel-->> "Warp" (or press ctrl+t). Select the constraint and tune to 150%. Set the other layers to be hidden.

24. Open the Color mixer panel (make sure the circle is selected), set to radial fill, turn the sliders on both sides to white, and Alpha to 0%. As shown in figure:

Then add a slider in the middle position (click below the slider) and add a color of white and alpha to 0%.

25. Insert a keyframe at frame 30th and select the 1th keyframe to animate the shape, then click to select the 30th keyframe, open the color mixer, and adjust the middle slider to the right to set Alpha to 15%.

Insert a keyframe at frame 45th and then reset the value of alpha in the Middle slider to 0% in the mixer panel.

  Download fla (PLANET_GLOW.FLA)

26. Now add some small stars to our scene to make the animation more interesting. Select Insert-->> new symbol (CTRL+F8), name it "Star_shape", Behavior: Movie clip. Change the background color to white, and determine the alignment to pixel options. Open the view-->> ruler, and the view-->> guides-->> show guides and lock guides. Then pull out the horizontal and vertical two guides

27. Enlarge the film's display ratio and put the line on the 0 shown in the picture.

28. Draw a straight line:

29. With the selection tool (A), adjust the segment to a curve, as shown in figure:

30. Select line, copy and paste to current position. Select Modify > Transform > Horizontal flip. Move 3 px to the right with the arrow tool. As shown in figure:

31. Select the two lines, copy and paste to the current position, then select Modify > Transform > Vertical Flip, Move Down 20PX, as shown:

32. Change the background color back to black. Open the mixer and set the fill to a solid type with the fill color white and alpha 50%. Select the Paint bucket tool to fill our shapes. Deletes a stroke.

33. Then select "Modify-->> shape-->> soft fill Edge", Distance: 6, steps: 6

34. Press CTRL + A to select all shapes. Insert a new layer after the copy, paste it to the current position in the new layer, select Modify-->>-->> rotate 90 degrees clockwise.

Then select all the shapes and press ctrl+g ("Modify-->> Group")

Then press F8 to convert it to a component, name: Star_group, behavior: Movie clips, registration: Center.

35. Click on the first keyframe of the layer on the instance of the "Star_shape" movie clip. Set as motion animation. Inserts a keyframe at 10 frames, 15 frames, and 25 frames. A value of 0% that selects the "Star_group" movie clip instance of the first keyframe and sets the color to alpha. This effect is also done in 25 keyframes. Lock layer.
Select the first keyframe for Layer 2. Press F9 to open the Action panel, and then enter the Stop () as shown below. Insert a keyframe at 25 frames and add the stop action to the action panel of this keyframe.

36. Back to Scenario 1, insert a new layer, open the library and see the "Star_shape" movie clip, drag it from the library to the scene. Repeat the operation and put your instance in the position you want to put.

Select all instances of "Star_shape", then select "Modify-->> timeline-->> spread to layer."

38. Select the first instance and set the instance name "St1".

Repeat to give them all the instances a name, the rule of the name is "STA" +n,n for 2,3,4,...。 You can press ALT+F3 to open the movie Explorer to see if it is all named.

Select Insert > New symbol. Name is "Scheduler", Behavior: Movie clips. Go back to Scene 1 and insert a new layer. Locate the component you just created in the Library window and drag it to the scene to set the instance name "Scheduler".

39. Insert a new layer, select the first keyframe, and copy and paste the following code into the Action window:


Function Stars ()
{
B=1;
_root.scheduler.onenterframe=function ()
{
if (b<36)
{
b++;
if (b%5==0)
{
_root["St" +b/5].gotoandplay (2);
}
}
}
}
SetInterval (stars,2000);
Stars ();


Test your videos and you should see a lot of small stars fade in and out of effect!


Code Explanation:

function stars ()//Declaration of functions;
B=1; Declare variable B, each time the stars () call it to give it an initial value of 1;
_root.scheduler//The position of the film Scheduler;
Onenterframe=function ()//event handling, constantly processing the frame speed of the movie.
if (b<36)//Conditional statement, executes the following statement when b<36;
b++; The same as B=b+1!
b%5//% calculation;
= =//judgment is equal to 0;
_root["St" +B/5]//The position of the film;
gotoAndPlay (2)//command, go to frame 2nd to start playback.
SetInterval (stars,2000); instruction; 2000ms repeated invocation.
Stars (); The nesting execution function itself.


To make the movement of the stars random, the code in the Action window is changed to the following code:

Array0 = new Array (1,2,3,4,5,6,7);
Array1 = new Array (7,6,5,4,3,2,1);
Array2 = new Array (1,3,5,7,2,4,6);
Array3 = new Array (6,2,4,7,1,3,5);
Array4 = new Array (1,7,2,6,3,5,4);
Array5 = new Array (1,5,2,4,3,7,6);

Function Stars ()
{
St=random (6);
My_array = new Array ();
my_array=_root["Array" +st];
B=1;
_root.scheduler.onenterframe=function ()
{
if (b<36)
{
b++;
if (b%5==0)
{
Ct=number (my_array[b/5-1]);
_root["St" +ct].gotoandplay (2);
}
}
}
}
SetInterval (stars,2000);
Stars ();


Code Explanation:

Array0 = new Array (1,2,3,4,5,6,7); Create 5 Array variables
Array1 = new Array (7,6,5,4,3,2,1);
Array2 = new Array (1,3,5,7,2,4,6);
Array3 = new Array (6,2,4,7,1,3,5);
Array4 = new Array (1,7,2,6,3,5,4);
Array5 = new Array (1,5,2,4,3,7,6);

St=random (6); Random number function; Returns a number between 0 and set 6;
My_array = new Array (); Creates a new array;
my_array=_root["Array" +st]; Assigning the value "My_array" to an array;
Ct=number (my_array[b/5-1]); Returns a value of the array;


  DOWNLOAD. FLA (PLANET_FINISHED.FLA)

Welcome to contribute to this site, I hope you like these two tutorials. Sincerely hope to learn flash friends to help! If reproduced please indicate the source: Web Teaching Network

Good luck!!!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.