- Create new Flash File (File->New or Ctrl + N) and Name it as FallingStars
- Create one Moviclip called "star"
- Inside this movieclip draw circle and fill the Gradient .Please check the following figure for Gradient settings
- Now come back to stage , select "star" Movieclip and give Instance name as "Star".
- Now Open Action Layer(Press F9) , and paste the following code in this.
onClipEvent(load){
_x=175;
_y=175;
xmove=-10+Math.random()*20;
ymove=-10+Math.random()*20;
_xscale=_yscale=50;
_alpha=0;
}
onClipEvent(enterFrame){
_alpha+=5;
_x+=xmove;
_y+=ymove;
if(this._x>300 or this._y>300 or this._x<0 or this._y<0)
{
this.removeMovieClip();
}
}
- Now save the file and Run(Ctrl+Enter) ,You will get the final output
September 1, 2009
Falling Star Animation in Flash
Author: Rupa
| Posted at: 5:54 PM |
Filed Under:
Animations
|
Notice the following sample swf , This animation created only using script.This can be used for games , presentations etc