User Guide
General coding conventions 81
Use the following suffixes with component instances. These suffixes do not generate code
completion in the Actions panel. However, using suffixes encourages consistency in ActionScript
that might be shared among developers.
Spacing and readability
Use spaces, line breaks, and tab indents to increase the readability of your code. Readability
increases by showing the code hierarchy, which you can emphasize with spacing. Spacing and
code readability are important because they make ActionScript easier to understand. This is
important for students learning ActionScript as well as experienced users working on complex
projects. Legibility is important when you are debugging ActionScript, because it is much easier
to spot errors when code is formatted correctly and properly spaced.
Put one blank line in between paragraphs of ActionScript Paragraphs of ActionScript are
groups of logically related code. By breaking the code into modules, it helps users reading the
ActionScript understand its logic. For more information on spacing in classes and statements, see
“Wrapping lines of code” on page 103.
Object Suffix
Accordion _acc
Alert _alert
Button _button
CheckBox _ch
ComboBox _cb
DataGrid _dg
DateChooser _dc
DateField _df
Label _label
List _list
Loader _ldr
Menu _menu
MenuBar _mb
NumericStepper _nstep
ProgressBar _pb
RadioButton _rb
ScrollPane _sp
TextArea _ta
TextInput _ti
Tree _tr
Window _win