Your Balls Weren’t *That* Great Anyway…
…confessed Serge. Unfortunately the setting was not in a specialist Amsterdam nightclub, rather, at the SAP Lounge in Brussels. After an insane month working as a consultant at thesedays, I had only one day to prepare two sessions for the Adobe
Beyond Boundaries event in Amsterdam and Brussels. My topic was “introduction to AS3 for designer types”, and as conversion bait, I did some benchmarking between flashplayer9 (as3) and fp8 (as1/2). I ran and timed some loops (files : as2 as3), with fairly predictable results. Well, I was positively surprised by 5 secs for 1 billion loops in as3 :eek:.
I also wanted to showcase the speed increases for rendering graphics. I was hellbent on creating a cheap version of the Sony Bravia Bouncing balls commercial, in as2 and 3, then woo the crowd with flashplayer9 pwning and humiliating its older counterpart. Unsurprisingly, I didn’t finish the as2 version for Amsterdam, so, during my lunch break in Brussels I hacked it together. To my disbelief they both performed more or less equally?! Right then, my moment of bewilderment was broken by the entrance of Danny Dura, “right on time” I thought to myself. Danny quickly suggested I flag useBitmapCache, and use Shapes instead of Sprites, but to no avail. At this point Serge joined the conversation, suggested I save this nutcracker for later and showcase teh 1337N355 of AS3 with the famous papervision x-wing fighter demos. This is the point where, (within the hearing distance of a number of suit&ties from some other conference) Serge announced this blogposts title
Joking aside, wtf? I’ve uploaded the two files, feel free to test:
(and yes, they are different files, for proof just let yourself be knocked out by the beauty of the as3 button component over it’s dinosauring sibling)
At 4000 balls, the as2 version runs at times faster than as3!!!??
Any ideas? Is it rendering? The code is pretty much identical… If you are motivated, you can even look at it:
ze zip
Oh yeah, not worth it’s own blog entry, here’s my “quick app tutorial” used in my presentations, showing some basic tasks and how they are done with AS3:
HOTT Jean Claude Dance AXXXion


October 25th, 2007 at 9:17 pm
Sak, you rock! :-)