SoFunction
Updated on 2025-04-14

Understanding Programming Work in Flash Page 4/4


18.4 ActionScript Terminology

We already know a lot of ActionScript terms, such as classes, objects, properties, methods, events, scripts, etc. This section will introduce some commonly used terms in ActionScript so that when I mention it later, you won't feel strange.

Identifier— is a string that meets the requirements of certain rules. Specifically, the first character of this string must be a letter, underscore (_) or dollar sign ($), and the characters followed must be a letter, number, underscore or dollar sign. The name of everything that needs to be named in the program (for example: variables or instances) should be an identifier.

Example—Refers to the object. An instance of a class is an object. Many people always cannot distinguish the relationship between categories, objects and instances. Remember, an object is generated from the class to which it belongs. For example, when we create a student object, we say instantiate it from the Student class.

function— is a reusable code segment. A function completes a specific task. You can pass parameters to the function or return values ​​from the function.

parameter— is a placeholder used to pass values ​​to a function. In the area function below, x and y are two parameters of the function.

function area(x,y){
 return x*y;
}

When you call the area function like the following, you pass the required two values ​​to the function through its parameters. These two values ​​are calculated in the function and return the result of the operation to the call position.
rectangleArea= area(2,3);
There are many more terms in ActionScript, which I will explain when I cover them in the book.

Previous page1234Read the full text