beautypg.com

Actionscript publish settings (cs5.5), Actionscript publish settings – Adobe Flash Professional CC 2014 v.13.0 User Manual

Page 635

background image

ActionScript publish settings

To the top

To the top

To the top

Modify ActionScript publish settings
Class files and configuration files
Declare an ActionScript 3.0 document class
Set the location of ActionScript files
Compiling ActionScript conditionally
Customizing context menus in Flash documents (CS5.5)
Configuration folders installed with Flash (CS5.5)

Modify ActionScript publish settings

When you create a new FLA document, Flash asks you which version of ActionScript you want to use. You can change this setting if you decide
later to write your scripts in a different version of ActionScript.

Note: ActionScript 3.0 is not compatible with ActionScript 2.0. The ActionScript 2.0 compiler can compile all ActionScript 1.0 code, except for the
slash (/) syntax used to indicate movie clip paths (for example, parentClip/testMC:varName= "hello world"). To avoid this problem, either rewrite
your code using dot (.) notation, or select the ActionScript 1.0 compiler.

1. Select File > Publish Settings.

2. Select the ActionScript version from the Script menu.

Class files and configuration files

When you install Flash Professional, several ActionScript-related configuration folders and files are placed on your system. If you modify these
files to customize the authoring environment, back up the original files.

ActionScript classes folder Contains all of the built-in ActionScript 2.0 classes (AS files). Typical paths to this folder are as follows:

Windows 7 and 8: Hard Disk\Program Files\Adobe\Adobe Flash CC\Common\Configuration\ActionScript 3.0\Configuration\Classes

Macintosh: Hard Disk/Users/user/Library/Application Support/Adobe/Flash CC/language/Configuration/Classes

The Classes folder is organized into classes for Flash Player 10 and classes for Flash Player 11. For more information on the organization of
this directory, see the Read Me file in the Classes folder.

Include class folder Contains all of the global ActionScript include files. Locations are as follows:

Windows 7 and 8: Hard Disk\Program Files\Adobe\Adobe Flash CC\Common\Configuration\ActionScript 3.0\libs\

Macintosh: Hard Disk/Users/user/Library/Application Support/Adobe/Flash CC/language/Configuration/Include

ActionsPanel.xml configuration file Includes the configuration file for ActionScript code hinting. Separate files provide configuration for each
version of ActionScript and Flash Lite, and for JavaScript. Locations are as follows:

Windows 7 and 8: Hard Disk\Program Files\Adobe\Adobe Flash CC\Common\Configuration\ActionScript 3.0\libs\

Macintosh: Hard Disk/Users/user/Library/Application Support/Adobe/Flash CC/language/Configuration/ActionsPanel

AsColorSyntax.xml configuration file The configuration file for ActionScript code color syntax highlighting. Locations are as follows:

Windows 7 and 8: Hard Disk\Program Files\Adobe\Adobe Flash CC\Common\Configuration\ActionScript 3.0\libs\

Macintosh: Hard Disk/Users/user/Library/Application Support/Adobe/Flash CC/language/Configuration/ActionsPanel

Declare an ActionScript 3.0 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 an instance of this Calendar class.

1. Deselect all objects on the Stage and in the Timeline by clicking a blank area of the Stage. This displays the Document properties in the

Property inspector.

2. Enter the filename of the ActionScript file for the class in the Document Class text box in the Property inspector. Do not include the .as

628