Help With Falling Snow 2.0
I'm new to the flash world! This is very cool!
Need help making falling snow. I have followed the Snow 2.0 tutorial, but
for some reason that I don't understand I can't get it to work. I have done it 3 times but every time I get an error: " A script in this movie is causing Macromedia Flash Player 7 to run slowly. If it continues to run you computer may become unresponsive. Do you want to abort the script?" This is as far as it will go. Does any one know what could be the problem. I think I'm following the instructions to the letter. Thank you for your help!
SFDemon
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 04-15-2005, 08:45 PM
View Complete Forum Thread with Replies
Sponsored Links:
Falling Snow - Showing/Hiding The Snow
Hey everyone,
A question someone asked me earlier was how to make the snow disappear or reappear at a certain point. For example, you may want the snow to fall in Frames 1-30, but beyond that, you would not want any snow to fall. The code I had provided in v2.0 of the tutorial did not address that, so until I write a modified tutorial, I have provided the FLAs (for MX) that help you to control when you want or don't want the snow to fall
I have provided two variations of the Falling Snow file. One method stops or starts the falling snow by having you press a button (the white/pink circle on the bottom left of the animation). The second method displays the falling snow for about 30 frames, and then it stops displaying the falling snow.
The primary thing you will need to consider in this new version of the falling snow is your placement of:
ActionScript Code:
_root.run = 1 // displays snow
- and -
ActionScript Code:
_root.run = 0 // hides snow
Also, I made some minor modifications to the actual Falling Snow code found on the snow movie clip, and that can be found here:
ActionScript Code:
onClipEvent (load) {//variableswidth = 300;height = 200;//random x,y, and alpha this._xscale = this._yscale=50+Math.random()*100;this._alpha = 20+Math.random()*50;//random x and y for flakesthis._x = -width+Math.random()*(3*width);this._y = -10+Math.random()*height;//speed and trigonometric valuei = 1+Math.random()*2;k = -Math.PI+Math.random()*Math.PI;rad = 0;this._visible = false;}onClipEvent (enterFrame) {//////////////////////////////////////if (_root.run == 1) {//////////////////////////////////////this._visible = true;// horizontal movementrad += (k/180)*Math.PI;xmovement = _root._xmouse;this._x -= Math.cos(rad)+(xmovement-(width/2))/50;// vertical movementthis._y += i;// remove clips when they misbehave (overstep boundaries)if (this._x>(width+50)) {this._x = -45;this._y = Math.random()*height*2;}if (this._x<-50) {this._x = width+45;this._y = Math.random()*height*2;}if (this._y>=height) {this._y = -50;this._x = -width+Math.random()*(3*width);}//////////////////////////////////////} else {this._visible = false;}//////////////////////////////////////}
The source files should contain everything I have explained here.
Cheers!
Kirupa
View Replies !
View Related
Snow Is Falling
Hi there,
i want to loop a little movie - for example little snowflakes! There is no problem in letting the snow fall down (tweening) and than looping this motion. But it doesn´t look nature-like ´cause the loop starts from the beginning, so that there is a little break.
Is there a way to make this look more continious, so that it is falling and falling and so on. I hope u understand my problem and thank u in advance!
hi-T
View Replies !
View Related
Falling Snow
I'm trying to achieve the effect of falling snow in flash for a small animation. My problem is, I'm trying to get the snow to fall randomly, and I'm not sure how it's done. Anyone know the actionscript for this? Thanks in advance. :D
View Replies !
View Related
Falling Snow
I am trying to create the effect of falling snow. Right now I can get the instance of snow to position randomly horizontally (however you say that) and that is fine, but I can't figure out how to duplicate the snow. I want to have a lot of the snow instances on stage, probably about like 60 or something, and I want them to randomly float to the bottom of the screen. Can anyone help me with the duplicating the clips part?
View Replies !
View Related
Falling Snow
Helo, i have used the kirupa tutorial for falling snow, and have put it in a movie clip and have used this script:
stop();
var interval = 250;
SnowTimer = new mx.transitions.Tween(null, "_alpha", mx.transitions.easing.None.easeNone, 0, 0, interval, false);
SnowTimer.onMotionFinished = function() {
gotoAndPlay(2); }
so that it plays every 250 frames and on frame 250 i used:
gotoAndStop(1);
But the snow keeps falling after it has reterned to frame one. Can anybody please give a script to stop the snow?
Much Love.
View Replies !
View Related
Snow Falling
I want to create a snow falling effect, can any one tell me how I go about doing this?
I am new to flash and still learning, so dummy terms would be good :-)
I am using Koolmoves.
Thanks in advance
View Replies !
View Related
Help With Falling Snow AS
Im working on a flash movie right now, and for a certain amount of frames I want falling snow on the screen.
I have looked at the falling snow tutorial, and it works perfect for what i want, my only problem is, how do I get it to stop?
Heres the actionscript on my movie clip of the snowflake:
ActionScript Code:
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 590;
movieHeight = 450;
//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;
}
}
Now I want the snow to start falling at frame 500 so I put this script on frame 500:
ActionScript Code:
for (k=0; k<50; k ) {
duplicateMovieClip(this.snow, "snow" k, k);
}
Now like i said this works perfect for what I want, the snow starts falling on frame 500, but I want it to stop at frame 800, and it doesnt stop, can anyone help me? I would greatly appreciate it.
-x
View Replies !
View Related
Falling Snow
I read the falling snow tutorial and used the sorce and copied it into a movie (changing the script height and width like it says), but the snow just falls down in straight lines. Everything else works fine, but it just doesn't look right with snow falling down in straight lines...is there a certain part I have to edit to make it move around in the wind?
View Replies !
View Related
Falling Snow
I liked the fallin snow effect which is found on this site. I only have flash 5 and not MX. I attempted to re-create the effect in flash 5, but it did not work. A message appeared saying that part of the code was making the flash player run slowly. Nothin happens on the movie except 3 flakes of snow appear.
Im not very advanced with flash and was wondering if anyone knew what could be the problem? Cheers
View Replies !
View Related
Falling Snow
as a newcomer not sure if it's the right place to post this question.anyway here it goes:i have added the falling snow from the kirupa site but the effect stops after a few seconds on my home page.if i want a continuous, prolonged effect how do i modify the code?thanks for your help.
View Replies !
View Related
Falling Snow
The falling snow tutorial isnt working for me, I haven't even gotten to the second page!
It keeps saying that the script is causing ur PC to run slowly or something...
View Replies !
View Related
Snow Falling...
Well, now is winter time and we are all starting to make our logos with snow. I have this code for snow, but there is a problem.
Code:
var swidth = 250;
var sheight = 200;
_root.createEmptyMovieClip("DropClip", 15999);
for(var i=0; i<80; i++)
{
createdrop(random(sheight));
}
var lightstorm = setInterval(createdrop, 30);
function createdrop(y)
{
var clip = "drop" + Math.random();
_root.DropClip.attachMovie("Drop", clip, random(15999));
_root.DropClip[clip]._x = random(400);
if(y != null)
{
_root.DropClip[clip]._y = y;
}
_root.DropClip[clip]._alpha = random(100);
_root.DropClip[clip].speed = random(4);
_root.DropClip[clip].onEnterFrame = fall;
}
function fall()
{
if(this._y < sheight)
{
this._y += 1 + this.speed;
}
else
{
delete this.onEnterFrame;
this.removeMovieClip();
}
}
Now, my animation is 250x200 pixels. Where do I have and what do I have to insert that my snow start fall 20 pixels from 0 y and x wide.
I have 20 pixels black border on my animation, bu snow is falling on that border, too. I wont wont that. I wont that snow fall only in my picture.
Thanks.
View Replies !
View Related
Q: Falling Snow V2.0 Tut.
First of all, I am new here, so..
~ Hi everyone! ~
To the problem:
Yesterday I took a look at some of the Flash-tutorials here. And I decided to do the Falling Snow v2.0 tutorial. It was a really good and easy-to-do tutorial. I did exactly what was written in it - and it seemed to be troubleless, untill I was going to test it. Then my machine hang up for about 10 - 15 sec, and I got an error like: "... script is running slow ... blabla ... wish to continue?"
I understood something was wrong - so I started all over again, but I still got the same error, so I did it once more, and once more and .. yeah, you get it! Then I finally downloaded the source file from kirupa / this site, and test runned it - and it worked!!
After some time I understood that you had set up the document to use Flash Player version 6 (I got Flash 8), so I did the same to my fifty-sixth project, and it worked.
So, my question is: Why do I have to set the Player version to 6 instead of 8 to make this script run? And how can I know that a script require a earlier version of Flash to be 'executable'?
(OBS! I am a newbie with Flash & I hope my english is 'OK' enough .. hehe)
View Replies !
View Related
Help W/ Falling Snow
I am using the wonderful snow routine found on Kirupa.com and it looks great.
However, I want the snow to fall behind some text that is on the screen. I have my snow layer below my text layer, but the snow is still appearing in front of the text.
Here is the code that creates/duplicates the snowflakes:
for (k=0; k<90; k++) {
duplicateMovieClip(this.snow, "snow"+k, k);
}
I think it is creating new layers that are on top of my text layer.
How do I still create the new snow layers without having them appear on top of the text? I tried playing with swapDepth, but had not luck.
Any help would be greatly appreciated, thanks,
Chris
View Replies !
View Related
Falling Snow 2.0
Hey guys
I got a problem
I thought it would be nice to add the snow effect by Kirupa http://www.kirupa.com/developer/mx2004/snow.htm to my site.
I thought it was all going well. Now I have discovered that some people can not see the snow. Any ideas what could be going wrong?
Ive shown them the tutorial page and they can see the example. It's not cache because they have never viewed the site before. They seem to be able to view everything, but the snow.
Whats going on?!?!?!!
If anyone has any ideas what it could be. Thanks.
View Replies !
View Related
Falling Snow
Hey!!!
i went through the falling snow tutorial, and everything is working fine...
I'm wondering if anybody can tell me if I can mask the snow??
It seems that the mask has no effect on them, or even a top layer can hide them!!!
Thanks for any advice!!!
View Replies !
View Related
About Falling Snow
I just learnt the tutorial " create falling snow"
everything is fine but when I go to another scene the snow still
there how can I make them disappare
thank you very much , can any one tell me that
View Replies !
View Related
Falling Snow Tut.
on the falling snow tutorial, is there any way you can set the layer that the snow falls on. i only want the "snow" to fall under a mask i created. as of now, it looks like the origional "snowflake" stays inside the mask, but all the duplicates just go overtop the entire movie.
any help would be greatly appriciated.
tahnk you.
View Replies !
View Related
Falling Snow
Hi!!! I need create bubbles in flash, I used the fallinng snow script but I need that the particles go to the sky and not go to the floor :'( please heeeeelp. This is the code...
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 78;
movieHeight = 516;
//variables that will modify the falling snow
i = 1+Math.random()*1;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=30+Math.random()*60;
this._alpha = 50+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 = 20+Math.random()*movieWidth;
this._y = 5;
}
}
Thnks !!!
View Replies !
View Related
Falling Snow
I read the falling snow tutorial and used the sorce and copied it into a movie (changing the script height and width like it says), but the snow just falls down in straight lines. Everything else works fine, but it just doesn't look right with snow falling down in straight lines...is there a certain part I have to edit to make it move around in the wind?
View Replies !
View Related
Falling Snow
as a newcomer not sure if it's the right place to post this question.anyway here it goes:i have added the falling snow from the kirupa site but the effect stops after a few seconds on my home page.if i want a continuous, prolonged effect how do i modify the code?thanks for your help.
View Replies !
View Related
Falling Snow
The falling snow tutorial isnt working for me, I haven't even gotten to the second page!
It keeps saying that the script is causing ur PC to run slowly or something...
View Replies !
View Related
Help With Falling Snow 2.0
I'm new to the flash world! This is very cool!
Need help making falling snow. I have followed the Snow 2.0 tutorial, but
for some reason that I don't understand I can't get it to work. I have done it 3 times but every time I get an error: " A script in this movie is causing Macromedia Flash Player 7 to run slowly. If it continues to run you computer may become unresponsive. Do you want to abort the script?" This is as far as it will go. Does any one know what could be the problem. I think I'm following the instructions to the letter. Thank you for your help!
SFDemon
View Replies !
View Related
Falling Snow
I read the Falling Snow tutorial, but I actually came here searching for ideas to make falling snow in Flash. Anyone got suggestions? I'm slightly amateurish in flash, but I'm very computer literate and I understand most intructions.
help?
View Replies !
View Related
Falling Err Rather Blowing Snow
Fooling around with the kirupa falling snow 2.0 script and understand it for the most part but am trying to figure out how I would go about changing it from up down to right to left as Im looking more for a moving effect.
PHP 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;
}
}
Thats what I have been using, Ive fooled around with the negative/positive values with no luck. Maybe its just late and Im tired but could someone possible point me in the right direction that would help change it so it would move from the right to left?
View Replies !
View Related
Snow Falling Without Dissappearing
Hi Guys,
With the attached file I've got some snow falling, I want the snow to build up st the bottom of the file like it would in real life... If anyone has any ideas would be great! Also here is the code if that helps...
Code:
snowNumber = 70;
var flakes:Array = new Array("snow", "flake2", "flake3","flake4")
for (i=0; i<snowNumber; i++) {
newSnow = _root[flakes[random(flakes.length)]].duplicateMovieClip("snow"+i, i);
newSnow._x = Math.random()*Stage.width;
newSnow._y = -Math.random()*300;
newSnow.maxSnowSpeed = Math.random()*4;
newSnow.wind = Math.random()*6;
newSnow._xscale = newSnow._yscale = newSnow.alpha = Math.random()*60+40
newSnow.onEnterFrame = function() {
this._rotation -= this.maxSnowSpeed+1;
if(this._y>Stage.height || this._x>Stage.width || this._x<0){
this._y = -Math.random()*300;
this._x = Math.random()*Stage.width;
} else {
this._y += this.maxSnowSpeed+1;
this._x += this.wind-4;
}
this._alpha = this.alpha;
};
}
View Replies !
View Related
[F8] Trying To Create Snow Falling
I have some actionscript that makes one single snowflake fall, but I would like to know how to make lots of snowflakes fall. I tried to duplicate the snow_mc, but only one would move while the other was stationary. Any help is greatly appreciated:
import gs.TweenLite;
import gs.easing.*;
fallwidth = 930;
duration = 2;
falllength = 130;
snowflakes = 25;
function moveSnow():Void {
TweenLite.to(_root.snow_mc, duration,{_y: falllength, ease:Linear.easeNone, onComplete:moveSnow, onCompleteScope:this});
if(_root.snow_mc._y == falllength) {
_root.snow_mc._y = -9;
}
_root.snow_mc._x = Math.random() * fallwidth;
magnify = Math.random();
snow_mc._xscale = (magnify * 75) + snowflakes;
snow_mc._yscale = (magnify * 75) + snowflakes;
}
moveSnow();
View Replies !
View Related
Snow Falling Without Dissappearing
Hi Guys,
With the attached file I've got some snow falling, I want the snow to build up st the bottom of the file like it would in real life... If anyone has any ideas would be great! Also here is the code if that helps...
Code:
snowNumber = 70;
var flakes:Array = new Array("snow", "flake2", "flake3","flake4")
for (i=0; i<snowNumber; i++) {
newSnow = _root[flakes[random(flakes.length)]].duplicateMovieClip("snow"+i, i);
newSnow._x = Math.random()*Stage.width;
newSnow._y = -Math.random()*300;
newSnow.maxSnowSpeed = Math.random()*4;
newSnow.wind = Math.random()*6;
newSnow._xscale = newSnow._yscale = newSnow.alpha = Math.random()*60+40
newSnow.onEnterFrame = function() {
this._rotation -= this.maxSnowSpeed+1;
if(this._y>Stage.height || this._x>Stage.width || this._x<0){
this._y = -Math.random()*300;
this._x = Math.random()*Stage.width;
} else {
this._y += this.maxSnowSpeed+1;
this._x += this.wind-4;
}
this._alpha = this.alpha;
};
}
View Replies !
View Related
Snow Falling Upwards
I'm trying to find a script that will enable me to have multiple objects floating upwards - like the snow effect turned 180 degrees. I've gotten the snow script from Kirupa to work (by rotating the movieclip) but the script is incompatible with players 7 and up, and I can't figure out how to modify the external script to make the objects move upwards.
Does anyone have any ideas?
Thanks!
View Replies !
View Related
Random Snow Falling
hello all,
i am trying to make random mc (that are snow flakes) randomly fall. there are 3 different style of snow flakes that will also have to be considered.
Changes the sizes and the rate of falling should also happen.
any ideas of what i can do?
thanks so much for the time.
View Replies !
View Related
Help With Falling Snow Script.....
Anyone have a link to a falling snow script that works in AS3? I'd like one of the good ones with the snow falling in random patterns. It needs to be transparent though so that it will fall over a background.
I've found some AS for falling snow but apparently its AS2 and apparently AS2 and AS3 work together about as well as a monkey and a football do at copulating.
It seems like at least some of the code would cross over between the two but I guess not.
Thanks in advance.
View Replies !
View Related
Falling Snow Behind A Layer?
Hi!
This might have a really simple answer that i'm missing: I've created my falling snow but i want it to fall behind another layer (so it 'peeps' though).
I created my snow on a layer under the top layer and everything, but when i test the scene, the snow is on top..
Also - I want to make the 'snow' go upwards - i've tried changing minuses/plusses and the snow does go upwards, but the group of snow also moves upwards and gradually out of view?
Any suggestions would be greatly appreciated!
Jennie
View Replies !
View Related
Falling Snow And HitTest
Is it possible to us hitTest with falling snow? Here's the tutorial that I used for the snow.. I didn't include the drift part, the "snow" just goes straight down. tutorial
if anyone can help me i would appreciate it.
View Replies !
View Related
Stop The Falling Snow?
I found the on this site tutorial on how to make falling snow in flash, which is excellent by the way, but now I have a question about it. HOW DO I STOP IT???
I have followed every step like it says, but when I continue into the next frame, the snow just keeps falling, even if I change scene. I have tried with several codes, "removeMovieClip("Snow")", "snow.stop();" "_root.snow.unloadMovie();", but nothing works!
Can someone please help me??
View Replies !
View Related
Falling Snow Question?
Hey everyone! I'm a novice at flash and am trying to teach myself the program slowly but surely. I've been able to do some cool things with the aide of kirupa.com and I am thankful for it enriching the design of some projects I am currently working on. I am having issues with the falling snow tutorial for flash mx. I've created it and it looks great, except for my purposes, I'd like to have an option to turn the snow on or off. I can't seem to figure out how to turn it off and would really appreciate some help on this.
Secondly, does anyone know of any good tutorials for creating a photo gallery using thumbnails to view pictures? Or do I have to make thumbnails for every pic I have and then have each one link to a different frame to view the respective picture?
Thanks!
Batman124617
View Replies !
View Related
Help For Falling Snow 2.0 Tutorial
I need help on how to make the Falling Snow 2.0 tutorial. I've been following the instruction thoroughly but for some reason there were always errors on "onClipEvent". I hope someone can help and guide me to do the Falling Snow.
Thanks alot i'll be waiting for your help guys.
Peace
View Replies !
View Related
Falling Snow, Top Perspective Looking Down
Hey, I have a question. This project I am working on needs a top view on a snowstorm. I was thinking I can use code similar to a starfield coming at you, and then modifying it so that the objects start from around you and fall towards the center. (opposite direction). However, when I change the code the way I believe I need to, I get the right thing to happen but not to regenerate. It happens only once, and once they reach the center, they don't recreate around the edges of the screen. Here is the code I am using from a simple starfield tutorial:
_global.ppDist = 700;
_global.speed = 50;
//update function to handle perspective projection and scaling
update = function ()
{
perspective = ppDist / (ppDist - this.z);
this._x = this.x * perspective;
this._y = this.y * perspective;
this._xscale = this._yscale = 70 * perspective;
// add z motion...
this.z += speed;
// push back when it reaches the view position
if (this.z > 490)
{
this.z -= 2000;
}
}
//empty clips for drawing
_root.createEmptyMovieClip ("drawing", 1);
_root.drawing.createEmptyMovieClip ("sq", 1);
// centre the 'drawing' mc on the stage
_root.drawing._x = 300;
_root.drawing._y = 150;
// draws a solid white 2x2 square in the 'sq' mc
_root.drawing.sq.beginFill (0xffffff, 100);
_root.drawing.sq.moveTo (-1, -1);
_root.drawing.sq.lineTo (1, -1);
_root.drawing.sq.lineTo (1, 1);
_root.drawing.sq.lineTo (-1, 1);
_root.drawing.sq.lineTo (-1, -1);
_root.drawing.sq.endFill ();
// hide the original 'sq' off stage
_root.drawing.sq._y = 1000;
// make 198 copies of the square
for (i = 2; i < 200; i++)
{
initOb = {x:random (600) - 300, y:random (300) - 150, z:random (2000) - 1600};
//note: random(600)-300 gives a random integer between -300 & 299
//note: random(2000)-1600 gives a random integer between -1200 & 399
_root.drawing.sq.duplicateMovieClip ("s" + i, i, initOb);
_root.drawing["s" + i].onEnterFrame = _root.update;
}
I have been playing around with the Z positioning lines in the middle. Any ideas?? I would really appreciate help. Thanks in advance!!!
Luke
View Replies !
View Related
[FMX] The Falling Snow Tutorial....
i would really appreciate it if someone could give me a more in depth explanation of how this tutoiral works:
http://www.kirupa.com/developer/mx2004/snow.htm
i understand the ideas behind the script and what you are asking flash to do. the thing is my maths isnt that great. if someone could explain how some of the equations work, that would be excellent
examples:
this._alpha = 20+Math.random()*50; ok, randomising alpha. got it. but where do these numbers come from? how did you reach them?
or
// horizontal movement
rad += (k/180)*Math.PI;
xmovement = _root._xmouse;
this._x -= Math.cos(rad)+(xmovement-(width/2))/50;
understand what this is trying to do here. but.... man... the maths goes right over the top of my head... and explanation??
thanks very much in advance!!
-hazza
View Replies !
View Related
Falling Snow 2.0 Problemo
hey, this question probably has a really easy solution. i'm just not seeing it.
Ok, so I downloaded the Falling Snow 2.0 .fla and I can test/publish it fine.
The problems start when I change the graphic the .fla uses as a snowflake. Nothing but the original circle seems to work. Flash nearly has a heart attack and stalls for about half a minute and then says that the scripts i'm trying to run might slow Flash down.
I have the exact problem if i try to import the Falling Snow movieclip into any other fla.
Please help! Thanks.
View Replies !
View Related
|