Flint Particle System Forum - how do i properly kill the emitter after the last particle dies?2010-12-25T17:24:45+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
how do i properly kill the emitter after the last particle dies?http://flintparticles.org/forum/comments.php?DiscussionID=246&Focus=878#Comment_8782009-07-30T22:13:13+01:002010-12-25T17:24:45+00:00firemaplegameshttp://flintparticles.org/forum/account.php?u=231
Hello!
First of all, FLINT is awesome! Thank you so much!
I have been trying to figure this out, but I cannot figure out how to do this properly...
My situation is this:
I have an emitter ...
First of all, FLINT is awesome! Thank you so much!
I have been trying to figure this out, but I cannot figure out how to do this properly...
My situation is this:
I have an emitter animating across the stage, it is emitting "fairy dust" as it travels.
Its counter is set to 'steady'.
When the emitter reaches its destination, I tell its counter to stop emitting by calling counter.stop(); This works fine.
What I can't figure out is how to remove/kill the emitter and the renderer from memory when the last particle fizzles out.
Any help is appreciated.
Best, Joe]]>
how do i properly kill the emitter after the last particle dies?http://flintparticles.org/forum/comments.php?DiscussionID=246&Focus=887#Comment_8872009-08-06T18:38:01+01:002009-08-06T19:22:03+01:00gspschmidhttp://flintparticles.org/forum/account.php?u=228
You could just go with removing the emitter from the renderer (which might actually be superfluous) and then removing the renderer from the display object it was added to. Finally, you would set any ...
var e:Emitter2D = m_psEmitter = new Emitter2D(); (...) e.start(); e.runAhead(3.0);
var r:DisplayObjectRenderer = m_psRenderer = new DisplayObjectRenderer(); r.addEmitter(e); addChild(r);
(.....)
m_psRenderer.removeEmitter(m_psEmitter); //delete m_psEmitter; m_psEmitter = null; removeChild(m_psRenderer); //delete m_psRenderer; m_psRenderer = null;]]>
how do i properly kill the emitter after the last particle dies?http://flintparticles.org/forum/comments.php?DiscussionID=246&Focus=888#Comment_8882009-08-07T07:47:06+01:002010-12-25T17:24:45+00:00firemaplegameshttp://flintparticles.org/forum/account.php?u=231
Hello!
Thanks for getting back to me!
I actually just found the answer a few hours ago:
e.addEventListener( EmitterEvent.EMITTER_EMPTY, removeMe );
First I stop the emitter's counter, which ...
Thanks for getting back to me! I actually just found the answer a few hours ago: