Adobe 38039336 - Flash CS3 Professional User Manual page 422

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

Declare a document class
When you use ActionScript 3.0, a SWF file may have a top-level class associated with it. This class is called the
document class. When the SWF is loaded by Flash Player, an instance of this class is created to be the SWF file's top-
level object. This object of a SWF file can be an instance of any custom class you choose.
For example, a SWF file that implements a calendar component can associate its top level with a Calendar class, with
methods and properties appropriate to a calendar component. When the SWF is loaded, Flash Player creates it as an
instance of this Calendar class.
Deselect all objects on the Stage and in the Timeline by clicking a blank area of the Stage. This displays the
1
Document properties in the Property inspector.
Enter the path and filename of the ActionScript file for the class in the Document Class text box in the Property
2
inspector.
Note: You can also enter the Document Class information in the Publish Settings dialog box.
Customizing context menus in Flash documents
You can customize the standard context menu and the text-editing context menu that appears with SWF files in Flash
Player 7 and later.
• The standard context menu appears when a user right-clicks (Windows) or Control-clicks (Macintosh) on a SWF
file in Flash Player, in any area except an editable text field. You can add custom items to the menu, and hide any
built-in items in the menu except Settings and Debugger.
• The editing context menu appears when a user right-clicks (Windows) or Control-clicks (Macintosh) in an
editable text field in a SWF file in Flash Player. You can add custom items to this menu. You cannot hide any
built-in items.
Note: Flash Player also displays an error context menu when a user right-clicks (Windows) or Control-clicks
(Macintosh) in Flash Player and no SWF file is loaded. You cannot customize this menu.
Customize context menus in Flash Player 7 by using the ContextMenu and ContextMenuItem objects in Action-
Script 2.0. For more information on using these objects, see
Reference.
Remember the following conditions when creating custom context menu items for Flash Player:
• Custom items are added to a context menu in the order in which they are created. You cannot modify this order
after the items are created.
• You can specify the visibility and enabling of custom items.
• Custom context menu items are automatically encoded using Unicode UTF-8 text encoding.
Class files and configuration files
When you install Flash, several ActionScript-related configuration folders and files are placed on your system. If you
modify these files to configure the authoring environment, back up the original files.
ActionScript classes folder
are as follows:
• Windows: Hard Disk\Documents and Settings\user\Local Settings\Application Data\Adobe\Flash
CS3\language\Configuration\Classes
Contains all of the built-in ActionScript 2.0 classes (AS files). Typical paths to this folder
in the ActionScript 2.0 Language
ContextMenu
FLASH CS3
416
User Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents