Flash CS3 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > TextField > _target (TextField._target property) | |||
public _target : String [read-only]
The target path of the text field instance. The _self target specifies the current frame in the current window, _blank specifies a new window, _parent specifies the parent of the current frame, and _top specifies the top-level frame in the current window.
Availability: ActionScript 1.0; Flash Player 6
The following ActionScript creates a text field called my_txt and outputs the target path of the new field, in both slash and dot notation.
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 100, 22);
trace(my_txt._target); // output: /my_txt
trace(eval(my_txt._target)); // output: _level0.my_txt
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player 7 or later. If your SWF file includes a version 2 component, use the version 2 components' DepthManager class instead of the MovieClip.getNextHighestDepth() method.
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/00002243.html