Default properties of new text fields
Text fields created at runtime with
receive a default TextFormat object
createTextField()
with the following properties:
align = "left"
blockIndent = 0
bold = false
bullet = false
color = 0x000000
font = "Times New Roman" (default font is Times on Mac OS X)
indent = 0
italic = false
kerning = false
leading = 0
leftMargin = 0
letterSpacing = 0
rightMargin = 0
size = 12
tabStops = [] (empty array)
target = ""
underline = false
url = ""
The default font property on the Mac OS X is Times.
For a complete list of TextFormat methods and their descriptions, see
in the
TextFormat
ActionScript 2.0 Language Reference.
Formatting text with Cascading Style
Sheet styles
Cascading Style Sheet (CSS) styles are a way to work with text styles that can be applied to
HTML or XML documents. A style sheet is a collection of formatting rules that specify how
to format HTML or XML elements. Each rule associates a style name, or selector, with one or
more style properties and their values. For example, the following style defines a selector
named
:
bodyText
.bodyText {
text-align: left
}
Formatting text with Cascading Style Sheet styles
421
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?
Questions and answers