![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 5.
varvariableName
[=value1
]
[...,
variableNameN
[=
valueN
]]
variableName
An identifier.
value
The value assigned to the variable.
Nothing.
Statement; used to declare local or Timeline variables.
{}
) but the action list was executed with a call()
action, the variables are local and expire at the end of the current list. call()
action, the variables are interpreted as Timeline variables. However, you don't have to use var
to declare Timeline variables.You cannot declare a variable scoped to another object as a local variable:
my_array.length = 25; // ok var my_array.length = 25; // syntax error
When you use var
, you can strictly type the variable; see Strict data typing
Note: Classes defined in external scripts also support public, private, and static variable scopes. See Creating Classes with ActionScript 2.0 and private
, public
, and static
.
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |