Page 1
DOWNLOAD SOURCE FILE FOR THIS TUTORIAL
Christmas time is almost here as I am writing this tutorial. So, I decide to create some actionscript effect that will be useful for Christmas time. What that would be? Well, Christmas is really related to snow and cold weather. So, in this tutorial, I will create snow effect where the snow falls down randomly and in random direction. Moreover, the snow will accumulate at the bottom of the screen. You can use this effect in almost every of your Christmas-like design, such as Christmas card.
I made the snow stop only at the bottom of the screen, but later on this tutorial you will learn to make other places for the snow to stop.
First create the Snow Movie Clip; a small white dot is enough, just don?t make it too small.
Set the identifier for this Movie Clip to "snow".
Now create a Movie Clip called "Limit", here you will draw where you want you snow to stop.
I draw a single line, but you can do whatever you want here.
Then drag an instance of this Movie Clip to the stage with the name "limit" and set the alpha to 0.
Open the actions for the first frame in the stage and paste:
Christmas time is almost here as I am writing this tutorial. So, I decide to create some actionscript effect that will be useful for Christmas time. What that would be? Well, Christmas is really related to snow and cold weather. So, in this tutorial, I will create snow effect where the snow falls down randomly and in random direction. Moreover, the snow will accumulate at the bottom of the screen. You can use this effect in almost every of your Christmas-like design, such as Christmas card.
I made the snow stop only at the bottom of the screen, but later on this tutorial you will learn to make other places for the snow to stop.
First create the Snow Movie Clip; a small white dot is enough, just don?t make it too small.
Set the identifier for this Movie Clip to "snow".
Now create a Movie Clip called "Limit", here you will draw where you want you snow to stop.
I draw a single line, but you can do whatever you want here.
Then drag an instance of this Movie Clip to the stage with the name "limit" and set the alpha to 0.
Open the actions for the first frame in the stage and paste:
//import libraries for needed for some objects
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
//create a new bitmap object to display the accumulated snow
var visibleBitmap = new BitmapData(550, 400, true, 0x00FFFF00);
//new Movie Clip to attach the bitmap we created above
_root.createEmptyMovieClip("snow", _root.getNextHighestDepth());
//attach the bitmap in the snow Movie Clip
snow.attachBitmap(visibleBitmap, 33);
//bitmap with the limits of the snow, we will update
//this bitmap later to create the accumulative effect
var hitBitmap = new BitmapData(550, 400, true, 0x00ffffff);
//draw the "limit" Movie Clip on the bitmap
hitBitmap.draw(limit);snow effect. Posted on 07/31/2008
Couldnt get it to work even when I copied your code. Obviously I am missing some information. The instructions were not clear enough for me and could not get it to work.






help
and feedback
latest
news
latest
forum entries