Flint Particle System Forum - Dissolving an Image 2011-06-23T16:36:19+01:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=666#Comment_666 2009-02-04T14:06:37+00:00 2011-06-23T16:36:19+01:00 chien http://flintparticles.org/forum/account.php?u=41 I think this is something staring me in the face but I am not seeing it. I am trying to dissolve an image from left to right and have tried many approaches. It works well as doing the whole image ...
I am trying to dissolve an image from left to right and have tried many approaches. It works well as doing the whole image or part of the image but I can't seem to get it to work slowly going across the image.

current code fragment is below.

Any help would be appreciated.

Thanks

chien

import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.activities.*;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.particles.Particle2DUtils;
import org.flintparticles.twoD.renderers.*;
//import org.flintparticles.twoD.zones.RectangleZone;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.zones.*;

var emitter:Emitter2D = new Emitter2D();
var particles:Array = Particle2DUtils.createPixelParticlesFromBitmapData( new Image2(384,255), emitter.particleFactory, 50, 75);
emitter.addExistingParticles( particles, false );

var renderer:PixelRenderer = new PixelRenderer(new Rectangle( 0, 0, 500, 255 ));
renderer.addEmitter( emitter );
addChild( renderer );
emitter.start();


emitter.addAction (new ZonedAction(new Accelerate( 0, 5), new RectangleZone( 0, 0, 200, 400), false ));
emitter.addAction (new ZonedAction(new RandomDrift( 10, 40 ), new RectangleZone( 0, 0, 200, 400), false ));
//emitter.addActivity ( new MoveEmitter (100,0));
//emitter.addAction (new Accelerate( 0, 5));
//emitter.addAction( new RandomDrift( 10, 40 ) );
emitter.addAction( new Move() );
emitter.addAction( new DeathZone( new RectangleZone( 0, 0, 500, 255 ), true ) );]]>
Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=667#Comment_667 2009-02-04T22:25:46+00:00 2011-06-23T16:36:19+01:00 chien http://flintparticles.org/forum/account.php?u=41 Actually I just took a fresh look at this and it looks like a custom emitter that uses the set property of the rectangle zone may work. I'll try this the next opportunity I get and see it if works ...
chien]]>
Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=668#Comment_668 2009-02-05T16:06:13+00:00 2011-06-23T16:36:19+01:00 chien http://flintparticles.org/forum/account.php?u=41 Just for reference, if anyone else is trying this. My theory worked without requiring any customization of anything. This one little modification saved a HUGE amount of overhead (10s of megabytes) ...
chien]]>
Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=670#Comment_670 2009-02-09T20:16:20+00:00 2009-02-09T20:16:29+00:00 Richard http://flintparticles.org/forum/account.php?u=1 Hi chien. Sorry I wasn't around to help but I'm glad you worked it out. Nice solution.