# ActionScript: Send Snow 3.0 to Back?

**URL:** <https://forum.kirupa.com/t/actionscript-send-snow-3-0-to-back/636637>\
**Category:** flash\
**Created:** [May 18, 2017, 5:55pm UTC](https://forum.kirupa.com/t/actionscript-send-snow-3-0-to-back/636637 "2017-05-18T17:55:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raqueldesousa](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@raqueldesousa](https://forum.kirupa.com/u/raqueldesousa)\
**Post date:** [May 18, 2017, 5:55pm UTC](https://forum.kirupa.com/t/actionscript-send-snow-3-0-to-back/636637/1 "2017-05-18T17:55:24Z")

</div>

Hello Everyone,  
How can we modify the code for the Snow 3.0 so we can control the Z-Index of the snow. Currently no matter which layer the movie clip is in the snow always shows above all other elements in the movie. I am using it as a background and would like to send it to back, if possible above the bottom layer.  
Any suggestion on a ActionScript solution to send the snow to the bottom layer or to control its Z-index?  
[https://www.kirupa.com/developer/flash8/snow.htm](https://www.kirupa.com/developer/flash8/snow.htm)

```
init = function () {

width = 300;
// pixels
height = 200;
// pixels
max_snowsize = 10;
// pixels
snowflakes = 50;
// quantity
for (i=0; i<snowflakes; i++) {

t = attachMovie("snow", "snow"+i, i);
t._alpha = 20+Math.random()*60;
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 = -20;

}
if (this._x>width+20) {

this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;

} else if (this._x<-20) {

this._x = -(width/2)+Math.random()*(1.5*width);
this._y = -20;

}

}
init();
```
