Alright, to add to this post, in case anybody else comes looking, full
applicable source code:
<Class variable declarations>
[Embed(source = "raindrop.png")]
private static const RAINDROP_PNG:Class;
private var _emitter:Emitter;
private var _particleSprite:FlxSprite;
<Constructor, or some initialization function>
_particleSprite = new Sprite();
_particleSprite.makeGraphic(320, 240, 0x00000000);
add(_particleSprite);
var handler:ParticleHandler = new
BitmapHandler(_particleSprite.pixels);
_emitter = new Emitter2D(new SteadyClock(8));
_emitter.particleHandler = handler;
_emitter.addInitializer(new DisplayObjectClass(RAINDROP_PNG));
_emitter.addInitializer(new Position(new Line(0, 0, 640, 0)));
_emitter.addInitializer(new Velocity(new LazySectorZone(4, 0.5)));
var gravity:Gravity = new Gravity();
_emitter.addAction(gravity);
_emitter.addAction(new Move());
_emitter.addAction(new DeathZone(new RectZone(0, 0, 640, 480), true));
<draw function (NOT update!- updates may occur multiple times per
draw, making particles have shadows)>
_emitter.step();
_particleSprite.drawFrame(true); //This is the most important part!
It forces the FlxSprite to show the particles that were added by
Stardust!
super.draw(); //This is where _particleSprite gets drawn
_particleSprite.fill(0x00000000); //This is the second most important
part! If we don't do this, the particles leave trails!