EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 150

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 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...
150 Chapter 8: Working with Text
List item tag (<li>)
The
<li> tag places a bullet in front of the text that it encloses.
Grocery list:
<li>Apples</li>
<li>Oranges</li>
<li>Lemons</li>
The above code would render as follows:
Grocery list:
Apples
Oranges
Lemons
Paragraph tag (<p>)
The
<p> tag creates a new paragraph. It supports the following attributes:
align Specifies alignment of text within the paragraph; valid values are left, right,
and
center.
class Specifies a CSS style class defined by an TextField.StyleSheet object. (For more
information, see “Using style classes” on page 143.)
The following example uses the
align attribute to align text on the right side of a text field.
textField.htmlText = "<p align='right'>This text is aligned on the right
side of the text field</p>";
The following example uses the class attribute to assign a text style class to a <p> tag.
var myStyleSheet = new TextField.StyleSheet();
myStyleSheet.secreateTextField("test", 10, 0,0, 300,100);
createTextField("test", 10, 0,0, 300,100);
test.styleSheet = myStyleSheet;
test.htmlText = "<p class='body'>This is some body-styled text.</p>.";
Span tag (<span>)
The
<span> tag is available only for use with CSS text styles. (For more information, see
“Formatting text with Cascading Style Sheets” on page 139.) It supports the following attribute:
class Specifies a CSS style class defined by an TextField.StyleSheet object. For more
information on creating text style classes, see “Using style classes” on page 143.
Text format tag (<textformat>)
The
<textformat> tag lets you use a subset of paragraph formatting properties of the TextFormat
class within HTML text fields, including line leading, indentation, margins, and tab stops. You
can combine
<textformat> tags with the built-in HTML tags.
The
<textformat> tag has the following attributes:
blockindent Specifies the block indentation in points; corresponds to
TextFormat.blockIndent. (See TextFormat.blockIndent on page 718.)
indent Specifies the indentation from the left margin to the first character in the paragraph;
corresponds to
TextFormat.indent. (See TextFormat.indent on page 722.)

Table of Contents

Related product manuals