Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Button > _parent (Button._parent property) | |||
public _parent : MovieClip
A reference to the movie clip or object that contains the current movie clip or object. The current object is the one containing the ActionScript code that references _parent.
Use _parent to specify a relative path to movie clips or objects that are above the current movie clip or object. You can use _parent to move up multiple levels in the display list as in the following:
this._parent._parent._alpha = 20;
Availability: ActionScript 1.0; Flash Player 6
In the following example, a button named my_btn is placed inside a movie clip called my_mc. The following code shows how to use the _parent property to get a reference to the movie clip my_mc:
trace(my_mc.my_btn._parent);
The Output panel displays the following:
_level0.my_mc
_parent (MovieClip._parent property), _target (MovieClip._target property), _root property
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00001459.html