What makes the snow fall?

Hi folks,

I’m still learning Actionscript and so far it’s been enlightning. I can pretty much look at someones code and understand what it’s doing, however, I’m baffled about one script I found here on the site.

This code came from the Snow 3.0 tutorial for Flash:

[COLOR=#000050]init[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR] COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR]
[COLOR=#0000d0] width[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]300[/COLOR]; [COLOR=#cc00cc]// pixels [/COLOR]
[COLOR=#cc00cc] [/COLOR][COLOR=#0000d0]height[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]200[/COLOR]; [COLOR=#cc00cc]// pixels [/COLOR]
[COLOR=#cc00cc] [/COLOR][COLOR=#000050]max_snowsize[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]10[/COLOR]; [COLOR=#cc00cc]// pixels [/COLOR]
[COLOR=#cc00cc] [/COLOR][COLOR=#000050]snowflakes[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]50[/COLOR]; [COLOR=#cc00cc]// quantity[/COLOR]
[COLOR=#cc00cc] [/COLOR][COLOR=#006610]for[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#000050]i[/COLOR][COLOR=#0000ff]=[/COLOR][COLOR=#991010]0[/COLOR]; [COLOR=#000050]i[/COLOR][COLOR=#0000ff]<[/COLOR][COLOR=#000050]snowflakes[/COLOR]; [COLOR=#000050]i[/COLOR][COLOR=#0000ff]++)[/COLOR] [COLOR=#0000ff]{[/COLOR]
[COLOR=#000050]t[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]attachMovie[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#666666]“snow”[/COLOR], [COLOR=#666666]“snow”[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#000050]i[/COLOR], [COLOR=#000050]i[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#0000d0]_alpha[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]20[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff[/COLOR][COLOR=#991010]60[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-([/COLOR][COLOR=#0000d0]width[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#991010]2[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff
([/COLOR][COLOR=#991010]1.5[/COLOR][COLOR=#0000ff][/COLOR][COLOR=#0000d0]width[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-([/COLOR][COLOR=#0000d0]height[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#991010]2[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff
([/COLOR][COLOR=#991010]1.5[/COLOR][COLOR=#0000ff][/COLOR][COLOR=#0000d0]height[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#0000d0]_xscale[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]t[/COLOR].[COLOR=#0000d0]_yscale[/COLOR][COLOR=#0000ff]=[/COLOR][COLOR=#991010]50[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff
([/COLOR][COLOR=#000050]max_snowsize[/COLOR][COLOR=#0000ff][/COLOR][COLOR=#991010]10[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#000050]k[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#991010]1[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff
[/COLOR][COLOR=#991010]2[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#000050]wind[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-[/COLOR][COLOR=#991010]1.5[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff([/COLOR][COLOR=#991010]1.4[/COLOR][COLOR=#0000ff][/COLOR][COLOR=#991010]3[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#000050]t[/COLOR].[COLOR=#0000d0]onEnterFrame[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]mover[/COLOR];
[COLOR=#0000ff]}[/COLOR]
[COLOR=#0000ff]}[/COLOR];

[COLOR=#000050]mover[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR]COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR]
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]+=[/COLOR] [COLOR=#0000d0]this[/COLOR].[COLOR=#000050]k[/COLOR];
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]+=[/COLOR] [COLOR=#0000d0]this[/COLOR].[COLOR=#000050]wind[/COLOR];
[COLOR=#006610]if[/COLOR] COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR]
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-[/COLOR][COLOR=#991010]20[/COLOR];
[COLOR=#0000ff]}[/COLOR]
[COLOR=#006610]if[/COLOR] COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR]
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-([/COLOR][COLOR=#0000d0]width[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#991010]2[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff([/COLOR][COLOR=#991010]1.5[/COLOR][COLOR=#0000ff][/COLOR][COLOR=#0000d0]width[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-[/COLOR][COLOR=#991010]20[/COLOR];
[COLOR=#0000ff]}[/COLOR] [COLOR=#006610]else[/COLOR] [COLOR=#006610]if[/COLOR] COLOR=#0000ff[/COLOR] [COLOR=#0000ff]{[/COLOR]
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_x[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-([/COLOR][COLOR=#0000d0]width[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#991010]2[/COLOR][COLOR=#0000ff])+[/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR]COLOR=#0000ff([/COLOR][COLOR=#991010]1.5[/COLOR][COLOR=#0000ff][/COLOR][COLOR=#0000d0]width[/COLOR][COLOR=#0000ff])[/COLOR];
[COLOR=#0000d0]this[/COLOR].[COLOR=#0000d0]_y[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff]-[/COLOR][COLOR=#991010]20[/COLOR];
[COLOR=#0000ff]}[/COLOR]
[COLOR=#0000ff]}[/COLOR]

[COLOR=#000050]init[/COLOR]COLOR=#0000ff[/COLOR];

What part of this code makes the snow actually fall downwards? I’ve been trying to rework this code to make “sparks” come out from a central place and go in all directions, but no matter what I’ve changed so far, they just all fall instead of “explode” out.

Any ideas?

Thank you so much!!