That aside, very neat. Yet more motivation to learn d3.
1) He could have done it with less lines of code.
2) He could have done it with smoother animations and could have added more interactivity.
I'm not bashing the author, just suggesting a viable alternative.
Unfortunately, the unwanted HTML5 hype is just killing the platform. And the platform (I personally believe) is in the wrong hands, because they haven't marketed it well (IMO).
Flash does one of those, and for the same reasons as HTML5 solutions, its speed depends heavily on the code backing the drawing and how much data is displayed. Why do I want Flash again?
And this is why your comparison is apples to oranges, at best.
I know about the movie clip system and don't deny what you claim. But now you're moving the goalposts as decoupling the elements from the Flash environment requires you to do more, well, hand coding. To do what you claim -- implement the same features with less code -- would require more handiwork inside the Flash authoring tool, which was never really a fun workflow even when Flash was more ubiquitous.
In any case, lowering the code count by relying on MovieClips, which as you say are basically libraries, hardly seems fair. I'm sure all the code in the OP could be reduced to about five lines, three of them being calls to external code and CSS files.
Dude, you serious? I can build you something similar in just 5 mins with 0 lines of code with easier maintainability and no calls to external CSS or Code.
>which was never really a fun workflow
I am surprised, because it was one of the most powerful features of flash, just like layers were for Photoshop. Maybe it's a personal opinion, but I loved this workflow personally.
But what I argue is that this D3 implementation, because of its code structure, is easier to build upon with even more data and interactivity. I would bet that whatever it takes you to build in 5 minutes with 0 lines of code, will take up many, many multiple times of work to do even trivial changes. Sure, you'd win in the scenario in which only a simple animated globe is called for, but I don't think that's what most of the OP's audience cars about.
And I wonder if you can even claim to do what you want in such a short time...for the simple matter that doing is in the Flash designer environment requires a lot of point and click (for 180+ MovieClips).
I'd rather have a few more lines of code and more openness and portability.
This runs choppy on my old iPhone, but it doesn't make the page lag.
Flash often kills my browser and brings my entire system to a halt.
Sorry, but it's still buggy as all hell.
Yes HTML5 isn't a Flash replacement on it's own, but with the right tooling it's getting there: http://html.adobe.com/edge/animate/
The implementation is short enough to paste in this comment. I find d3.js almost magical. About the closest actionscript toolset would be prefuse flare. D3 was designed as a direct descendant and improvement to that generation of toolkits.
I know, it bothers me too.