.
overview
features
samples
help & support
downloads
buy now
Questions
Instructions

Answers

topInstructions

What it does:

Amazing Fireworks 1.0 is a firework generator for use in your flash projects. Includes four different rocket types with sound effects. Firework displays are customized using very simple actionscript and they include support for grand finales as well. Full instructions are included, only basic flash knowledge is required to customize this applet.

This applet makes use of the Flash Blending Modes, so at this time, only Flash 8 is supported.

note: Sound effects were custom-manufactured by me using exclusively public domain sources as well as homemade sounds.


Included files:

AwesomeFireworks_1.0_Flash8.fla Flash 8 development file
AwesomeFireworks_preview.fla Preview file (includes button interface)
Instructions.txt The file you're reading now


How to use Amazing Fireworks 1.0

Open the .fla file and drag the "Fireworks" movieclip from the library into your own flash project. That's it!
The movieclip automatically generates fireworks according to variables set up in the "USER SETTINGS" section in the "Fireworks" movieclip "actions" layer (see "Creating your own fireworks display" section below).


How to customize Amazing Fireworks 1.0

You'll almost certainly want to customize this applet to work in your individual project.

Once the "Fireworks" movieclip is on the stage in your flash project, edit the movieclip by double-clicking it.

All actionscript is contained in frame 1 in the "actions" layer. You may modify the variables contained in the USER SETTINGS area. There is no need to edit any code below line 41. USER SETTINGS section has comments describing variable settings, but here are some tips:

When using a project with height larger than 300px, you may find you want to adjust the "LaunchSpeed" variable to compensate for a taller stage area. Adjusting this variable will determine at what altitude the fireworks explode, or how high they travel. You may reduce this value if you'd like the fireworks to explode or travel lower in the stage area, or if your project is shorter than 300px in height. Values between 10 and 26 work well for most situations.

Changing the launch position of fireworks is easy. By default they launch from an area about 50 pixels wide in the bottom center of the stage. By modifying "startX" and "startY" variables, you can place the launch area anywhere on your stage. Also consider modifying the "generationRange" variable to control the horizontal spread of the launch area. Don't forget to change "LaunchSpeed" if you're customizing the launch area - this will help you control at what height fireworks are exploding.


Creating your own fireworks display

This is the heart of the applet, making your own fireworks display. There are four types of firework rockets included with Amazing Fireworks 1.0, which are launched programatically from the data in an array - those of you who don't know what an array is, stay with me, we'll walk through customization step-by-step.

Once the "Fireworks" movieclip is on the stage in your flash project, edit the movieclip by double-clicking it.

All actionscript is contained in frame 1 in the "actions" layer. You may modify the variables contained in the USER SETTINGS area. There is no need to edit any code below line 41.

You'll find some useful information in the "USER SETTINGS" area about setting up the arrays. There are two arrays used for controlling your fireworks display. They are "RocketControl" and "FinaleControl". Each of these contains a bunch of numbers (0-4) seperated by commas. Each number represents a "launch command" to the program. These "launch commands" are handled one after another at regular intervals (default is one "launch event" per second). The last "launch command" in RocketControl should ALWAYS be "finale" (that's WITH the quotes). When the program reaches "finale" it will begin reading "launch commands" from FinaleControl (which is designed to fire at a faster interval).

example of RocketControl (you just need to edit the numbers, feel free to add or subtract any numbers, making sure they're all seperated by commas):

var RocketControl:Array = new Array(1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 2, 0, 2, 0, 3, 3, 3, 0, 3, 0, 3, 0, 0, 0, 4, 4, 0, 0, 4, 4, 0, 0, 0, "finale");

Here's what the numbers mean:

0 - at this interval, don't launch anything.
1 - at this interval, launch rocket type 1
2 - at this interval, launch rocket type 2
3 - at this interval, launch rocket type 3
4 - at this interval, launch rocket type 4
"finale" - at this interval, proceed with the grand finale.

RocketControl and FinaleControl each execute "launch commands" at different intervals. These intervals are controlled using the variables below:

The "FrameRate" variable should be set to your project's frame rate - this is necessary to use "seconds" for the following variables:
"ControlInterval" represents the number of seconds to wait between launch commands for "RocketControl" - feel free to use decimals (default is 1 second).
"FinaleInterval" represents the number of seconds to wait between launch commands for "FinaleControl" - since this is the grand finale, it's reccomended rockets fire quicker - feel free to use decimals (default is 0.2 seconds)

Finally, the variable "LoopDisplay" determines if the display will start over when it reaches the end of the finale. Set to "true" to enable looping, or set to "false" to let the display play through once and stop.


Advanced - Starting the display using a MovieClip event:

The fireworks display is initiated on line 500 with the function call playShow();
Optionally, you may remove this, and assign the playShow(); function call to any MovieClip event such as a button press, etc.
You may disable the fireworks display option (if, for instance, you want to call rocket launches individually - see below) by simply commenting out or removing this line 500.


Advanced - Calling rocket launches individually:

To launch the rockets individually, use the following function calls:

Pop(); - launches "Pop" rocket - small, loud, and bright.
PopSparkle(); - launches "Pop-Sparkle" rocket !! this one is CPU intensive, go easy on them!
Explode(); - launches "Explode" rocket - your standard run-of-the-mill firework.
SparkleFlare(); - launches "Sparkle-Flare" rocket - these are the sparkling screamers - CPU intensive, but not as bad as "Pop-Sparkle".



That's it! Please enjoy, and as always, don't hesitate to contact me with any questions at dcollins@davecollinsphoto.com!

 
featured componentsfeatured components