MACROMEDIA FLASH 8-USING FLASH Use Manual page 184

Using flash
Table of Contents

Advertisement

Creating and removing text fields dynamically
You can use the
method of the MovieClip object to create a new, empty
createTextField
text field as a child of the movie clip that calls the method. You can use the
removeTextField
method to remove a text field created with
; this method does not work on
createTextField
a text field created manually in the Timeline.
When you create a text field, you can use the TextField object to set properties of the text
field. If you don't set the properties, the new text field receives a set of default properties. The
default properties of the new text field are as follows:
type = "dynamic"
border = false
background = false
password = false
multiline = false
html = false
embedFonts = false
variable = null
maxChars = null
After you create a text field, you can use the TextFormat object to format the text. You must
create a new TextFormat object and then pass it as a parameter to the
method
setTextFormat
of the TextField object. A text field created with the
method receives the
createTextField
following default TextFormat object:
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
bullet = false
tabStops = [] (empty array)
184
Working with Text

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents