A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5828 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


Random Links | Add your own Flash Related Links
Flash Tutorials 1280 Tutorials 7 New Tutorials Added!
What's New | Top100

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Animation

Categories Fireworks
Author: EmperorGR

 
Page 3
«prev 1 2 3 4 5 next»

Step 2:actionscript

¡ö Choose Insert--> New Symbol.Make it a movie clip named firework.

¡ö From the Library (Window--> Library) drag in an instance of myBeam. In the Property inspector, type myBeam1 in the Instance Name text box.

¡ö Insert a layer named actions. Add keyframes in Frames 2 and 3. In the first keyframe, type or paste in the following ActionScript.

Code

//This action script duplicates the
//symbol instance myBeam1
//and rotates it to appear as the
//firework. It randomizes the//overall size of the firework, as
//well as the individual beam
//lengths. It also randomizes the
//color of each firework.
//Initialize variables
i=0;
//Cf is the variable that counts the
//frame and aids in setting
//the alpha value so that the
//fireworks twinkle.
cf=0;
//Number of beams regulates the
//fullness of each firework.
numberOfBeams=40;
// Random sizes are set for a single
//firework on the screen
myScale = 20 + Random(80);
//Make the instance, myBeam1,
//visible. This is necessary because
//myBeam1 gets set to invisible
//below.
setProperty("myBeam1",_visible,true)
;
// A maximum random size is set for
//the next firework on the screen
xyscalevar = 20 + Random(80);
//Randomize the color of the next
//firework
colorArray=["FF","00","33","99","66",
"CC"]
myColor=new Color(myBeam1);
myColor.setRGB("0x"+colorArray
[Random(6)]+colorArray[Random(6)]+
colorArray[Random(6)]);
// The following lines create the
//firework from a single beam
// and give each beam a random length
//which does not exceed the maximum
//size
// set by the variable xyscalevar
//above
do {
duplicateMovieClip("myBeam1","beam"
add i,i);
setProperty("beam" + i,_rotation,
random(360));
setProperty("beam" +
i,_xscale,myScale+random(myScale));
setProperty("beam" +
i,_yscale,myScale+random(myScale));
i = Number(i) + 1;
)
while (Number(i)<=numberOfBeams
)
//Make the instance, myBeam1,
//invisible. This is necessary
//because myBeam1 was never resized
//for this particular
//firework and it would look odd if
//it were visible.
setProperty("myBeam1",_visible,false
);

«prev 1 2 3 4 5 next»

» Level Basic

Added: : 2003-12-26
Rating: 5.72 Votes: 56
Hits: 2352
» Author
18 years old,student,new to Flash
» Download
Download the files used in this tutorial.
Download (0 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs