User Guide

TextFormat.target 961
TextFormat.target
Availability
Flash Player 6.
Usage
my_fmt.target:String
Description
Property; indicates the target window where the hyperlink is displayed. If the target window is
an empty string, the text is displayed in the default target window
_self. You can choose a
custom name or one of the following four names:
_self 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. If the TextFormat.url property is an
empty string or
null, you can get or set this property, but the property will have no effect.
Example
The following example creates a text field with a hyperlink to the Macromedia website. The
example uses
TextFormat.target to display the Macromedia website in a new browser window.
var myformat:TextFormat = new TextFormat();
myformat.url = "http://www.macromedia.com";
myformat.target = "_blank";
this.createTextField("mytext",1,100,100,200,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
mytext.html = true;
mytext.text = "Go to Macromedia.com";
mytext.setTextFormat(myformat);