User Guide
23
CHAPTER 2
ActionScript Basics
ActionScript has rules of grammar and punctuation that determine which characters and words
are used to create meaning and in which order they can be written. For example, in English, a
period ends a sentence; in ActionScript, a semicolon ends a statement.
The general rules described in this section apply to all ActionScript. Most ActionScript terms also
have individual requirements; for the rules for a specific term, see its entry in Flash ActionScript
Language Reference. Applying the basics of ActionScript in a way that creates elegant programs can
be a challenge for users who are new to ActionScript. For more information on how to apply the
rules described in this section, see “Using Best Practices” on page 65.
This section contains the following topics:
• “Differences between ActionScript and JavaScript” on page 24
• “Terminology” on page 24
• “Syntax” on page 28
• “About data types” on page 34
• “Assigning data types to elements” on page 39
• “About variables” on page 44
• “Using operators to manipulate values in expressions” on page 49
• “Specifying an object’s path” on page 57
• “Using condition statements” on page 58
• “Using built-in functions” on page 60
• “Creating functions” on page 61