 # How do I create snowfall movement

I would like to know how to create the continuous movement of snowfall without the dependency of the mouse (such as in the continuous movement tutorial). I tried the code for the simple movement, but I think it needs the ‘block’ in order to get it to continuously move. I don’t know how to write the code. Would anyone be able to help me with this? Thank you.

this is some of the code from one my current projects:

speed = Math.random()*2+0.1;
this._y = Math.round(Math.random()*76);
this._alpha = Math.round(Math.random()*25+5);
this._xscale = Math.round(Math.random()*100+50);
this._yscale = this._xscale;

if (this.hitTest(_root.reset)) {
this._x = -150;
speed = Math.random()*2+0.1;
this._y = Math.round(Math.random()*76);
this._alpha = Math.round(Math.random()*25+5);
this._xscale = Math.round(Math.random()*100+50);
this._yscale = this._xscale;
}

when my moving object encounter a wall called “reset” on stage they are moved back (along the x_axis) 150 pixles. They ten appear at random y_axis values, with randome alpha values and scaling sizes all within the ranges defined in the code. This will produce a good snowfall effect - obviously youll swap the x reset for y and random y for random x. Also I’s add something (like a sine eq) so they float back and forth as well. Hope this gets you started.

Peace

PS I didnt mention it, but incase you over look it - you’ll obiously have to adjust the ranges I have put in after the Math.random() functions.