Flint Particle System Forum - use bitmap as particle Sun, 26 Dec 2010 17:21:30 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher use bitmap as particle http://flintparticles.org/forum/comments.php?DiscussionID=271&Focus=966#Comment_966 http://flintparticles.org/forum/comments.php?DiscussionID=271&Focus=966#Comment_966 Tue, 10 Nov 2009 08:56:42 +0000 cosinus var renderer:DisplayObjectRenderer = new DisplayObjectRenderer();
addChild( renderer );

renderer.addEmitter( emitter );
emitter.counter = new Steady( 100 );
var imgClass:ImageClass = new ImageClass( MyBall , 10, 10 ); // MyBall is exported class of ball.png


emitter.addInitializer( imgClass );
emitter.addInitializer( new Position( new LineZone( new Point( -5, -5 ), new Point( 505, -5 ) ) ) );
emitter.addInitializer( new Velocity( new PointZone( new Point( 0, 65 ) ) ) );

emitter.addAction( new Move() );
TypeError: Error #1034: Type Coercion failed: cannot convert MyBall@10906281 to flash.display.DisplayObject.
at org.flintparticles.twoD.renderers::DisplayObjectRenderer/addParticle() ]]>
use bitmap as particle http://flintparticles.org/forum/comments.php?DiscussionID=271&Focus=967#Comment_967 http://flintparticles.org/forum/comments.php?DiscussionID=271&Focus=967#Comment_967 Tue, 10 Nov 2009 11:37:36 +0000 cosinus var renderer:BitmapRenderer = new BitmapRenderer(new Rectangle(0, 0, 600, 400));

etc...

emitter.addInitializer(new SharedImage(new Bitmap(new MyBall(20,32))));

etc.... ]]>