Common properties of the textfiled HTMLText in AS3

Source: Internet
Author: User

Http://blog.sina.com.cn/s/blog_6d193c030100x6ud.html

<a> Hyperlink Tags
Properties: href: Link address
Target: The desired value for the destination window is _blank,_parent,_self,_top.
Cases:

my_txt.htmltext= "<a href= ' http://www.blueidea.com ' target= ' _self ' > Blue ideal </a>"

<b> Bold Labels
Cases:
my_txt.htmltext= "<b> Bold </b>"

<br> Line Wrapping Labels
Cases:
my_txt.htmltext= "Title of articles <br>"

<font> Font Labels
Properties: Color: Font colors, format #rrggbb.
Face: A font, which can be a single font or a list of fonts.
Size: Font size, per pixel.
Cases:
my_txt.htmltext= "<font color= ' #ff0000 ' face= ' Arial ' size= '" >this "is a text</font>"

<i> Italic Labels
Description
Cases:
my_txt.htmltext= "<i> Italic </i>"

<li> List item Labels
Cases:
my_txt.htmltext= "Sports:<li>football</li> <li>Boxing</li><li>Swimming</li>"
Note that the text box is selected for multiple lines.

<p> paragraph marks
Property: Align: The desired value is left,right,center on its way.
Class: Apply a CSS style class.
Cases:
my_txt.htmltext= "<p align= ' right ' class= ' title ' >align right</p><p align= ' left ' class= ' body ' >align Left</p> "
Note that the text box is selected for multiple lines. This example assumes that the CSS class title and body already exist.

<span> tags
Description: Applies a CSS style to all text located within the tag and is valid only after a CSS object has been defined.
Properties: Class: Apply a CSS style class.
Cases:
my_txt.htmltext= "<span class= ' body ' >this is a text confined by css</span>
Note that this example assumes that the CSS class body already exists.

<u> Underline labels
Cases:
my_txt.htmltext= "<u> underline </u>

Two Special Tags:

Image Labels
Description: This tag features more than just inserting images into a text box, but also inserting SWF and MovieClip.
Properties: src: The URL of the JPG or SWF to be loaded, or the link ID of the MC, this property is necessary, and other properties are optional.
Note: Flash does not support JPG in progressive format.
ID: Specifies the name of the movie clip that is embedded with jpg,swf or MovieClip.
Width: Picture/animation widths.
Height: Picture/Animation Heights.
Align: On its way, the desired value: Left,right, the default is left.
Hspace: The space in the horizontal direction of the picture when the text wraps around the graph.
Vspace: The space between the vertical and the picture when the text wraps around the graph.

<textformat> Text Format labels
Description: This tab allows you to apply the properties of some TextFormat objects directly to the text.
Properties: Blcokindent: Paragraph indent size, in pixels.
Indent: The indent size of the first line of the paragraph, in pixels.
Leading: Text line spacing, per pixel.
LeftMargin: The left margin of the text, in pixels.
RightMargin: The right margin of the text, in pixels.
TabStops: Table partitioning, per pixel.
Note: About attribute TabStops: Its value is an array that is used to represent the column partitioning of the table.
Move the output position to the next tab stop in the text with the escape character \ T.
Cases:
Tabfield= "<b>Name\tSex\tAge\t</b><br>";
Tabrecord1= "jinni\t20\tmale\t<br>";
Tabrecord2= "sucy\t21\tfemale\t<br>";
txt= "<textformat tabstops= ' [50,150,150] ' >" +
tabfield+tabrecord1+tabrecord2+ "</textformat>";

2. Online says there are the following possibilities
@ text.htmltext=text.htmltext+ "\ n" There are two carriage returns in the text area.
@ text.htmltext=text.htmltext+ "" There is a carriage return line in the text area
@ using Ctrl+enter will also produce blank lines

Common properties of the textfiled HTMLText in AS3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.