View Full Version : Quick falling snow ?
Phrost
December 1st, 2005, 03:19 AM
Have read the tutorial on this site which is great. Now Im a pretty big newb when it comes to actionscripting but is it possible to have the snow moving from right to left? Why you ask? Well someone had designed something completly sideways as they were rotating there monitor 90 degrees instead of buying a video card that would do it for them.
moonless_planet
December 1st, 2005, 03:54 AM
lol! That's pretty funny, rotating the screen and building movies sideways. ha ha!
Yeah you can make snow fall sideways. I haven't read the tut here. But I made snow myself and all you do in the script is assign a random speed to each new snowflake and then tell it to either move along the y axis or the x axis. If you want you can also make it move diagonally, if you want a snow storm. :D
rhamej
December 1st, 2005, 03:16 PM
Just look for the x value of the snow. and change it to a negative value.
Phrost
December 8th, 2005, 05:12 PM
Well I have been using the tutorial on the site with this code
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;
}
}
Is it possible with this? Or does it have to be something entirly different. Sorry I am a newb.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.