Flint Particle System Forum - Explode Image Example - image size? Tue, 13 Dec 2011 13:45:15 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Explode Image Example - image size? http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1060#Comment_1060 http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1060#Comment_1060 Fri, 22 Jan 2010 12:16:57 +0000 jonnie
Now here's my problem...

I've been experimenting with the "Explode Image" example files, and I'm having a bit of trouble. In particular, it is this line of code that is stumping me:

var particles:Array = Particle2DUtils.createRectangleParticlesFromBitmapData( new Image1(384,255), 10, emitter.particleFactory, 56, 47 );

I have created my own Flash file which is almost identical to that of the example file, except for that it uses a different image. When I test the movie, the image that I have decided to use is massive, and some of it extends out of the visible stage area. I've tried re-sizing the image by changing the values of "Image1(384,255)" to something smaller, but it has no effect.

Am I just going to have to alter the size of the original image in Photoshop?

Thanks in advance. ]]>
Explode Image Example - image size? http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1061#Comment_1061 http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1061#Comment_1061 Fri, 22 Jan 2010 14:31:33 +0000 jonnie
Got a few other things that I'd be interested in knowing about though!

I'd like to add a gravitational and fade-to-alpha effect to the particles. I'd also be interested to know how easy it is to convert this code so that the image explodes when another particle makes contact with it or when a movie clip or cursor makes contact with it. I'm also going to want the image to be moving from the right side of the screen to the left - does this just involve placing it into an empty movie clip and then moving it in the timeline or is it a little more complicated than this?

Look forward to anything anyone has to say on the matter.

Thanks again :) ]]>
Explode Image Example - image size? http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1070#Comment_1070 http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1070#Comment_1070 Mon, 25 Jan 2010 08:02:03 +0000 Richard
The dimensions, 384, 255, are the size of the Bitmap asset in the library. They're not used to resize the image, but rather to tell flash how large the image is.

For your other questions, add additional Actions to the emitter to cause the particles to fade or behave in other ways. If you only want these to occur after the explosion, add them in the explode method. The explosion happens when the explode method is called. You can use any event to trigger this, and you can change the contents to set the x and y of the explosion to whatever values you want - the coordinates of another MovieClip, for example.

Richard ]]>
Explode Image Example - image size? http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1078#Comment_1078 http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1078#Comment_1078 Wed, 27 Jan 2010 11:49:46 +0000 jonnie
I've also been thinking about ways that this code could be manipulated to achieve other effects... Would it be possible that the fragments of the image could be sucked towards the cursor rather than blown apart on a mouse click?

By that I mean when the cursor gets within a certain distance of the image, the fragments start to become attracted to it?

Thanks again, Richard.

Jonnie. ]]>
Explode Image Example - image size? http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1097#Comment_1097 http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1097#Comment_1097 Tue, 09 Feb 2010 13:51:37 +0000 Richard MouseGravity action. ]]>