25 July 2010
When you choose ActionScript 3 in the file publish settings of Adobe Flash Professional, you can declare a class that is a top-level class associated with a SWF file. This class is called the document class. When Flash Player loads the SWF file, an instance of this class is created to be the SWF file's top-level object at runtime. This object of a SWF file can be an instance of any custom class you choose to create or specify.
For example, a SWF file that implements an animation component can associate its top level with an Animation class, with methods and properties appropriate to an animation component. When the SWF is loaded, Flash Player creates an instance of this Animation class.

To enter the filename of the ActionScript file for the class in the Document Class field, use the Property inspector. Enter the file's name, but do not include the .as file extension.
Note: Alternatively, you can enter Document Class information in the Publish Settings to include it in the publish profile.
To learn more, see the section titled Declare an ActionScript 3 document class in the Flash documentation.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License