Woadraiders Newbie

Joined: 25 Nov 2007 Posts: 8 Location: Under a rock.
|
Posted: Sat Dec 15, 2007 3:14 am Post subject: Let it snow =) |
|
|
Here's a little something that took about 5 minutes.
Snowing
FLA - http://www.fast-files.com/getfile.aspx?file=21700
Create a little white circle (brush tool, second setting, 100% visibility of stage), make it a movieclip, instance name snow. Put this code in the frame with the snow on the main timeline, and play around with it.
snowOn = 0;
onEnterFrame = function()
{
if(Math.random()*100>40 && snowOn < 40)
{
snowOn++;
mc = attachMovie("snow","snow"+_root.getNextHighestDepth(),_root.getNextHighestDepth());
mc._x = Math.random()*Stage.width;
mc.speed = Math.random()*4+2;
mc.wind = (Math.random()*2)*(Math.round(Math.random()*1.5)-1)+.5;
mc._alpha = Math.random()*(56-14)+14;
scale = Math.random()*.7+.5;
mc._xscale *= scale;
mc._yscale *= scale;
mc.onEnterFrame = function()
{
this._y += this.speed;
this._x += this.wind;
if(this._x > Stage.width || this._x < 0 || this._y > Stage.height)
{
_root.snowOn--;
this.removeMovieClip();
}
}
}
} _________________ I play Russian roulette everyday, a man's sport,
With a bullet called life, yeah mama called life,(sugar) |
|