Flint Particle System Forum - Dissolving an Image Thu, 23 Jun 2011 16:36:09 +0100 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=666#Comment_666 http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=666#Comment_666 Wed, 04 Feb 2009 14:06:37 +0000 chien
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 http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=667#Comment_667 Wed, 04 Feb 2009 22:25:46 +0000 chien
chien ]]>
Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=668#Comment_668 http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=668#Comment_668 Thu, 05 Feb 2009 16:06:13 +0000 chien
chien ]]>
Dissolving an Image http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=670#Comment_670 http://flintparticles.org/forum/comments.php?DiscussionID=166&Focus=670#Comment_670 Mon, 09 Feb 2009 20:16:20 +0000 Richard