Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making the falling snow cover the whole screen

Status
Not open for further replies.

kranny

Programmer
Sep 25, 2001
7
CA
a snow ball pic sits upper left of bkground.
I created a mc of the snoww ball and tweened the action path of the falling snow.
but the snow won't fall over the whole screen.
This is the actionscripts:
Frame 1:
c = "1";
maxFlakes = "60";
// c is just a loop control
// maxflakes is the total number of snow at anyone time
Frame 2:
set ("xpos" add c, random(200));
set ("speed" add c, Number(random(4))+2);
duplicateMovieClip ("/flake0", "flake" add c, c);
setProperty ("flake" add c, _x, eval("xpos" add c));
size = Number(random(50))+25;
setProperty ("flake" add c, _xscale, size);
setProperty ("flake" add c, _yscale, size);
i = "1";
while (Number(i)<=Number(maxFlakes)) {
setProperty (&quot;flake&quot; add i, _y, getProperty(&quot;flake&quot; add i,_y) + eval(&quot;speed&quot; add i));
i = Number(i)+1;
}
Frame 3:
if (Number(c) == Number(maxflakes)) {
c = &quot;1&quot;;
} else {
c = Number(c)+1;
}
gotoAndPlay (2);

I tried to increase the tweening length but it doesn't work does anyone have any ideas?
oldnewbie, i emailed you the fla - i hope thats cool!

 
It's cool... but didn't get it yet!
mywink.gif
ldnewbie
 
If i could only express how awesome your help is...
 
Yeah! Talk to me about it! Or better... Talk to Carl about it!
mywink.gif
ldnewbie
 
Nope!
Been getting a lot of flas tonight!
What e-mail did you use?
Just deleted some of them... Hotmail doesn't allow more than 2MB of space!
mywink.gif
ldnewbie
 
jason_havelock@yahoo.ca, i'll send it again, k
 
Ment... Which of my e-mails did you send it to!
Ok! Got it from your link!
But waisted! Turning in!
Will have a look at it in the morning!
mywink.gif
ldnewbie
 
Had a look at your .fla...

The problem is that your movie is 400 pixels wide but you've only set up 200 pixels worth of x positions for the snow to start from. If you increase the value in...

set (&quot;xpos&quot; add c, random(200));

... to give a higher range of random values you'll be able to fill the screen. Remember to take off a few pixels to compensate for the offset of your &quot;c&quot; loop variable.

set (&quot;xpos&quot; add c, random(600)-100);

..seems to work pretty well.

Nice effect by the way.



 
Silly...silly me, Thanks, i hope you read this oldnewbie, thanks for you help as well. Heck, i'll even thank tek-tips.com, your mothers and fathers, your computers and your internet connections, and your hand digits, and your seribal cortex and the chair you all sit on,... maybe not the chair,..... ok maybe the chair, but to it empathy goes out.......... Later.
 
not like people sit on me or anything. Thanks again y'all ¤
 
Yeah! Read it! Good Wangbar spotted it!
Had too much wine last night... I never did!

Nice effect! Maybe Havey should get a hold of this!
mywink.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top