MovieClip._parent Property | Flash 4 |
a reference to the host clip or movie containing this clip | read-only |
The _parent property stores a reference to the clip object upon whose timeline mc resides. Main movies don't support the _parent property because they are at the top level (conveniently referred to as _root). References to _root._parent return undefined. The _parent property gives us the powerful ability to manipulate clips in relation to the current clip.
Though it is possible in Flash 5 and Flash 6 to reassign the _parent property to another clip, doing so has little purpose�only the reference is changed, not the physical structure of the clips. This unintentional behavior will likely be changed in the future.
If mc resides on the main timeline of a movie, we can play the main timeline from mc using:
_parent.play();
We can also set the parent timeline's properties, as in:
_parent._alpha = 50;
The _parent property can also be used in succession; that is, we can access the _parent of a _parent, as follows:
_parent._parent.play(); // Play the clip two clips above the current clip