•
Specifies the amount of leading (vertical space) between lines; corresponds to
leading
TextFormat.leading
•
Specifies the left margin of the paragraph, in points; corresponds to
leftmargin
TextFormat.leftMargin
•
rightmargin
TextFormat.rightMargin
•
Specifies custom tab stops as an array of non-negative integers; corresponds to
tabstops
TextFormat.tabStops
The following code example uses the
table of data with boldfaced row headers, as shown below:
Name
Tim
Edwin
To create a formatted table of data using tab stops:
Using the Text tool, create a dynamic text field that's approximately 300 pixels wide and 100
1
pixels high.
In the Property inspector, enter
2
from the Line Type menu, and select the Render Text as HTML option.
In the Timeline, select the first frame on Layer 1.
3
Open the Actions panel (Window > Development Panels > Actions) and enter the following
4
code in the Actions panel:
var rowHeaders = "<b>Name\t</b><b>Age\t</b><b>Department";
var row_1 = "Tim\t31\tIMD";
var row_2 = "Edwin\t42\tQA";
table_txt.htmlText = "<textformat tabstops='[100, 200]'>";
table_txt.htmlText += rowHeaders;
table_txt.htmlText += row_1;
table_txt.htmlText += row_2 ;
table_txt.htmlText += "</textformat>";
Note the use of the tab character escape sequence (
the table.
Select Control > Test Movie to test the movie.
5
Underline tag (<u>)
The
tag underlines the tagged text.
<u>
This text is <u>underlined</u>.
The above code would render as follows:
This text is underlined.
. (See
TextFormat.leading
. (See
TextFormat.leftMargin
Specifies the right margin of the paragraph, in points; corresponds to
. (See
TextFormat.rightMargin
. (See
TextFormat.tabStops
tabstops
Age
32
46
table_txt
on page
722.)
on page
on page
on page
723.)
attribute of the
<textformat>
Department
IMD
Engineering
in the Instance Name text box, select Multiline
) to add tabs between each "column" in
\t
Using HTML-formatted text
723.)
723.)
tag to create a
151
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers