Understanding the ActionScript Language > Using operators to manipulate values in expressions

 

Using operators to manipulate values in expressions

An expression is any statement that Flash can evaluate and that returns a value. You can create an expression by combining operators and values, or by calling a function. When you write an expression in the Actions panel in normal mode, make sure the Expression box is selected in the parameters area; otherwise, the parameter text box contains the literal value of a string.

Operators are characters that specify how to combine, compare, or modify the values of an expression. The elements that the operator performs on are called operands. For example, in the following statement, the + operator adds the value of a numeric literal to the value of the variable foo; foo and 3 are the operands:

foo + 3 

The topics that follow describe general rules about common types of operators, operator precedence, and operator associativity. For detailed information on each operator mentioned here, as well as special operators that don't fall into these categories, see the online ActionScript Dictionary in the Help menu.