beautypg.com

Adobe Flash Professional CC 2014 v.13.0 User Manual

Page 930

background image

2. Select Rename Project from the Options pop-up menu.

3. Enter a new name and click OK.

Display only a single project subdirectory in the Project panel

When dealing with large projects, you can reduce clutter in the Project panel by only showing files in a specific directory. This is called pinning the
directory.

1. Select the directory you would like to pin.

2. Click the Pin Directory button.

The Pin Directory button changes to the Unpin Directory button, and the selected directory appears at the root of the project listing.

To pin a different directory, un-pin the current pinned directory first.

Locations and the classes folder (and their subdirectories) can also be pinned. When a location or the classes folder (or subfolder) is pinned, the
classes folder is not visible.

Create ActionScript classes

The Project panel supports creating template-based ActionScript classes within an ActionScript package structure. Use the Create Class button to
add class files to specified packages. ActionScript 3.0 and ActionScript 2.0 templates are supported. You specify the class templates to use in the
Panel Preferences.

Use the Panel Preferences to specify options for classes. If you specify a folder in the Save Classes In text box in the Classes tab of the Panel
preferences, the Project panel shows that folder in the project directory with a <> symbol to indicate that it is the default location for new classes.
Flash Professional adds this folder to the class path when publishing via the Project panel.

This class path folder can reside in a subdirectory of your project folder, in a directory relative to your project folder, or anywhere on your
computer. You can set the class path globally in the Panel Preferences, or per project in the Project Properties. By default, all class packages are
stored in the root folder of your project.

The classes folder visibility can be toggled in the Project Panel Preferences > Settings tab.

To create an ActionScript class:

1. Click the Create Class button at the bottom of the Project panel.

2. Enter the package (directory) path of your class.

3. Select Bind Class to Library Symbol to create a movie clip in your library (in the same folder structure as your package path). To bind to an

existing movie clip, select a movie clip in the library, and select Use Selected Library Symbol in the Create Class dialog box. Flash moves
the movie clip to the appropriate location in the library, and updates its symbol linkage to reflect the new class.

4. Select Declare Stage Instances to add variable declarations and import statements to the new class file to account for all of the named

instances on the timeline of the selected movie clip.

5. Select Open File After Creation to open your class file for editing after it is created.

6. Click Create Class.

The Project panel creates the class file based on the class template, and places it in the appropriate package directory, creating directories if
necessary.

Clicking the Create Class button does not overwrite class files. If the file exists, it does not create a new file. This can be useful if you would like to
bind an existing class to a movie clip, move the movie clip into the appropriate library folder, and set the appropriate linkages.

Create class templates

The Project panel supports a simple template structure, used when creating class files. This system is composed of four files. All the base files are
located in the Flash Configuration folder, in the /Project/templates/ subdirectory.

The four files are:

1. boundClass_as2.as

2. boundClass_as3.as

3. standardClass_as2.as

4. standardClass_as3.as

Each of these template files has custom template tags that are replaced with dynamic data when a new class is created. You can place these tags
anywhere in your class template file.

The following are the tags included in each file:

All classes:

%PACKAGE_NAME%

%CLASS_NAME%

923