function createSnow()
{
i++;
snow_mc.duplicateMovieClip("snow" + i + "_mc", i);
eval("snow" + i + "_mc")._x = random(800);
eval("snow" + i + "_mc")._y = random(560);
scale = random(60) + 50;
eval("snow" + i + "_mc")._alpha = scale;
eval("snow" + i + "_mc")._xscale = scale;
eval("snow" + i + "_mc")._yscale = scale;
snow(eval("snow" + i + "_mc"));
} // End of the function
function snow(snow_mc)
{
snow_mc.onLoad = function ()
{
stage_x = 800;
stage_y = 560;
this.moving = true;
touch = false;
windx = (_xmouse - stage_x / 2) / 100;
};
snow_mc.onMouseMove = function ()
{
windx = (_xmouse - stage_x / 2) / 100;
updateAfterEvent();
};
snow_mc.onEnterFrame = function ()
{
if (this.moving)
{
s = random(2);
this._y = this._y + 10;
if (s == 0)
{
this._x = this._x + 5;
}
else if (s == 1)
{
this._x = this._x - 5;
} // end if
this._x = this._x + windx;
if (this._y > stage_y || this._x < 0)
{
this._y = 0;
this._x = random(stage_x);
} // end if
this._rotation = random(180);
if (!touch && this.hitTest(merry1_mc))
{
stopOrNot = random(4);
if (stopOrNot == 1)
{
this.moving = false;
touch = true;
delete this["onEnterFrame"];
createSnow();
} // end if
} // end if
if (this.hitTest(merry2_mc))
{
stopOrNot = random(2);
if (stopOrNot == 1)
{
this.moving = false;
delete this["onEnterFrame"];
createSnow();
} // end if
} // end if
} // end if
};
} // End of the function
stop();
var i;
for (i = 1; i < 60; i++)
{
snow_mc.duplicateMovieClip("snow" + i + "_mc", i);
eval("snow" + i + "_mc")._x = random(800);
eval("snow" + i + "_mc")._y = random(560);
scale = random(60) + 50;
eval("snow" + i + "_mc")._alpha = scale;
eval("snow" + i + "_mc")._xscale = scale;
eval("snow" + i + "_mc")._yscale = scale;
snow(eval("snow" + i + "_mc"));
} // end of for