Frame 1
var breite = Stage.width;
var hoehe = Stage.height;
var anzahl = 50;
var max_speed = 10.2;
var min_speed = 3.5;
var min_groesse = 5;
var max_groesse = 90;
var schwing_faktor = 0.9;
var ersterlauf = 0;
var i = 0;
while (i < anzahl) {
_root.attachMovie("schnee", "schnee" + i, i);
i++;
}
this.onEnterFrame = function () {
var _local2 = 0;
while (_local2 < anzahl) {
if (((this["schnee" + _local2]._x > (breite + 10)) || (this["schnee" + _local2]._y > (hoehe + 10))) || (ersterlauf < anzahl)) {
this["schnee" + _local2].speed = (Math.random() * max_speed) + min_speed;
this["schnee" + _local2]._x = Math.random() * breite;
this["schnee" + _local2]._y = ((ersterlauf < anzahl) ? (Math.random() * hoehe) : 0);
this["schnee" + _local2]._xscale = (this["schnee" + _local2]._yscale = (this["schnee" + _local2]._alpha = (Math.random() * max_groesse) + min_groesse));
this["schnee" + _local2].r_xy = random(2) == true;
((ersterlauf < anzahl) ? (ersterlauf++) : ((ersterlauf = anzahl + 1)));
} else {
if (this["schnee" + _local2].r_xy) {
this["schnee" + _local2].go = this["schnee" + _local2].go + (Math.random() * -0.2);
if (this["schnee" + _local2].go < (-schwing_faktor)) {
this["schnee" + _local2].r_xy = false;
}
} else {
this["schnee" + _local2].go = this["schnee" + _local2].go + (Math.random() * 0.2);
if (this["schnee" + _local2].go > schwing_faktor) {
this["schnee" + _local2].r_xy = true;
}
}
this["schnee" + _local2]._x = this["schnee" + _local2]._x + this["schnee" + _local2].go;
this["schnee" + _local2]._y = this["schnee" + _local2]._y + this["schnee" + _local2].speed;
}
_local2++;
}
};