htmlText Element

The htmlText element describes an html text with the attributes described below. Unlike text, the htmlText element can process basic HTML tags.

Syntax

<htmlText id="objectId" x="xPosition" y="yPosition"
          width="objectWidth" height="objectHeight" [color="color"]
          [font="fontName"] [fontId="embededFontId"] [fontSize=""]
          [align="textAlign"] [leftMargin=""] [rightMargin=""]
          [indent="textIndent"] [leading="lineSpacing"]
          [autoSize="isSizeAuto"] [border="hasBorder"]
          [multiline="isMultiline"] [selectable="isSelectable"]
>
   <![CDATA[Here goes your text...]]>
</htmlText>

Attributes

Name

Description

Value type

Optional

Default Value

id

Object identifier.

id

no

-

x

Absolute x position of the text box (in pixels or twips).

coordinate

no

-

y

Absolute y position of the text box (in pixels or twips).

coordinate

no

-

width

Width of the text box (in pixels or twips).

coordinate

no

-

height

Height of the text box (in pixels or twips).

coordinate

no

-

color

Color of the text.

string

yes

-

font

System font name which will be used to draw this text. If embedded font with the same name exists, it will not be used still.

string

yes

-

fontId

Identifier of emeded font object which will be used to draw this text. Overrides font attribute if both are specified.

string

yes

-

fontSize

Height of the font in standard coordinate units.

coordinate

yes

-

leftMargin

Left margin (empty space between the left side of the text and the bounding box).

coordinate

yes

-

rightMargin

Right margin (empty space between the right side of the text and the bounding box).

coordinate

yes

-

indent

Indents the first line of paragraphs.

coordinate

yes

-

leading

Defines line spacing.

coordinate

yes

-

autoSize

Enables text resize with movie if true.

boolean

yes

false

border

Creates a border around the text box.

boolean

yes

false

multiline

Defines a multiline text object.

boolean

yes

true

wordWrap

Enables text area word wrap.

boolean

yes

true

selectable

Enables text selection.

boolean

yes

false

Place the HTML text between the tags <htmlText/></htmlText>, in the CDATA section.

Parent Elements

objects collection

Remarks

HTML and non-HTML text formatting tags supported by Flash player are as follows.


HTML tags

<p [align="left"|"right"|"justify"]> ... </p>

Defines a paragraph. Alignment may be specified.

<a href="url" [target="_blank|_parent|_self|_top|some_name"]> ... </a>

Defines a hyperlink. Optional attribute target specifies window name, values _blank, _parent, _self, _top are predefined window names. With _blank url will be opened in the new window, with _parent - in the parent window, _self - the same window, _top - topmost window, some_name is the name of the target window or frame. If there is no existing window or frame with the same name as specified in the target, a new window is opened with a name equal to the value of the target.

<font [face="fontName"] [size="fontSize"] [color="#RRGGBB"]> ... </font>

Defines a span of text with a font specified. Size attribute is specified in twips and may include a leading '+' or '-' for relative sizes.

<b> ... </b>

Defines a span of bold text.

<i> ... </i>

Defines a span of italic text.

<u> ... <u/>

Defines a span of underlined text.

<li> ... </li>

Defines a bulleted paragraph. The <ul> tag is not supported. Numbered lists are notsupported.


Non HTML tags

<textformat [leftmargin="leftMargin"] [rightMargin="rightMargin"]
          [indent="indent"] [blockIndent="blockIndent"]
          [leading="leading"] [tabstops="tabstops"]> ... </textformat>

Defines a span of text with certain formatting options. The following attributes are available:

  • leftmargin specifies the left margin in twips
  • rightmargin specifies the right margin in twips
  • indent specifies the left indent in twips
  • blockindent specifies a block indent in twips
  • leading specifies the leading in twips
  • tabstops specifies a comma-separated list of tab stops, each specified in twips
  • <tab>

    Inserts a tab character, which advances to the next tab stop as defined with <textformat>.

    See Also

    XML Schema Reference, objects collection.