• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Preface > Typographical Conventions

Typographical Conventions

In order to indicate the various syntactic components of ActionScript, this book uses the following conventions:

Menu options

Menu options are shown using the character, such as File Open.

Constant width

Indicates code samples, clip instance names, frame labels, property names, and variable names. Variable names often end with the suffixes shown in Table 2-1 (such as _mc for variables that refer to movie clip instances). Although using these suffixes is considered the best practice, we sometimes avoided them when we found they made the surrounding text substantially more difficult to read. For brevity, therefore, the preferred suffixes have sometimes been omitted.


Indicates function names, method names, class names, layer names, URLs, filenames, and file suffixes such as .swf. In addition to being italicized, method and function names are also followed by parentheses, such as duplicateMovieClip( ).

Constant width bold

Indicates text that you must enter verbatim when following a step-by-step procedure. Constant width bold is also used within code examples for emphasis, such as to highlight an important line of code in a larger example.

Constant width italic

Indicates code that you must replace with an appropriate value (e.g., your name here). Constant width italic is also used to emphasize variable, property, method, and function names referenced in comments within code examples.

In the ActionScript Language Reference, we played around with some font conventions. The following conventions looked the best, while maintaining consistency with our overall approach, so we went for them:

  • Class-level properties are shown with both the class name and property in constant width, because they should both be entered verbatim, as shown (e.g., Stage.width, Math.NaN).

  • Instance-level properties are shown with the class or object instance in constant width italic, because the placeholder should be replaced by a specific instance. The property itself is shown in constant width and should be entered as shown (e.g., Button.tabEnabled, where Button should be replaced with a button instance).

  • Method and function names, and the class or object to which they pertain, are always shown in italics and followed by parentheses, as in MovieClip.duplicateMovieClip( ). Refer to the ActionScript Language Reference, surrounding material, and nearby examples to determine whether to include the class name literally, as in TextField.getFontList( ), or replace it with an instance name, such as ball_mc.duplicateMovieClip( ).

  • Within the ActionScript Language Reference, for brevity, we often omit the class name when discussing a property or method of the class. For example, when discussing the htmlText property of the TextField class, when we say "set the htmlText property," you should infer from context that we mean, "set the someField_txt.htmlText property, where someField_txt is the identifier for your particular text field."

  • In some cases, an object property contains a reference to a method or callback handler. It wasn't always clear whether we should use constant width to indicate that it is a property (albeit one storing a method name) or italics and parentheses to indicate it is a method (albeit one stored in a property). If the line between a property referring to a method and the method itself is sometimes blurred, forgive us. To constantly harp on the technical difference would have made the text considerably less accessible and readable.

  • When summarizing properties for a class, the properties may be shown in italics, rather than constant width, to save space. This applies only when the properties are summarized under a Properties heading and they aren't followed by parentheses, so it is clear that they're properties and not methods.

If any or all of this is confusing now, it will be clear by the time you get to the ActionScript Language Reference, having read about objects, classes, and movie clips in Chapter 12, Chapter 13, and Chapter 14.

Pay special attention to notes and warnings set apart from the text with the following icons:

This is a tip. It contains useful information about the topic at hand, often highlighting important concepts or best practices.

This is a warning. It helps you solve and avoid annoying problems or warns you of impending doom. Ignore at your own peril.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint