Flint Particle System Forum - Trouble fading rectangleParticles on DisplayObjectRenderer2011-12-13T08:13:20+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Trouble fading rectangleParticles on DisplayObjectRendererhttp://flintparticles.org/forum/comments.php?DiscussionID=355&Focus=1197#Comment_11972010-05-12T10:45:42+01:002010-05-12T11:23:52+01:00jmp909http://flintparticles.org/forum/account.php?u=365
Hi
I'm trying to explode a bitmap, with a fade on the particles. With my code below if i uncomment the Age and the Fade my particles don't show at all. What I want to do is have the particles ...
I'm trying to explode a bitmap, with a fade on the particles. With my code below if i uncomment the Age and the Fade my particles don't show at all. What I want to do is have the particles begin to fade out as they reach a certain radius from the explosion centre.
Separately to this instead of using actual chunks of the bitmap I'd like to use, for example, 3x3 square particles that use getPixel on the image to get various colours from the image, and also add a blur/glow to that particle. (like this which currently doesn't use Flint.. http://www.brahm.com/download/test/box2d/test1/)
Any help on both of these would be much appreciated
regards J
---
public function explode(actor:Actor) { renderer = new BitmapRenderer(new Rectangle( 0, 0, 320, 480 ) ); addChild( renderer );
var emitter:Emitter2D = new Emitter2D(); var BMPReference:Class = getDefinitionByName("FruitIcon1") as Class; var bounds:Rectangle = actor.skin.getBounds(actor.skin.parent); var bd:BitmapData = new BitmapData(bounds.width*actor.skin.scaleX, bounds.height*actor.skin.scaleY, true, 0x00000000); var m:Matrix = actor.skin.transform.matrix.clone(); m.tx = -bounds.x*actor.skin.scaleX; m.ty = -bounds.y*actor.skin.scaleY; bd.draw(actor.skin, m); var bitmap:Bitmap = new Bitmap(bd, "auto", false);
}]]>
Trouble fading rectangleParticles on DisplayObjectRendererhttp://flintparticles.org/forum/comments.php?DiscussionID=355&Focus=1210#Comment_12102010-05-19T07:46:27+01:002011-12-13T08:13:20+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
I don't know why removing the fade action causes the particles to not appear. I can't see anything in your code that should cause that. The Fade action forces the alpha of the particles to the ...
For the blurred particle, you probably want a variant on the createRectangleParticlesFromBitmapData() method. You could just add a blur filter when creating the particles, or maybe something else.]]>