September 1, 2009

Falling Star Animation in Flash

Notice the following sample swf , This animation created only using script.This can be used for games , presentations etc



  1. Create new Flash File (File->New or Ctrl + N) and Name it as FallingStars
  2. Create one Moviclip called "star" 
  3. Inside this movieclip draw circle and fill the Gradient .Please check the following figure for Gradient settings
  4. Now come back to stage , select "star" Movieclip and give Instance name as "Star".
  5. 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();
    }
    }

  6. Now save the file and Run(Ctrl+Enter) ,You will get the final output
Download Source Code from here
 

About

we are doing all kind of web / standalone applications using Flash , FMS, PHP , XML , CSS , etc. we handle all projects starting from the initial design concept through the delivery of your personalized product. Our commitment to you is comprehensive and complete-aimed at satisfying your every need. We have the experience and the expertise to get the job done.

Site Info

we Currently handling web requirements and multimedia productions and we have the capability of cutting your web , graphics and multimedia expenses to a bare minimum without sacrificing professional quality or delaying production. Our focus is on the development of smart, successful ideas and we always strive to maintain the highest . we currently using following technologies Flash 8, Flash cs3,Actionscript 2 ,Action script 3 ,Flash Media server , PHP,AMFPHP,XML ,HTML ,CSS ,Photoshop

Text

Digizone, AnnaNagar East, Chennai, TamilNadu ,India. Please view our website for further details

Flash and photoshop resources FREE Download Copyright © 2009 Community is Designed by Bie