Textfield.settextformat() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

TextField.setTextFormat()

Availability
Flash Player 6.
Usage
my_txt.setTextFormat (textFormat:TextFormat) : Void
my_txt.setTextFormat (index:Number, textFormat:TextFormat) : Void
my_txt.setTextFormat (beginIndex:Number, endIndex:Number,
textFormat:TextFormat) : Void
Parameters
A TextFormat object, which contains character and paragraph formatting
textFormat
information.
An integer that specifies a character within
index
An integer.
beginIndex
An integer that specifies the first character after the desired text span.
endIndex
Returns
Nothing.
Description
Method; applies the text formatting specified by textFormat to some or all of the text in a text
field.
textFormat
Only the non-null properties of textFormat are applied to the text field. Any property of
that is set to null will not be applied. By default, all of the properties of a newly
textFormat
created TextFormat object are set to
There are two types of formatting information in a TextFormat object: character level, and
paragraph level formatting. Each character in a text field might have its own character formatting
settings, such as font name, font size, bold, and italic.
For paragraphs, the first character of the paragraph is examined for the paragraph formatting
settings for the entire paragraph. Examples of paragraph formatting settings are left margin, right
margin, and indentation.
The
setTextFormat()
a range of characters, or to the entire body of text in a text field.
Usage 1: Applies the properties of
Usage 2: Applies the properties of
Usage 3: Applies the properties of the
beginIndex parameter to the endIndex parameter.
918
Chapter 2: ActionScript Language Reference
must be a TextFormat object that specifies the text formatting changes desired.
null
method changes the text formatting applied to an individual character, to
textFormat
textFormat
textFormat
.
my_txt
.
to all text in the text field.
to the character at position index.
parameter to the span of text from the

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents