Flint Particle System Forum - Bitmap Logo Tween Sun, 11 Dec 2011 03:55:45 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1268#Comment_1268 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1268#Comment_1268 Mon, 26 Jul 2010 15:43:16 +0100 Turic import org.flintparticles.common.actions.Age;
import org.flintparticles.common.counters.Blast;
import org.flintparticles.common.energyEasing.Quadratic;
import org.flintparticles.common.events.ParticleEvent;
import org.flintparticles.common.initializers.ColorInit;
import org.flintparticles.common.initializers.Lifetime;
import org.flintparticles.twoD.actions.TweenToZone;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.Position;
import org.flintparticles.twoD.particles.Particle2D;
import org.flintparticles.twoD.renderers.PixelRenderer;
import org.flintparticles.twoD.zones.BitmapDataZone;

import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.particles.Particle2DUtils;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.zones.RectangleZone;

var flintImage:BitmapData = new FlintImage( 320, 80 );
var particlesImage:BitmapData = new FlintImage( 320, 80 );

var startEmitter:Emitter2D = new Emitter2D();
var particles:Array = Particle2DUtils.createPixelParticlesFromBitmapData( new FlintImage(337,225), startEmitter.particleFactory, 50, 75 );
startEmitter.addExistingParticles( particles, true );

startEmitter.counter = new Blast( 5000 );
startEmitter.addInitializer( new Lifetime( 10 ) );
startEmitter.addInitializer( new Position( new BitmapDataZone( flintImage, 40, 60 ) ) );
startEmitter.addAction( new Age( Quadratic.easeInOut ) );
startEmitter.addAction( new TweenToZone( new BitmapDataZone( particlesImage, 40, 60 ) ) );

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

startEmitter.start();

I'm try to make animated logo, like at example, but add the color of the logo and transform of color clother to a destination object.
This code is work, but logo is going to be only black and white, what is need to be added to code? ]]>
Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1272#Comment_1272 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1272#Comment_1272 Tue, 27 Jul 2010 08:09:09 +0100 Richard ColorChange action to the emitter. For example

startEmitter.addAction( new ColorChange( 0xFFFF6600, 0xFF0000FF ) ); ]]>
Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1273#Comment_1273 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1273#Comment_1273 Tue, 27 Jul 2010 08:24:40 +0100 Turic
But color change is give only 2 colors, i want to make full-colors particle change, try to illustrate idea at image:

http://ib1.keep4u.ru/b/2010/07/27/9a/9aee382aa648cb84fa15214d2aa3e60a.jpg ]]>
Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1274#Comment_1274 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1274#Comment_1274 Wed, 28 Jul 2010 07:33:07 +0100 Richard Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1275#Comment_1275 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1275#Comment_1275 Wed, 28 Jul 2010 09:32:57 +0100 Turic Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1280#Comment_1280 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1280#Comment_1280 Tue, 03 Aug 2010 08:12:01 +0100 Richard
Ryan Hodson wrote an article which contains some examples of custom actions and initializers at http://slekx.com/2009/12/flinteroids-advanced-flint-tutorial/. ]]>
Bitmap Logo Tween http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1282#Comment_1282 http://flintparticles.org/forum/comments.php?DiscussionID=377&Focus=1282#Comment_1282 Wed, 04 Aug 2010 07:22:28 +0100 Turic