742
Best Practices and Coding Conventions for ActionScript 2.0
Naming custom components
Component names have an uppercase first letter, and any concatenated words are written in
mixed case. For example, the following default user-interface component set uses
concatenated words and mixed case:
■
CheckBox
■
ComboBox
■
DataGrid
■
DateChooser
■
DateField
■
MenuBar
■
NumericStepper
■
ProgressBar
■
RadioButton
■
ScrollPane
■
TextArea
■
TextInput
Components that do not use concatenated words begin with an uppercase letter.
If you develop custom components, use a naming convention to prevent naming
incompatibilities with Macromedia components. The names of your components must be
different from those of the default set that is included with Flash. If you adopt your own
consistent naming convention, it helps you prevent naming conflicts.
Remember that the naming conventions in this section are guidelines. It is most important to
use a naming scheme that works well for you and to use it consistently.
Using comments in your code
This section describes how to use comments in your code. Comments document the decisions
you make in the code, answering both
how
and
why
. For example, you might describe a work-
around in comments. Another developer would be able to find the related code easily for
updating or fixing. And finally, the issue might be addressed in a future version of Flash or
Flash Player, hence the work-around would no longer be necessary.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...