Search tutorials
Adding actions (cont.)
Add another layer to the timeline and create 1 keyframe in it (see illustration). Call it - actions.
Open action for fisrt keyframe in actions layer : right mouse click on keyframe -> actions ( or left click on keyframe and press F9)
Put this code:
//set snowflakes' speed
spdSnowFlake = 0.4;
//set number of snowflakes
numSnowFlake = 30;
// set amplitude of snowflakes
ampSnowFlake = 0.6;
// set this value to height of document.
Height = 550;
// set top - place where snowlakes start flying.
Top = -10
// set bottom if snowflake reach it, one will be restarted again.
Bottom = 330;
// set to invisible movie clip that we are gonna duplicate below
_root.snowflake._visible = false;
// set starts point of first flying
_root.snowflake._y= -50;
// duplicating snowflakes
for (i=1; i<= numSnowFlake; i++){
snowflake.duplicateMovieClip( "snowflake"+i, i+100 );
snowflake._x=10+i*10;
eval("snowflake"+i)._visible=true;
}
| » Level Intermediate |
|
Added: 2003-12-28 Rating: 7.9 Votes: 67 |
| » Author |
| Sergei A. Kornev web-designer from Saint-Petersburg, Russia. More information available on site: www.puehue.com. |
| » Download |
| Download the files used in this tutorial. |
| Download (66 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!