Introduce a method of making snow in the sky

Source: Internet
Author: User
The first step is to draw snow

1> Painting Snow
The snow is white, so you want to draw a white snow in the scene, as for the shape of the snow, it is not good description, everyone according to their own preferences to draw, like my art is not good, draw a rough point of the circle on it, of course, you can also draw into snowflakes what the more good-looking shape:
2> Building elements of snow
Then select the Painted snow, press F8, save it as a picture symbol, and name the component snow, and remove the snow component from the scene.

The second step is to make snow

1> to build snow elements
First press Ctrl+f8 to create a new movie clip symbol, and then name the snowing, and then enter the edit.
2> Painting Snow Path
Point button to add a guide layer, with the pencil tool, from top to bottom, crooked distorted curved drawing of a long line, this is the path of snow drift. But remember to draw down from the center point of the component (Figure 1), as for how to draw? Just draw it, don't waste too much time here:

3> Making Snow 1

Add a new layer named snowfall, then ctrl+l open the Library, drag the snow component into the snowfall layer and align the snow edit point to the top of the lead line. In order to not allow the boot line to interfere in the operation, you can lock the guide layer.

4> Making Snow 2

Next, go to frame 50th by pressing F6, and of course don't forget to drag the boot layer to frame 50th (press F5 for the 50th frame of the boot layer) and align the snow component on the 50 frame to the end of the boot line.

5> for a little test.

Return to the first frame of the snowfall layer, right-click the mouse to select "Create motion Tween" OK, press ENTER to see the snow floating you are not satisfied: Of course, a grain (tablets??) It's going to be a little weird when the snow floats, okay, let's keep going.

The third step is the snow

1> to create a snowflake instance

Go back to the main scene, open the library, and drag the snowing component into the scene. Press CTRL+F3 to open the properties panel and name the "snow" for its instance

2>as Production

Create a new layer named as, (Hey, hey, hey, don't go, don't you hear as you run away)
In the first frame of the as layer, write:

var snownum = 0; Defines the number of snowflakes with an initial value of 0
Snow._visible=false; The snow instance in the scene is not visible and then the second frame is written:

Snow.duplicatemovieclip ("Snow" +snownum, Snownum); Copy Snow Instance
var NewsNow = _root["Snow" +snownum]; Replace the duplicate new snow name with NewsNow
newsnow._x = Math.random () *450; The X coordinate of the newly replicated snow instance is a random value of 0~450
Newsnow._y = Math.random () *20; The y-coordinate of the newly replicated snow instance is a random value of 0~20
Newsnow._rotation = Math.random () *100-50; The angle of the newly replicated snow instance is-a random value of 50~50度
Newsnow._xscale = Math.random () *40+60; The horizontal width ratio of the newly replicated snow instance is a random value of 60~100
Newsnow._yscale = Math.random () *40+60; The vertical width ratio of the newly replicated snow instance is a random value of 60~100
Newsnow._alpha = Math.random () *30+70; The transparency of the newly replicated snow instance is a random value of 70~100
snownum++; The number of snowflakes plus 1 is then written in the third frame:

if (snownum<120) {//when the number of snowflakes is less than 120
gotoAndPlay (2); Skip to Second frame
else {//otherwise
Stop (); Stop it
}

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.