PDA

View Full Version : Random symbols in Falling Snow.



as_clark20
May 21st, 2004, 09:34 AM
This question relates to the Falling Snow tutorial on this site...

How can I get the snow fall to randomly change every time the person sees the animation so, for example, you'll see falling snow right now, yet the next time you visit the site you'll see falling cars, or falling mobile phones.

Any ideas?

pom
May 21st, 2004, 09:39 AM
Make a list of all the symbols that can fall from the sky, put them in an array. When you initialize your movie, randomly select one element from that array and duplicate it.
myLinkageNames = ["car", "snow", "house", "apple"] ;
clip = myLinkageNames[random (myLinkageNames.length)] ;

// then in the loop where you're duplicating:
clip.duplicateMovieClip ("b"+depth, depth) ;

as_clark20
May 21st, 2004, 10:09 AM
Do you have a fla I could study because I can't get this thing to work. I'm pulling my hair out!

pom
May 21st, 2004, 11:51 AM
What is not working? Did you manage to select another clip?