Hi to everyone here, I’m new here - first post. How did I get here, well I frequent a forumwww.actionscript.org and somebody posted a Q asking how to make a snowStorm in MX, someone else answered by supplying the link to the tute here.
So, I just wanted to say thanks v. much for the tute, I was in fact looking to create a bubble effect for a site I am working on for a tropical fish shop (yeah its really true (lol!!), so I downloaded the tute, read the explanations and then played around with some stuff until I got the snow to go UP , all I have to do now is make the graphic look like a bubble.
For anyone else that is interested - here is the code to reverse fall of the snow:
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;
}
basically, just changed the + & - signs around on this._x & this._y
works a treat.
Again many thanks and look forward to visiting many more times in the future. Happy New Year to all
some one else recently posted a question on how to do exactly that to the snow tute (to make it bubbles) I said put it in a movieclip and turn it upsidedown. I dont know what they ended up doing but this is good to know too
… maybe you should contact the author of the tute (or contact kirupa) about throwing that little bit into the tute.
Hi senocular,
Yep, that was one of the first things I tried, but it didn’t make any diff to the way the ani plays. One drawback with my alterations is the ani only plays once and the “bubbles” or snow do not re - appear at the bottom of the screen. As it happens, that suits my needs perfectly, but it shouldn’t take to much effort to work that one out for any one who wants it.
I thought that posting here was letting kirupa know. The main thing is, that although it is called a snow storm, by altering just a couple of bits of code and ( of course) changing the graphics, it can be anything you want it to be - which, I think, is an excellent demonstration of Flash & actionScript
really, its not all that hard
put it in a movieclip, ditch the _root in the duplicate call (since it is in a movieclip - of course it wasnt needed in the original code anyway and actually takes away from its portability) and flip the movieclip. Instant bubbles.
Hi,
Yep, your riight, I must have done a small thing wrong when placing it in a clip as it didn’t work the first time for me - still, I love playing around with code just to see what happens.
If you reverse the + & - signs as in the on load code below, you’ll get a sort of " floater" effect, you know, those annoying little things that float around in front of the eyes when hungover.
i = 1-Math.random()*2;
k = +Math.PI-Math.random()*Math.PI;