Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Wednesday, November 7, 2007

bit-101's AS2 particle class as AS3

Wednesday, November 7, 2007   



I have exhausted my limit of Googling for the time being looking for a decent AS3 Particle class that approaches the utility of Keith Peter's AS2 Particle class, but in AS3. Something without a whole huge bank of functionality, just a lot of the basics that Keith's AS2 version comes with.



I hope that someone else hasn't done this already, as its not too difficult but time consuming, I have begun to re-write that class in AS3 for use in AS3 projects.



If someone has, please leave a comment if its available. Its cool to convert some code sometimes, but its always better to get some code without having to do that. If not, I'll plug along and ask Keith if its okay to share it or not. Peace out.



Update:
I have rewritten the core Particle class and so far I haven't gotten any compiler errors or warnings. I tested wandering, but right now the .addRepelClip seems to be ignored. Other stuff seems to be working okay.

I could release the code right now, but I think I have a little more to do on it. You might consider converting it yourself... its a decent little excercise.

So it wasn't a huge deal converting the AS2 class to AS3, not nearly as bad as I was thinking that it would be. I had to use the stage's MOUSE_UP event for the onReleaseOutside, but other than that its gone pretty peachy. Once its up to snuff, I'll up the text file for ya (if anyone is interested).



Update 2:
I figured out the tiny little bug that was preventing the repelClips, etc. from working properly. I have the easy fix (found it one my class printout) and will test tomorrow AM and release it when I see it working properly. I plan on using it right away!
 
 Return to the main page
Comments:

There are currently 2 Comments:

Anonymous Anonymous said...
“Fabulous, if your able to share it I would be grateful. The original was one of my favorite particle systems.”
 
Blogger e.dolecki said...
November 7, 2007 6:54 PM
“I just need to change a few things and test it tomorrow AM. Then its AS3 BIT-101 Particle fun time!”
 
 Leave a comment