home subscribe to email updates subscribe to RSS updates

Archive for January 25, 2007

ActionScript 3 - First Steps

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.

Michael Battle - ActionScript 3 Experiment - Particle Generator

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.

Read the rest of this entry »