Hi!
I am using this script to make something else than snow to go upwards instead of down.
However. I would like to have the “snow” not to exit on the right and left side of the borders of my flash file. Because there is a “blink” effect when there is a exit on the sides. This means that I want the “snow” to exit only on the upper border of the flash movie. My movie is 790 x 145 px.
Please help me out on how to modify this script for this. I have attached a zip file of my FLA.
Best regards
Joakim
init = function () {
width = 790;
// pixels
height = 145;
// pixels
max_snowsize = 20;
// pixels
snowflakes = 8;
// quantity
for (i=0; i<snowflakes; i++) {
t = attachMovie("snow", "snow"+i, i);
t._alpha = 100+Math.random()*20;
t._x = -(width/2)+Math.random()*(1.5*width);
t._y = -(height/2)+Math.random()*(1.5*height);
t._xscale = t._yscale=50+Math.random()*(max_snowsize*10);
t.k = 1+Math.random()*2;
t.wind = -1.5+Math.random()*(1.4*3);
t.onEnterFrame = mover;
}
};
mover = function() {
this._y -= this.k;
this._x -= this.wind;
if (this._y>height-10) {
this._y = +125;
}
if (this._x>width+25) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = +125;
} else if (this._x<+5) {
this._x = -(width/2)+Math.random()*(1.5*width);
this._y = +125;
}
}
init();