AS2 Class Paths
A "classpath" is apath of directories that Flash will search for external AS files. If the class defined in your authoring environment by the import method is found within that path, Flash will successfully compile that class into the resulting .swf file.
An interesting point of note is that there are actually two classpaths in Flash. A global, overarching path, relative to the program's root, which applies to all documents. And a local, document-level path that can be defined for only the specific movie you're working on.
Where to define a "Global ClassPath"...
Edit > Preferences... > ActionScript (tab) > ActionScript 2.0 Settings...
Where to define a "Local ClassPath"...
File > Publish Settings> Flash (tab) > ActionScript version: Settings...
This came up for me when I was attempting to use xPath within Flash to aid in parsing an XML document. You simply import the class files and then access your XML nodes using xPath's handy expressions. This is all well and good, but the import command uses syntax that references a path, relative to the document in which it resides.. but now we know that it's really relative to the document-level classpath, and with a simple change to our publish settings, Flash can now find the AS files and all is well.




