Flint Particle System Forum - Image explosion with symbol on stage Sat, 25 Dec 2010 19:14:18 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Image explosion with symbol on stage http://flintparticles.org/forum/comments.php?DiscussionID=155&Focus=624#Comment_624 http://flintparticles.org/forum/comments.php?DiscussionID=155&Focus=624#Comment_624 Wed, 14 Jan 2009 23:32:59 +0000 speasley
var particles = Particle2DUtils.createParticle2DFromDisplayObject(sprite,renderer,emitter.particleFactory);
emitter.addInitializer(particles);

This results in:

TypeError: Error #1034: Type Coercion failed: cannot convert org.flintparticles.twoD.particles::Particle2D@37fc30e1 to org.flintparticles.common.initializers.Initializer.
at classes::Main/doExplosion()


I can't seem to figure out how to make use of createParticle2DFromDisplayObject.

Thanks for your help. ]]>
Image explosion with symbol on stage http://flintparticles.org/forum/comments.php?DiscussionID=155&Focus=626#Comment_626 http://flintparticles.org/forum/comments.php?DiscussionID=155&Focus=626#Comment_626 Thu, 15 Jan 2009 08:03:45 +0000 Richard
var particle = Particle2DUtils.createParticle2DFromDisplayObject(sprite,renderer,emitter.particleFactory);
emitter.addExistingParticles( [particle] );


if you want to apply your emitter's initializers to the particle, change the second line of code to

emitter.addExistingParticles( [particle], true ); ]]>