Flint Particle System Forum - How do I prevent particles fading once reached destination? Sun, 11 Dec 2011 23:59:39 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher How do I prevent particles fading once reached destination? http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1398#Comment_1398 http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1398#Comment_1398 Wed, 06 Oct 2010 16:02:16 +0100 hectors
_startEmitter.addAction(new TweenToZone(new BitmapDataZone(__myBitmapData)));

This works great but I want my particles not to disappear when they reach their destination.

What's the best way to do this?

Thanks :) ]]>
How do I prevent particles fading once reached destination? http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1402#Comment_1402 http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1402#Comment_1402 Sat, 09 Oct 2010 16:16:32 +0100 Richard
However, if you listen for the particle dead event, you can revive the particle and add it to a different emitter which doesn't tween it (or kill it). Something like this

stableEmitter = new Emitter2D();
renderer.addEmitter( stableEmitter );
stableEmitter.start();

emitter.addEventListener( ParticleEvent.PARTICLE_DEAD, reviveParticle );

function reviveParticle( event:ParticleEvent ):void
{
event.particle.revive();
stableEmitter.addExistingParticles( [ event.particle ], false );
}


You can see a more complete example of this in the Logo Tween example. ]]>
How do I prevent particles fading once reached destination? http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1464#Comment_1464 http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1464#Comment_1464 Thu, 09 Dec 2010 21:15:40 +0000 Bob vd Bibs
i tried this but the particle still has an alpha of 0 so i cant see it. (or something else is wrong).
Is there a way of getting more control over the lifecycle of the particle? How can i prevent the particle from fading?

tnx ]]>
How do I prevent particles fading once reached destination? http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1484#Comment_1484 http://flintparticles.org/forum/comments.php?DiscussionID=408&Focus=1484#Comment_1484 Mon, 20 Dec 2010 07:46:02 +0000 Richard
stableEmitter = new Emitter2D();
renderer.addEmitter( stableEmitter );
stableEmitter.start();

emitter.addEventListener( ParticleEvent.PARTICLE_DEAD, reviveParticle );

function reviveParticle( event:ParticleEvent ):void
{
event.particle.revive();
event.particle.color = 0xFFFFFFFF;
stableEmitter.addExistingParticles( [ event.particle ], false );
}
]]>