Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.


Flash Source Files

3D Spinning Earth

Posted October 17, 2008 by senocular

Version: Flash CS4

Here the enhanced drawing API of Flash Player 10 is used to create a 3D spinning globe (earth). All of the 3D coordinates are generated dynamically at run time with a mapped graphic defined using UVT. The Matrix3D class is used to apply a rotation and Utils3D.projectVectors is used to convert 3D points into the 2D points that get drawn to the screen (as well as define T for bitmap distortion). Combine that with some objects in an IGraphicsData using culling to manage the 2 different sides of the globe and you get this. Press and hold the left mouse button and you will be able to see the geometry.

If you just want to see the ActionScript, click here.