ActionScript Terminology

ActionScript has its own terminology. The following is a list of an introduction to important ActionScript terms:

  • Actions are statements that instruct a movie to do something while it is playing. For example, gotoAndStop sends the playhead to a specific frame or label. In this manual, the terms action and statement are interchangeable.
  • Boolean is a true or false value.
  • Classes are data types that you can create to define a new type of object. To define a class, you create a constructor function.
  • Constants are elements that don’t change. For example, the constant Key.TAB always has the same meaning: it indicates the Tab key on a keyboard. Constants are useful for comparing values.
  • Constructors are functions that you use to define the properties and methods of a class.
  • Data types are a set of values and the operations that can be performed on them. The ActionScript data types are string, number, boolean, object, movie clip, function, null, and undefined.
  • Events are actions that occur while a movie is playing. For example, different events are generated when a movie clip loads, the playhead enters a frame, the user clicks a button or movie clip, or the user types at the keyboard.
  • Event handlers are special actions that manage events such as mouseDown or load. There are two kinds of ActionScript event handlers: actions and methods. There are only two event handler actions, on and onClipEvent . In the Actions toolbox, each ActionScript object that has event handler methods has a subcategory called Events.
  • Expressions are any legal combination of ActionScript symbols that represent a value. An expression consists of operators and operands. For example, in the expression x + 2 , x and 2 are operands and + is an operator.
  • Functions are blocks of reusable code that can be passed parameters and can return a value. For example, the getProperty function is passed the name of a property and the instance name of a movie clip, and it returns the value of the property. The getVersion function returns the version of the Flash Player currently playing the movie.
  • Identifiers are names used to indicate a variable, property, object, function, or method. The first character must be a letter, underscore ( _ ), or dollar sign ( $ ). Each subsequent character must be a letter, number, underscore, or dollar sign. For example, firstName is the name of a variable.
  • Instances are objects that belong to a certain class. Each instance of a class contains all the properties and methods of that class. All movie clips are instances with properties (for example, _alpha and _visible ) and methods (for example, gotoAndPlay and getURL ) of the MovieClip class.
  • Instance names are unique names that allow you to target movie clip and button instances in scripts. You can use the Property panel to assign instance names to instances on the Stage.
  • Keywords are reserved words that have special meaning. For example, var is a keyword used to declare local variables. You cannot use a keyword as an identifier.
  • Methods are functions assigned to an object. After a function is assigned, it can be called as a method of that object.
  • Objects are collections of properties and methods; each object has its own name and is an instance of a particular class. Built-in objects are predefined in the ActionScript language. For example, the built-in Date object provides information from the system clock.
  • Operators are terms that calculate a new value from one or more values. For example, the addition ( + ) operator adds two or more values together to produce a new value. The values that operators manipulate are called operands.
  • Parameters (also called arguments ) are placeholders that let you pass values to functions.
  • Properties are attributes that define an object. For example, _visible is a property of all movie clips that defines whether a movie clip is visible or hidden.
  • Target paths are hierarchical addresses of movie clip instance names, variables, and objects in a movie. You name a movie clip instance in the Property panel. (The main Timeline always has the name _root .) You can use a target path to direct an action at a movie clip or to get or set the value of a variable.
  • Variables are identifiers that hold values of any data type. Variables can be created, changed, and updated. The values they store can be retrieved for use in scripts.

 

 

Terminology