Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

    • CommentAuthorcosinus
    • CommentTimeNov 10th 2009
     
    var emitter:Emitter2D = new Emitter2D();
    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()
    • CommentAuthorcosinus
    • CommentTimeNov 10th 2009
     
    Founded it !
    var renderer:BitmapRenderer = new BitmapRenderer(new Rectangle(0, 0, 600, 400));

    etc...

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

    etc....
    • CommentAuthorWolv3r
    • CommentTimeJun 21st 2012
     
    Hello I got a problem with my Bitmaps.

    Is there a way to use Bitmaps as particles while using DisplayObjectRenderer?

    Cause I can't use the BitmapRenderer, cause of many circumstances.
    • CommentAuthorWolv3r
    • CommentTimeJun 21st 2012
     
    Okay, solved the problem.

    I created my own DisplayObject Class with bitmapFill.