Flint Particle System Forum - Noob error Sun, 13 Jun 2010 07:57:07 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.4 & Feed Publisher Noob error http://flintparticles.org/forum/comments.php?DiscussionID=121&Focus=491#Comment_491 http://flintparticles.org/forum/comments.php?DiscussionID=121&Focus=491#Comment_491 Wed, 12 Nov 2008 16:57:04 +0000 psilos
my first attempt to create an emitter didn't work at all,

here is my code:

// PARTICLES SYSTEM
var particles:Particles = new Particles();
this._scene.addChild( particles );

var emitter:Emitter3D = new Whizzer( new LineZone( new Vector3D( -200, 0, 0 ), new Vector3D( 200, 0, 0) ) );
_flintRenderer = new PV3DParticleRenderer(particles);
_flintRenderer.addEmitter(emitter);
//emitter.addEventListener( ParticleEvent.PARTICLE_DEAD, whizzBang, false, 0, true );
//emitter.start();

And after running this I get the following error:

TypeError: Error #1034: Type Coercion failed: cannot convert org.flintparticles.common.displayObjects::Dot@1fe165f1 to org.papervision3d.core.geom.renderables.Particle.
at org.flintparticles.threeD.papervision3d::PV3DParticleRenderer/addParticle()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/threeD/papervision3d/PV3DParticleRenderer.as:112]
at org.flintparticles.common.renderers::RendererBase/particleAdded()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/renderers/RendererBase.as:91]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.flintparticles.common.emitters::Emitter/createParticle()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/emitters/Emitter.as:548]
at org.flintparticles.common.emitters::Emitter/update()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/emitters/Emitter.as:677]
at org.flintparticles.common.emitters::Emitter/updateEventListener()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/emitters/Emitter.as:642]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.flintparticles.common.utils::FrameUpdater/frameUpdate()[/Users/konstantinos/Documents/Flex Builder 3/FlintParticles/src/org/flintparticles/common/utils/FrameUpdater.as:88]

Any ideas, did I forget something obvious?

Thanks in advance. ]]>
Noob error http://flintparticles.org/forum/comments.php?DiscussionID=121&Focus=492#Comment_492 http://flintparticles.org/forum/comments.php?DiscussionID=121&Focus=492#Comment_492 Wed, 12 Nov 2008 17:37:21 +0000 psilos
changed

addInitializer( new SharedImage( new Dot( 4 ) ) );

to

addInitializer( new PV3DObjectClass ( Particle, new ParticleMaterial(0xFFFFFFFF, 0xFFFFFFFF, 1), 5, 5));

the same should be done on SphereBang as well.

Cheers ]]>