PDA

View Full Version : Masking the snow effect?



davidhite
October 24th, 2007, 04:35 PM
Hello. I am learning flash...kinda new so sorry if my question is stupid.
I am doing the flash snow tutorial (version 3 for flash 8) and I wanted to know if there is a way to mask the snow effect? I want it to only snow inside of a specific graphic that has a weird shape and I am lost on how to do it.
Thanks, and I hope this is a good question.

DH

vini
October 25th, 2007, 03:20 PM
I want it to only snow inside of a specific graphic that has a weird shape and I am lost

Define the area for the Snow to fall;


var wid= Stage.width;
var high= Stage.height;

_x = Math.floor(Math.random() * wid);
_y = Math.floor(Math.random() * high);

if (this._y>= high || this._x>= wid || this._x <= 0) {
this._y = -10;
this._x = -10 + Math.floor(Math.random() * wid + 10);
}

Add these to your code
Check this out
http://www.platfuse.com

Check this post
http://www.kirupa.com/forum/showthread.php?t=162864

This might be helpful to you

:smirk2:

davidhite
October 26th, 2007, 04:01 PM
Define the area for the Snow to fall;


var wid= Stage.width;
var high= Stage.height;

_x = Math.floor(Math.random() * wid);
_y = Math.floor(Math.random() * high);

if (this._y>= high || this._x>= wid || this._x <= 0) {
this._y = -10;
this._x = -10 + Math.floor(Math.random() * wid + 10);
}Add these to your code
Check this out
http://www.platfuse.com

Check this post
http://www.kirupa.com/forum/showthread.php?t=162864

This might be helpful to you

:smirk2:

Thank you. I am working on it now. I hope to get the results I want from your input and the links you provided.
I will keep you posted.
Thanks for your help!

DH