Flint Particle System Forum - Explode Image Example - image size?2011-12-13T13:20:26+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Explode Image Example - image size?http://flintparticles.org/forum/comments.php?DiscussionID=306&Focus=1060#Comment_10602010-01-22T12:16:57+00:002011-12-13T13:20:26+00:00jonniehttp://flintparticles.org/forum/account.php?u=308
Hello everybody! First of all, I'd like to thank Richard Lord for such an amazing bit of work creating the Flint particle system - I'm expecting it to come in very handy for my current ...
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_10612010-01-22T14:31:33+00:002011-12-13T13:20:26+00:00jonniehttp://flintparticles.org/forum/account.php?u=308
Okay I sorted the image size by just adjusting it in Photoshop.
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 ...
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_10702010-01-25T08:02:03+00:002011-12-13T13:20:26+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi Jonnie
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 ...
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_10782010-01-27T11:49:46+00:002011-12-13T13:20:26+00:00jonniehttp://flintparticles.org/forum/account.php?u=308
Thanks a lot for your reply.
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 ...
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_10972010-02-09T13:51:37+00:002011-12-13T13:20:26+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Yes, by using something like the MouseGravity action.
MouseGravity action.]]>