CHAPTER 1
2
between operating systems and developer environments. Flash Builder and FDT (code editors for both
Mac and Windows) both offer SVN client functionality through plug-ins, while other editors might not. If
your editor of choice doesn’t offer a built-in SVN client, TortoiseSVN for Windows and SyncroSVN or
Versions for Mac OS X are good alternatives.
When downloading the Away3D library, it is important to choose the correct source files for your needs.
There are currently two versions, one for use with Flash Player 9 and the other with Flash Player 10.
Before downloading anything, you need to make a decision about the version of Flash you will be using.
The minor differences in terms of functionality between the two libraries may impact your decision, but
attempting to compile Away3D source code for the wrong player will result in compile time errors. The ZIP
file download has two clearly labeled links, one for Flash 9 and the other for Flash 10. When downloading
from the SVN repository, there are two directories to choose from in the trunk: fp9 and fp10.
Regardless of which SVN client you use, please refer to its manual for how to use the checkout URL
supplied on the Google Code project page to retrieve the project source files. If you’re not familiar with
SVN and code repositories, you should stick with the release download from www.away3d.com. Once
you’re feeling more confident, it’s a simple matter to switch to the latest SVN release if you want to try that.
Setting up a project
After the source files have been downloaded onto your hard drive, you need to set up your tool chain to
work with Away3D. The general idea is to make the tools aware of where the Away3D library files are
located, but the exact procedure differs from editor to editor.
Using Adobe Flash CS4/CS5
The Adobe Flash Professional IDE is very simple in the sense that it has no real concept of projects or
linking between projects. Hence, setting up a project for use with Away3D consists of telling the IDE where
the Away3D source folder is located on the file system by including it in the class path list. When
publishing a SWF from Flash CS4, the directory that the FLA file is located in is used as the default class
path. By simply putting the contents of the src folder from the Away3D distribution files in the same
directory, the library will be made available for use in Flash.
An arguably better setup is to download the library, place it in a sensible location somewhere on your hard
drive, and add that directory to the Flash class path list. Using this approach, the same installation of
Away3D will be made available to all your Flash CS4/CS5 projects, now and in the future.
From the Flash Preferences pane, select ActionScript in the list and open the ActionScript 3.0 Settings
(see Figure 1-1.) Click the folder icon in the Source Path section, and browse to the folder named src in
the Away3D distribution. Away3D will now be available to all Flash projects you create.