Note: This property is not supported for Arabic, Hebrew, and Thai.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a selectable text field that constantly updates with the current
date and time.
this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
date_txt.autoSize = true;
date_txt.selectable = true;
var date_interval:Number = setInterval(updateTime, 500, date_txt);
function updateTime(my_txt:TextField) {
my_txt.text = new Date().toString();
}
setNewTextFormat (TextField.setNewTextFormat
method)
public setNewTextFormat(tf:TextFormat) : Void
Sets the default new text format of a text field. The default new text format is the new text
format used for newly inserted text such as text entered by a user. When text is inserted, the
newly inserted text is assigned the default new text format.
The new default text format is specified by
Availability: ActionScript 1.0; Flash Lite 2.0
Parameters
- A TextFormat object.
tf:TextFormat
Example
In the following example, a new text field (called
properties are set. The format of the newly inserted text is applied.
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "Arial";
my_fmt.color = 0xFF9900;
this.createTextField("my_txt", 999, 0, 0, 400, 300);
my_txt.wordWrap = true;
my_txt.multiline = true;
my_txt.border = true;
678
ActionScript classes
, which is a TextFormat object.
textFormat
) is created at runtime and several
my_txt
Need help?
Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?