BIT-101 Particle class in AS3

January 12th 2009 in Actionscript Classes, BIT 101 Particle Class, Laboratory

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

When I lived in AS2land I was extremely fond of Keith Peter’s Particle class. It was so easy to implement and get things moving. It helped me build sweet node movement in Call and Response and mock up various other interfaces requiring physics engines. His class was simple but performed many cool particle animations with minimal effort and thus low cpu intensity. Moving to AS3 I’ve tried various other particle classes such as Flint . I really dig Flint but it’s a tad bulky for rapid prototyping or those situations where you don’t need a heavy class. Therefore, I’ve rewritten Keiths partcle class ported from AS2 to AS3. I saw that Eric had tried to rewrite it but had some errors. Enjoy, and thanks Keith.

Source: particleBIT101.zip

Permalink: http://www.christeso.com/index.php/lab/bit-101-particle-class-in-as3

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Print

2 comments to...
“BIT-101 Particle class in AS3”
Avatar
Jon

I’m so glad you re-wrote this in as3. I’m having one issue though. If I set edgeBehavior to “remove” I get the following error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

The removeChild is causing the error, but I’m not sure how to fix it. Any ideas?

Jon’s last blog post..Random Content Generator – A jQuery Plugin Featuring Chuck Norris


[...] Par contre ce tutoriel se fera en AS3. Un portage par Eric Dolecki de la classe en AS3 est disponible ici : http://www.christeso.com/index.php/lab/bit-101-particle-class-in-as3/ [...]




required



required - won't be displayed


Your Comment:

CommentLuv Enabled

Twitter Users!
Enter your personal information in the form or sign in with your Twitter account by clicking the button below.

AS3 Polar Coordinates and Radians

Many times I’ve set up interfaces where I need to place different objects equidistant around a central object. The solution to this problem is to first calculate the angle of each object by converting Radians to Degrees. This can be expressed by the following formula

So, you simply need to loop through your collection [...]

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Print
AS3 Polar Coordinates and RadiansPrevious Entry

Motion Detection and Typography

Lab

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Print
Motion Detection and TypographyNext Entry