Include one documentation comment per class, interface, or member, and place it directly
before the declaration. If you have additional information to document that does not fit into
the documentation comments, use implementation comments (in the format of block
comments or single-line comments). Implementation comments directly follow the
declaration.
The two kinds of comments use slightly different delimiters. Documentation comments are
delimited with
and
/**
Don't include comments that do not directly relate to the class being read. For example,
do not include comments that describe the corresponding package.
You can also use single-line comments, block comments, and trailing comments in class files.
For more information on these kinds of comments, see the following sections:
"Single-line comments" on page 132
"Multiline comments" on page 133
"Trailing comments" on page 134
About constants and keywords
Constants and keywords are the backbone of ActionScript syntax. Constants are properties
with a fixed value that cannot be altered, so they are values that don't change throughout
an application.
Flash includes several predefined constants, which can help simplify application development.
An example of constants can be found in the Key class, which includes many properties, such
as
or
Key.ENTER
Key.PGDN
code values for the Enter and Page Down keys are 13 and 34. Using constant values not only
makes development and debugging easier, but it also makes your code easier to read by your
fellow developers.
Keywords in ActionScript are used to perform specific kinds of actions. They are also reserved
words because of this, so you can't use them as identifiers (such as variable, function, or label
names). Examples of some reserved keywords are
For more information on constants and keywords, see the following topics:
"Using constants" on page 136
"About keywords" on page 138
"About reserved words" on page 139
, and implementation comments are delimited with
*/
. If you rely on constants, you never have to remember that the key
,
,
,
if
else
this
function
About constants and keywords
and
.
/*
*/
, and
.
return
135
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?