MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference page 506

Actionscript language reference
Table of Contents

Advertisement

variable = null
maxChars = null
styleSheet = undefined
tabInded = undefined
A text field created with
font = "Times New Roman"
size = 12
color = 0x000000
bold = false
italic = false
underline = false
url = ""
target = ""
align = "left"
leftMargin = 0
rightMargin = 0
indent = 0
leading = 0
blockIndent = 0
bullet = false
display = block
tabStops = [] (empty array)
You can extend the methods and event handlers of the MovieClip class by creating a subclass. For
more information, see "Assigning a class to a movie clip symbol" in Using ActionScript in Flash.
Example
The following example creates a text field with a width of 300, a height of 100, an x coordinate of
100, a y coordinate of 100, no border, red, and underlined text:
this.createTextField("my_txt", 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFF0000;
my_fmt.underline = true;
my_txt.text = "This is my first test field object text.";
my_txt.setTextFormat(my_fmt);
An example is also in the animations.fla file in the HelpExamples folder. The following list gives
typical paths to this folder:
Windows: \Program Files\Macromedia\Flash MX 2004\HelpExamples\
Macintosh: HD/Applications/Macromedia Flash MX 2004/HelpExamples/
See also
TextFormat class
506
Chapter 2: ActionScript Language Reference
createTextField()
receives the following default TextFormat object:

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents