MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 776

Actionscript language reference
Table of Contents

Advertisement

TextFormat class
Availability
Flash Player 6.
Description
The TextFormat class represents character formatting information.
You must use the constructor
its methods.
You can set TextFormat parameters to
a TextFormat object to a text field using
properties are applied, as in the following example:
this.createTextField("my_txt", this.getNextHighestDepth(), 0, 0, 100, 22);
my_txt.autoSize = true;
my_txt.text = "Lorem ipsum dolor sit amet...";
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_txt.setTextFormat(my_fmt);
This code first creates an empty TextFormat object with all of its properties
the
property to a defined value.
bold
The code
my_txt.setTextFormat(my_fmt)
default text format, because the
of the text field's default text format remain unchanged.
When
TextField.getTextFormat()
properties defined; no property is
Method summary for the TextFormat class
Method
TextFormat.getTextExtent()
Property summary for the TextFormat class
Property
TextFormat.align
TextFormat.blockIndent
TextFormat.bold
TextFormat.bullet
TextFormat.color
TextFormat.font
776
Chapter 7: ActionScript for Flash
to create a TextFormat object before calling
new TextFormat()
to indicate that they are undefined. When you apply
null
TextField.setTextFormat()
only changes the
property is the only one defined in
bold
is invoked, a TextFormat object is returned with all of its
.
null
Description
Returns text measurement information for a text string.
Description
Indicates the alignment of a paragraph.
Indicates the block indentation, in points.
Indicates whether text is boldface.
Indicates whether text is in a bulleted list.
Indicates the color of text.
Indicates the font name of the text with a text format.
CHAPTER 7
ActionScript for Flash
, only its defined
, and then sets
null
property of the text field's
bold
. All other aspects
my_fmt

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Flex

Table of Contents