Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
How do I?: How do you use multiple images for particles in a single emitter?
Bottom of Page1 to 2 of 2
-
- CommentAuthorevo
- CommentTimeJan 4th 2012
Something like using a movieclip as the ImageClass and having the emitter randomly choose a frame to use as the particle?
I have tried using SharedImages, creating an array and adding the individual graphics to it, but it was resulting in the following error and didn't appear to be behaving properly:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at org.flintparticles.twoD.renderers::DisplayObjectRenderer/removeParticle()[C:\Users\Admin\Desktop\GAME\Utils\org\flintparticles\twoD\renderers\DisplayObjectRenderer.as:108]
at org.flintparticles.common.renderers::SpriteRendererBase/particleRemoved()[C:\Users\Admin\Desktop\GAME\Utils\org\flintparticles\common\renderers\SpriteRendererBase.as:160]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.flintparticles.common.emitters::Emitter/update()[C:\Users\Admin\Desktop\GAME\Utils\org\flintparticles\common\emitters\Emitter.as:915]
at org.flintparticles.common.emitters::Emitter/updateEventListener()[C:\Users\Admin\Desktop\GAME\Utils\org\flintparticles\common\emitters\Emitter.as:846]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at org.flintparticles.common.utils::FrameUpdater/frameUpdate()[C:\Users\Admin\Desktop\GAME\Utils\org\flintparticles\common\utils\FrameUpdater.as:101]
Cannot display source code at this location.
I guess a simpler request would be for an example of a working emitter that randomly uses multiple images for particles.
Thanks! -
- CommentAuthorRichard
- CommentTimeJan 8th 2012 edited
If you're using the DisplayObjectRenderer, you need to use the ImageClasses initializer rather than the SharedImages initializer.
1 to 2 of 2
