Last night I started my trip towards AS3 knighthood… and it was a little bumpy. I don’t know whether it was just me (quite likely) but it was much more of a mind-shift than I had anticipated.
I recently did a small job for an overseas client and they paid me in two ActionScript 3 books… I’ll post about these soon. Anyway, they arrived yesterday and I couldn’t put them down.

Amongst a myriad of small syntactic differences, the display list rendering and the new event management model took the longest to get used to (edit: actually, there’s a lot more to it, but that’s a good start). Although now that I ‘get it’ to this extent, I can see the promise of how much better the overall tool will be. What took me a few hours to sort out and debug is that simply calling removeChild() is not enough to remove the object from memory… after reading about it here, it turns out that one needs to listen out for the EVENT.REMOVED event! Needless to say, neither of my books mentioned this.
So - for nothing more than plain hard proof that I did actually manage to get something done, here is a dramatically simplified version of the particle generator that you’ve seen here and here.
Update: There is a now a more recent version of this experiement here.
Instructions
Click and drag… (Flash Player 9 required)
This is spitting out 5 dots per frame, working at 31 frames per second. From the reading I’ve been doing around the web, AS3 brings around a 10x speed increase. This seems to be pretty close to what we’re seeing above in comparison to the previous versions.
Update
The source code is now available for download here. I’ve put a few comments in there to make it a little more obvious as to what’s going on. Remember, I’m new to AS3 so if you see something that can be done better, please let me know.







