In this tutorial we build on the last example from our previous tutorial "Simple 3D Drawing in Flash CS3". We use the 3D engine we created there to build a collection of highly customizable 3D surfaces. We show on the next page how to begin by openning a file from the previous tutorial and adding examples to it. Then, in order to make our code easy to use and customize, we encapsulate the Timeline code in a custom AS3 class, SpinSurfaceBoard. The applet below highlights some of the customization tasks that can be easily accomplished using the class.
- Download all Flash CS3 'fla' files and AS3 'as' class file: surfaces.zip
The zip file contains all the source files related to this tutorial. The fla files are thoroughly commented so they should be easy to follow. The source files for the applet above are: surfaces_fin.fla and SpinSurfaceBoard.as. You have to put them in the same directory for the fla file to compile.
On page 2 and 3 of this tutorial, we show where to start, and explain steps necessary for writing an AS3 class that allows for creating a cutomizable applet like the one above as well as many other Flash movies involving 3D surfaces. We list methods and properties of the class. On pages 4 and 5, we show a couple of cute Flash applets created using our custom class and explain the code behind them.