Translate Page To German Tranlate Page To Spanish Translate Page To French Translate Page To Italian Translate Page To Japanese Translate Page To Korean Translate Page To Portuguese Translate Page To Chinese Translate Page To Russian Translate Page To Dutch

19 Mar 2010 
Support Center » Knowledgebase » I tried using html tags in the deal content and wonder which tags are supported in Make-a-Deal offers and other modules that use Adobe Flash Player
 I tried using html tags in the deal content and wonder which tags are supported in Make-a-Deal offers and other modules that use Adobe Flash Player
Solution

This section lists the built-in HTML tags that Flash Player supports. You can also create new styles and tags by using CSS. For more information on supported HTML tags, see the following topics:

  • Anchor tag
  • Bold tag
  • Break tag
  • Font tag
  • Image tag
  • Italic tag
  • List item tag
  • Paragraph tag
  • Span tag
  • Text format tag
  • Underline tag

Here are the most popular tags described:

Bold tag

The <b> tag renders text as bold, as shown in the following example:

text3_txt.htmlText = "He was <b>ready</b> to leave!";

A bold typeface must be available for the font used to display the text.

Break tag

The <br> tag creates a line break in the text field. You must set the text field to be a multiline text field to use this tag.  In the following example, the line breaks between sentences:

this.createTextField("text1_txt", 1, 10, 10, 200, 100);
text1_txt.html = true;
text1_txt.multiline = true;
text1_txt.htmlText = "The boy put on his coat.<br />His coat was <font color='#FF0033'>red</font> plaid.";

Font tag

The <font> tag specifies a font or list of fonts to display the text.

The font tag supports the following attributes:

  • color Only hexadecimal color (#FFFFFF) values are supported. For example, the following HTML code creates red text:
    myText_txt.htmlText = "<font color='#FF0000'>This is red text</font>";
    
  • face Specifies the name of the font to use. As shown in the following example, you can specify a list of comma-delimited font names, in which case Flash Player selects the first available font:
    myText_txt.htmlText = "<font face='Times, Times New Roman'>Displays as either Times or Times New Roman...</font>";
    

    If the specified font is not installed on the user's computer system or isn't embedded in the SWF file, Flash Player selects a substitute font.

  • size Specifies the size of the font, in pixels, as shown in the following example:
    myText_txt.htmlText = "<font size='24' color='#0000FF'>This is blue, 24-point text</font>";
    

    You can also use relative point sizes instead of a pixel size, such as +2 or -4.

Image tag

The <img> tag lets you embed external image files (JPEG, GIF, PNG), SWF files, and movie clips inside text fields and TextArea component instances. Text automatically flows around images you embed in text fields or components. To use this tag, you must set your dynamic or input text field to be multiline and to wrap text.
The <img> tag has one required attribute, src, which specifies the path to an image file, a SWF file, or the linkage identifier of a movie clip symbol in the library. All other attributes are optional.
The <img> tag supports the following attributes:

  • src  Specifies the URL to an image or SWF file, or the linkage identifier for a movie clip symbol in the library. This attribute is required; all other attributes are optional. External files (JPEG, GIF, PNG, and SWF files) do not show until they are downloaded completely.
  • id Specifies the name for the movie clip instance (created by Flash Player) that contains the embedded image file, SWF file, or movie clip. This is useful if you want to control the embedded content with ActionScript.
  • width The width of the image, SWF file, or movie clip being inserted, in pixels.
  • height The height of the image, SWF file, or movie clip being inserted, in pixels.
  • align Specifies the horizontal alignment of the embedded image within the text field. Valid values are left and right. The default value is left.
  • hspace Specifies the amount of horizontal space that surrounds the image where no text appears. The default value is 8.
  • vspace Specifies the amount of vertical space that surrounds the image where no text appears. The default value is 8.

Italic tag

The <i> tag displays the tagged text in italics, as shown in the following code:

That is very <i>interesting</i>.

This code example would render as follows:

That is very interesting.

An italic typeface must be available for the font used.

List item tag

The <li> tag places a bullet in front of the text that it encloses, as shown in the following code:

Grocery list:
<li>Apples</li>
<li>Oranges</li>
<li>Lemons</li>

This code example would render as follows:

Grocery list:
  • Apples
  • Oranges
  • Lemons

    NOTE

     

    Ordered and unordered lists (<ol> and <ul> tags) are not recognized by Flash Player, so they do not modify how your list is rendered. All list items use bullets.

Paragraph tag

The <p> tag creates a new paragraph. You must set the text field to be a multiline text field to use this tag.
The <p> tag supports the following attributes:

  • align Specifies alignment of text within the paragraph; valid values are left, right, justify, and center.
  • class Specifies a CSS style class defined by a TextField.StyleSheet object.

    The following example uses the align attribute to align text on the right side of a text field.

    this.createTextField("myText_txt", 1, 10, 10, 400, 100);
    myText_txt.html = true;
    myText_txt.multiline = true;
    myText_txt.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:TextField.StyleSheet = new TextField.StyleSheet();
    myStyleSheet.setStyle(".blue", {color:'#99CCFF', fontSize:18});
    this.createTextField("test_txt", 10, 0, 0, 300, 100);
    test_txt.html = true;
    test_txt.styleSheet = myStyleSheet;
    test_txt.htmlText = "<p class='blue'>This is some body-styled text.</p>.";
    

Underline tag

The <u> tag underlines the tagged text, as shown in the following code:

This is <u>underlined</u> text.

This code would render as follows:

This is underlined text.

 

For more information on embedding fonts in Flash applications, see the ActionScript 2.0 Language Reference and Using Flash tutorials of Adobe http://www.adobe.com/support/documentation/en/flash/.



Article Details
Article ID: 526
Created On: 18 May 2009 05:11 PM

 This answer was helpful  This answer was not helpful

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Submit a Ticket | Knowledgebase | Troubleshooter | News | Downloads | Support Forum | Public Bug Tracker | Documentation | Beta Testers
Language:

Help Desk Software By Kayako SupportSuite v3.60.04