Hi all! Yay its Friday!
I’ve done my own version of Kirupa’s Falling Snow tutorial.
http://www.kirupa.com/developer/mx/snow.htm
I wanted to change the 1-frame movieclip for the snow into a 3 or more frame movieclip. Each frame would have a stop action assigned to it. Now on the actionscript part I wanted to say something like this:
now = new Date().getHours();
// Sets 24 hour format on the hours display.
if (hours>=13) {
nHours = nHours-12;
}
// If hours are 00:00 to 11:59 set "snow" to display frame 1, snow
if (now>=0 && now<12) {
pad.gotoAndStop("snow");
}
// If hours are 12:00 to 05:59 set "snow" to display frame 2, a dog
if (now>=12 && now<19) {
pad.gotoAndStop("dog");
}
//If hours are 06:00 to 11:59 set "snow" to display frame 3, a car
if (now>=19 && now<24) {
pad.gotoAndStop("car");
}
for (k=0; k<10; k++) {
duplicateMovieClip(_root.snow, "snow"+k, k+0);
}
“Snow” frame 1 is a snow flake symbol
“Snow” frame 2 is a dog symbol
“Snow” frame 3 is a car symbol
So on a certain time the movieclip will swap to a different frame and the “snow” will appear to be something different like a dog or a car symbol. When I try this it doesn’t work properly. I get a full snow fall and only 1 instance appearing as it should do. So I get 10 instances of snow, but only 1 instance of a falling dog amongst them. Can anyone help me?