![]() |
![]() ![]() |
One of the key features of the particulator is to create motion tweens that send particles out relative to the motion you set up. For example, you can create a tween for a rocket moving across the stage, set the velocityFromMotion property to a negative value like -90, and particles would emit behind the rocket and move away from it, even as the direction of motion of the rocket changes. You can attach the component to a motion path for more complex tweens.
Unfortunately, tweening Flash components on the stage does not work as it should. It's possible to set up a motion tween for components in authortime, but the tween will not animate when you export your movie. Since tweening is such a major part of the particle generator, there is a workaround. You simply need to create a parent movie clip for the component that you can then tween. Below is a step-by-step walk through of how to do this.
1. Drag a particulator onto the stage, and make sure it is selected.
2. Right-click and select 'Convert to symbol...'. This brings up a dialog to allow you to create a 'holder' movie clip that will be tweened. Make sure the 'Movie Clip' radio button is checked.
3. Double-click to 'Edit in place' the movie clip you just created. The particulator component should be inside. Name the component instance something like 'cmp'.
4. Create a layer on the timeline for ActionScript. Add code to set the motionGuider and emitterStage for the component. In this example, the emitterStage is the parent, and the motionGuider is the new 'holder' mc. This means the component's velocity will be calculated every frame by movement of the 'holder'. All particles will be emitted to the parent movie clip of 'holder'.
cmp.motionGuider = this;
cmp.emitterStage = _parent; // ActionScript 3: cmp.emitterStage = parent;
5. Select the component again, Click 'Parameters', 'Launch Component Inspector', go to the 'particle physics pane' and choose a non-zero value for velocityFromMotion.
6. Create any kind of motion tween on the stage for the holder movie clip. For more help, see the sample fla file ParticulatorSamples.fla included with the package to see how this is all set up.
For more information on tweening this component (or any other questions), please visit the forum. Also check out the sample file ParticulatorSamples.fla that was included in the mxp install package.
![]() ![]() |
|