|
|
|
#1 |
|
Member
Join Date: Feb 2001
Posts: 78
|
Effortless snow through actionscript?
I'm trying to create an animation that has snowflakes falling in the background. I imaging that the flakes would gracefully move back and forth as it falls to the ground - much like a feather.
I know I could accomplish this by tweening keyframes, but I think it's time that I made things a bit easier on myself. There has to be a way to achieve this effect through actionscript and random numbers. Does anybody out there know of a tutuorial that might help me to learn this type of actionscripting? Thanks in advance! |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2001
Location: St. Louis
Posts: 1,018
|
0. New movie - fps 25, size 600x400.
1. Make a snowflake. 2. Put it into its own movieclip, put it on the stage with an instance name of "snow". 3. Make a new layer titled "actions". On the (only) frame, put these actions:
4. Put this on the snowflake clip:
5. Kick back with a coffee and your mittens and chill. |
|
|
|
|
|
#3 |
|
Member
Join Date: Feb 2001
Posts: 78
|
AMAZING!
That's awsome. Thanks so much! |
|
|
|
|
|
#4 |
|
Member
Join Date: Feb 2001
Posts: 78
|
Hey, what would I have do to the code to make it so that they stop and accumulate at the bottom of the screen like real snowflakes do?
|
|
|
|
|
|
#5 |
|
Banned
Join Date: Apr 2001
Location: Montréal, Québec.
Posts: 25,397
|
You would have to cheat it! And best way to cheat it is to imagine it's accumulating outside of view!
Seriously... I guess some kind of tweening or action scripted accumulation movie clip, but to be realistic it would have to be pretty slow... Unless this was a snow storm, like the one we just got here a few days ago! |
|
|
|
|
|
#6 |
|
Member
Join Date: Feb 2001
Posts: 78
|
Thanks again. And one last question for you...
In an effort to understand what you've done here I've been messing with the numbers in your code. Increasing the number of flakes on the screen, their size, speed, etc. I thout it might be interesting to make them randomly rotate as they fell. So, I tried adding this line of code... this._rotation = this._rotation=50+Math.random()*100; Of course, it didn't work, which is pretty typical of the result I get when I try to do these things myself. Any idea why it's not working. Sounds like it's pretty cold where you are. Stay warm! |
|
|
|
|
|
#7 |
|
Banned
Join Date: Apr 2001
Location: Montréal, Québec.
Posts: 25,397
|
That wasn't my code, but the snow that fell really fell here!
|
|
|
|
|
|
#8 |
|
Banned
Join Date: Apr 2001
Location: Montréal, Québec.
Posts: 25,397
|
In fact here's some accumulation on text...
http://www.flashkit.com/movies/Effec...2455/index.php And quite a few snow files here... http://www.flashkit.com/search.php?t...&submit=Submit |
|
|
|
|
|
#9 |
|
Member
Join Date: Nov 2000
Location: MA
Posts: 82
|
I like the effect that was just posted, the snow accumulating on the text, but I want to create an effect that piles up, not melts down. I checked out the script in that .fla and edited the melt graphic to a build up graphic and changed some numbers around but it's still not working. Any ideas? I got it to slow down the melt effect considerably, but can't get it to actually accumulate. Please help? Thanks in advance.
|
|
|
|
|
|
#10 |
|
Banned
Join Date: Feb 2004
Posts: 3,438
|
Hi,
To create a pile up effect, just make a ground variable that the snowflakes stop and and reduce that ground variable as the snow falls.....
Hope it helps NTD Last edited by NTD; 11-30-2004 at 01:48 PM. |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|