About the Particulator component

The Particulator component lets you easily add advanced particle effects and animations to your Flash movies. A custom UI is provided with a preview window to let you change parameters and see the changes reflected in realtime on the stage before you publish. Use your own movie clips in the library as particles. Control particles physics, variation, appearance, and environmental factors such as gravity and wind. The component also has a feature that makes particle velocity follow the motion of the component- this means you can create a tween for the component and it automatically emits particles to follow this motion path. See Tweening the Particulator component for more details.

The component works by continually emitting particles on each frame update. It chooses a movie clip at random from a pool specified by particleMcPool. It applies initial appearance and physics properties for each particle movie clip, and updates it on each subsequent frame. Each particle is initialized with a 'life span', which is the number of seconds it lasts in the scene. When the particle's life span has been exhausted, the movie clip is removed from the scene. Each particle is given an ActionScript object containing info on the particle updated each frame. A callback function is called on each particle on update also. See the Particle object page for a complete description of the dynamic properties.

For a full description of methods, events and properties see the Particulator class description page.

Related topics

Particulator parameters

You can use the the custom interface of the Component inspector to set the following properties for each Particulator component instance on the stage while authoring. These properties can also be set via ActionScript at runtime. For a full list of all properties, see the Particulator class description page.

alphaFadeStartPct percentage of life span used to indicate when to begin fading each particle's alpha to 0.

alphaRandom percentage value used to randomize initial alpha value.

emitterType can be 'point', 'rectangle' or 'ellipse'.

gravity force of gravity acceleration in pixels per second per second.

gustDuration seconds duration for a random gust of wind.

gustFrequency seconds in between random gusts of wind.

initialAlpha initial percentage alpha value for each created particle.

lifeSpan life span in seconds for each emitted particle.

lifeSpanRandom percentage value used to randomize the life span of each particle.

particleMcPool array of movie clip linkage ids to be used as particles.

particlesPerSecond number of particles emitted per second. Set this to 0 to turn off the generator.

particleSize percentage scale value of each movie clip used as particles.

particleSizeRandom percentage value used to randomize the size of each particle.

rotationSpeed rotation velocity of particles in angles per second.

rotSpeedRandom percentage values used to randomize rotation speed.

velocityFromMotion percentage for which particle velocity follows the motion guider.

velocityMagnitude magnitude of velocity for particles in pixels per second.

velocityRandom percentage value used to randomize particle velocity.

windDirection angle of wind applied.

windForce velocity of wind applied to particles in pixels per second.

windSwirl percentage of wind swirl to apply.

windTurbulence percentage of wind turbulence.

 

You can write ActionScript to control these and other characteristics of how the Particulator component displays and functions using its properties, methods, and events. Not all of these properties can be modified from the authoring interface. For more information, see Particulator class.

 

Creating an application with the Particulator component

To add a Particulator component to your flash document while authoring, simply drag the component from the Components panel onto the stage. The component is located under the flashextension.net AS2/AS3 node in the Components panel. Before the generator can emit particles, make sure you have movie clips in your library and some are selected in the particle objects list box in the 'particle appearance' pane of the UI. Test and run your movie to see the particles emitted.

The Particulator component uses a custom interface in the Component Inspector to let you change properties and preview physics and appearance in a user-friendly manner. To access this interface, simply select your component instance on the stage, goto the 'Parameters' tab of the Properties panel, and then click the 'Lauch Component Inspector' button.

The Component Inspector

The following screen shots shows each of the 4 panels of the interface for the component- emitter, particle physics, particle appearance and environment. A running preview of the component is shown at the top of the UI. The preview is updated on the fly as you change parameters, which allows you to visualize the effects of changing each parameter. The preview is also draggable, so you can move it around to adjust the center.

Special Note: Flash CS3 is prone to hang or crash while the component inspector preview is up in some conditions. In order to avoid this, please deselect your component on the stage (ie. make sure the component inspector preview is not running) before exporting your flash movie. For more help, please visit the forum.

emitter

The 'emitter' panel lets you set characteristics of how particles are emitted from the generator. You can choose to emit particles from a single point or from rectangular or elliptical area bounded by the size of the component instance on the stage.



particle physics

The 'particle physics' panel allows you to preview changes in realtime to various physics properties. Use the slider to change the property values, or enter them manually. Some of the properties, especially percentage values, will limit you to a range of values. Others will let you enter in any numeric value.


particle appearance

The 'particle appearance' panel lets you set properties that determine the look of each emitted particle. Use the 'particle objects' list box to select one or more movie clips from the library to be used as particles. The UI automatically sets the movie clips you choose to be 'exported for ActionScript' in the first frame if not in that state already.



environment

The 'environment' panel allows you to set properties that continuously effect all emitted particles like wind and gravity. To change the wind direction, grab the arrow and move it to point in the desired direction of wind.