In this article we are going to design Falling Snow Effect in macromedia now Adobe Flash. You follow simple steps below…
Create a new document
Create a new document. Set background color to #FFEAF4. Set the width and height of your movie to be 400(width) by 300(height). You can define your document size depending on background image you are using. Here I am using snow-house image (see figure - snow-house.jpg) whose size is 400px by 300px. So I have kept my document size as per size of image I am using.

Figure - snow-house.jpg
Set your frame rate to 35 frames per second. Frame rate defines speed of falling snow. More the frame rate faster the speed and vice versa.
Now import your background image to library. You can do it as follows…
File > Import > Import to Library…

Drag it from library and set it as background of your document. Keep image X-Y position to ‘0’ so image get properly align.
Create Snow
Now we are going to generate Snow. Press Ctrl+F8 or Insert > New Symbol… to add new symbol. Name it ‘snow’. Modify its property as per following figure…

Now select movie clip ‘snow’ form library by double clicking it. Now select Oval tool and set Stroke Color is set to No Color, and that the Fill Color is set to White.

Draw a small circle. Press shift button for perfect Circle. Set its property as shown below…
You can modify width and Height as you wish. And align to ‘0’ will better.

Select ‘Scene 1’. And drag movie clip ‘snow’ form library. And modify its property. Give it an instance name as ‘snow’. Refer fig 5.

Now go to action panel by pressing F9 or through Windows > Actions paste following piece of code (code 1) there.
Code 1
if (this._name == “snow”) {
_parent.i = 0;
}
this._alpha = _parent.randRange(80, 100); //Alpha Transparency of snow
this._width = _parent.randRange(5, 10); //Snow width
this._height = this._width; //Keep round shaped snow
this._x = _parent.randRange(-100, _parent.mw+100);
this._y = _parent.randRange(0, -50);
speed = _parent.randRange(2, 5); //Folling speed.
}
onClipEvent (enterFrame) {
this._y += speed;
this._x += _parent.interval-3;
if (this._y>_parent.mh+20) {
this.removeMovieClip();
}
}
Now create a new movie clip ‘snow_bit’ same as you do for ‘snow’. Drag ‘snow_bit’ on ‘Scene 1’. Give it an instance name as ‘snow_bit’.
Select first frame of ‘Scene 1’ and add following source code to action panel.
Code 2
mw = 400; //Movie Width
mh = 300; //Movie Height
snowdrop = 50; //the larger the interval is, lesser it’s going to snow
function randRange(min, max) {
var randomNum = Math.round(Math.random()*(max-min))+min;
return randomNum;
}
setInterval(CursorMovement, 40);
function CursorMovement() {
snow_bit._x = speed1*(snow_bit._x-_xmouse)+_xmouse;
interval = (snow_bit._x/mw*6);
}
function snowfall() {
i++;
duplicateMovieClip(snow, [“snow”+i], i);
}
setInterval(snowfall, snowdrop);
Now publish .swf file. You can do it through
File > Publish Preview > Flash / HTML or press F12
Source Code:
Download Source code for ‘ Falling Snow Effect‘
Download
discuss this topic to forum
