Flint Particle System Forum - How can I use BitmapDataZone as a container for particles? Sun, 11 Dec 2011 11:19:12 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher How can I use BitmapDataZone as a container for particles? http://flintparticles.org/forum/comments.php?DiscussionID=478&Focus=1616#Comment_1616 http://flintparticles.org/forum/comments.php?DiscussionID=478&Focus=1616#Comment_1616 Mon, 25 Apr 2011 08:37:19 +0100 brian fidler http://pastebin.com/kUqpsfEV

However to create the "container" for my particles I'm just butted lines up against each other. I realize this isn't a very elegant solution, can I use BitmapDataZone to accomplish the same effect using the following bitmap and if so what would the code look like?

here is a link to the bitmap I am hoping to use.
http://www.brianfidler.com/atmi/container-2.png

thanks
brian ]]>
How can I use BitmapDataZone as a container for particles? http://flintparticles.org/forum/comments.php?DiscussionID=478&Focus=1618#Comment_1618 http://flintparticles.org/forum/comments.php?DiscussionID=478&Focus=1618#Comment_1618 Wed, 27 Apr 2011 08:28:08 +0100 Richard
emitter.addAction( new CollisionZone (new BitmapDataZone( bitmapData ), 100, -400 ) );

You could also use a MultiZone to combine all your line zones into a single zone.

var mz:MultiZone = new MultiZone();
mz.addZone (new LineZone( new Point( 100, -400 ), new Point( 100, -40 ) ) );
mz.addZone (new LineZone( new Point( 380, -400 ), new Point( 380, -40 ) ) );
...
emitter.addAction( new CollisionZone ( mz ) );


This won't affect the performance of your code at all, but you may prefer the concept of a single zone made from all the lines. ]]>