# Help With Snow Tut. AS

**URL:** https://forum.kirupa.com/t/help-with-snow-tut-as/35035
**Category:** flash
**Created:** [November 9, 2003, 5:53pm UTC](https://forum.kirupa.com/t/help-with-snow-tut-as/35035 "2003-11-09T17:53:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![macmar](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@macmar](https://forum.kirupa.com/u/macmar)
#### Post date: [November 9, 2003, 5:53pm UTC](https://forum.kirupa.com/t/help-with-snow-tut-as/35035/1 "2003-11-09T17:53:17Z")

</div>

Could someone PLEASE help me script the snow to my dimensions:  
Stage 600 wide x 400 High  
I only want the snow in an area 432 Wide x 296 High at the X=80 y=52 position  
I’ve tried scripting it and totally messed it up…again & again & again. I’ll never learn this stuff :\<(  
Here’s the original script:  
onClipEvent (load) {  
onClipEvent (load) {  
//specifies the size of the movie stage  
movieWidth = 300;  
movieHeight = 200;

```
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;

//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;

```

}  
onClipEvent (enterFrame) {  
//putting it all together  
rad += (k/180)\*Math.PI;  
this.\_x -= Math.cos(rad);  
this.\_y += i;  
if (this.\_y\>=movieHeight) {  
this.\_y = -5;  
}  
if ((this.\_x\>=movieWidth) || (this.\_x\<=0)) {  
this.\_x = -10+Math.random()\*movieWidth;  
this.\_y = -5;  
}  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 9, 2003, 6:09pm UTC](https://forum.kirupa.com/t/help-with-snow-tut-as/35035/2 "2003-11-09T18:09:38Z")

</div>

```auto

//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;

```

just chagne that to be your movie size, you confused me with the dimesions you wanted.

if your movie is 296 in height and you only wnt the snow to fall to the \_x 80 axis just do the math

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 9, 2003, 8:38pm UTC](https://forum.kirupa.com/t/help-with-snow-tut-as/35035/3 "2003-11-09T20:38:45Z")

</div>

I guess I don’t explain things very well. Would you look at my attached file for where I want the snow, please. Thanks for the help.
