MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 750

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

The
parameter becomes the context in which the properties, variables, and functions in
object
the
statement(s)
properties specified are
.
my_array
length
any actions or statements inside the
To find the value of an identifier in the
beginning of the scope chain specified by the
of the scope chain, in a specific order.
The scope chain used by the
following list and continues to the last item:
The object specified in the
The object specified in the
The Activation object. (A temporary object that is automatically created when a function is
called that holds the local variables called in the function.)
The movie clip containing the currently executing script.
The Global object (built-in objects such as Math and String).
To set a variable inside a
action or you must enter the full path to the Timeline on which you want the variable to live. If
you set a variable in a
according to the scope chain. If the variable doesn't already exist, the new value will be set on the
Timeline from which the
In Flash 5 or later, the
are encouraged to use
to the ECMA-262 standard. The principal difference between the
is that
takes a reference to a movie clip or other object as its parameter, while
with
takes a target path string that identifies a movie clip as its parameter, and cannot be used to
target objects.
Example
The following example sets the
instructs
someOther_mc
with (someOther_mc) {
_x = 50;
_y = 100;
gotoAndStop(3);
}
The following code snippet shows how to write the preceding code without using a
someOther_mc._x = 50;
someOther_mc._y = 100;
someOther_mc.gotoAndStop(3);
750
Chapter 12: ActionScript Dictionary
parameter are read. For example, if
and
length
concat
and
my_array.concat
with
statement(s)
action to resolve identifiers starts with the first item in the
with
parameter in the innermost
object
parameter in the outermost
object
action, the variable must have been declared outside the
with
action without declaring it, the
with
action was called.
with
action replaces the deprecated
with
instead of
with
tellTarget
and
_x
_y
to go to Frame 3 and stop.
is
object
, those properties are automatically read as
. In another example, if
action are called from inside the
parameter, ActionScript starts at the
and searches for the identifier at each level
object
with
tellTarget
because it is a standard ActionScript extension
properties of the
someOther_mc
, and two of the
my_array
is
object
state.california
california
action.
with
action.
with
action will look for the value
action. You
and
with
tellTarget
tellTarget
instance, and then
with
,
instance.
with
actions
action.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents