User Guide

74 Chapter 3: Using Best Practices
// or
mx.containers.TextInput
This convention uses a prefix of mx.containers.
If you create your own packages, use a consistent naming convention, such as starting with
com.macromedia.PackageName. Or, use a convention of naming your packages
com.yourcompany.PackageName.
A clear and self-explanatory package name is important because it explains the package’s
responsibilities. For example, you might have a package named
Shapes, which is responsible for
drawing various kinds of geometric shapes using the Flash drawing API; its name would be
com.macromedia.Shapes.
Interfaces
Interface names have an uppercase first letter, the same as class names. Interface names are usually
adjectives, such as
Printable. The following interface name, EmployeeRecords, uses an initial
uppercase letter and concatenated words with mixed case:
interface EmployeeRecords{}
Note: Some developers start interface names with an uppercase I to distinguish them from classes.
Components and linkage
Component names have an uppercase first letter, and any concatenated words are written in
mixed case. For example, the following default UI component set uses concatenated words and
mixed case:
CheckBox
ComboBox
DataGrid
DateChooser
DateField
MenuBar
NumericStepper
ProgressBar
RadioButton
ScrollPane
Te xt A re a
Te xt In p u t
Components not using concatenated words begin with an uppercase letter.
If you develop custom components, use a naming convention to prevent naming collisions with
Macromedia components. The names of your components must be different from those of the
default set that is included with Flash. Adopting your own consistent naming convention
prevents naming conflicts.