Particle "Ghosting" Made Simple

One of the most common effects used in particle animations is particle "ghosting"; that is, having each particle leave a fading out, shadowy trail. In this tutorial we show how to accomplish this effect in a context as simple as possible.

Download

Download the well-commented source file (Flash CS4) corresponding to the applet above, GhostingEffect.fla.

Comments

In several of our particle animations, we have used variations on a specific technique for creating the fading and ghostly trails behind the particles as they move around. These animations include among others:

The technique of ghosting becomes becomes crystal clear if you download the 'fla' file from the link above and look at the simple Timeline code and the comments within the code. The effect is not difficult to achieve, but the complexity of our earlier particle examples may make it difficult to find the relevant code. We present here a very simple example of a single animated particle, with all code contained in a single fla file.

In short, the effect is created through the use of a bitmap which serves as the main display. The particle sprites are never shown on the stage; instead, on each frame, they are drawn to the bitmap. Also, the old picture is never erased; instead, we apply a BlurFilter and perhaps also a ColorTransform which together fade out the older pictures as the newer frames are drawn on top.

Back to Intermediate Tutorials              Back to Flash and Math Home

We welcome your comments, suggestions, and contributions. Click the Contact Us link below and email one of us.

Adobe®, Flash®, ActionScript®, Flex® are registered trademarks of Adobe Systems Incorporated.