EasyManua.ls Logo

MACROMEDIA FLASH 8-USING FLASH - Page 184

MACROMEDIA FLASH 8-USING FLASH
678 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
184 Working with Text
Creating and removing text fields dynamically
You can use the createTextField method of the MovieClip object to create a new, empty
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
createTextField; this method does not work on
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 dont 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
setTextFormat method
of the TextField object. A text field created with the
createTextField method receives the
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)

Table of Contents

Related product manuals