Source : Better Flash 10 3D interaction : ArcBall

With the addition of the 2.5d API in Flash 10, lot's of developers now have even easier access to basic 2.5D environments. But with those new capabilities and API's new challenges for developers arise. Famously, Flash 10 doesn't do the Z-Sorting natively. When Lee Brimelow asked me if I could send him an easy solution for that, I sent him the SimpleZSorter. Which he in turn used to paste my profile picture on as much as possible planes, but more significantly, use for this tutorial.
Althought the name Simple would imply something a bit away from a PerfectZSorter (which, technically, has some challenges considering the 2.5D API and the player performance, don't ask), the thing which astounded me was the amount of feedback. Sure, more people had asked me for such a solution and this simple little tool did it for them most of the time.
But considering the simplicity of the SimpleZSorter and the amount of feedback I got on it (even if I didn't publish on it myself) made clear that although the 2.5D API of Flash 10 opened up loads of opportunities for developers and designers a like, some of the simpler issues aren't addressed by it, whist there is clearly a need for it. That need can be addressed and with this post I'm hoping to do a another small part.
The ArcBall
One of the questions which people have been asking me about for in relation to using the 2.5D API, is (loosely combined) "How do I rotate things in 3D correctly with the mouse".As this question came more and more, I've also realized how fundamental this is to our community. With Flash 10 we have native realtime (2.5D) 3D, but with realtime comes interactivity. And what use is it for users to have a 3D interface, while the controls are not intuitive ? At that point 3D becomes a worse experience, rather then a better. While this solution won't address every issue with that, it most certainly addresses one, 3D rotation dragging.


















