Name
MovieClip._name Property — the identifier of a clip instance, as a string
Availability
Flash 4 and later
Synopsis
mc._name
Access
Read/write
Description
The _name
property specifies the instance name of
a movie clip instance as a string. Because it initially reflects the
instance name set in the Instance panel during authoring, the
_name
property doesn’t apply to main movies
(the main movie is most easily referred to by the global property
_root
).
Example
We can use _name
to determine whether or not to
perform some manipulation of a given clip, as we did when generating
a series of star movie clips in Example 10.2.
The _name
property may also be used to reassign
the identifier of a clip. For example:
// Change ball to circle ball._name = "circle"; // Now control the former ball as circle circle._x = 500;
See Also
MovieClip
._target
,
targetPath( );
Section 13.3.3 in
Chapter 13
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.