You will need a font instance for each style you want to use in your lib.
For instance to have the different "Arial" fonts embedded:
to have normal you would make a font instance using Arial and name it "Arial" in your lib to have bold you would make a font instance using Arial Bold and name it "Arial Bold" to have italic you would make a font instance using Arial Italic and name it "Arial Italic"
As long as the name of your instance is exactly the name of your font
and you have that style inserted in your lib then you should be good to go.

Do not use the bold or italic selector on the properties panel, as this is only best used for static text.

This code works:

stop();
var curText:String = "<font color=\"#FFCC00\"><p>Different Color Headers</p></font>" + "<p>Mauris posuere iaculis lectus. <b>Maecenas</b> fringilla <i>viverra libero</i>." + "Aenean adipiscing massa non orci. Etiam quis lacus sed pede porttitor dignissim.<br>" + "Do you like <b><a href=\"mailto:[email protected] \" target=\"_blank\">Figleaf?</a></b><br>" + "Nullam malesuada leo et turpis tincidunt eleifend. Proin non eros et mauris suscipit fringilla. In hac habitasse platea dictumst." + "Maecenas varius. Duis ipsum nibh, varius a, aliquet nec, ornare ac, diam. Nam sollicitudin bibendum elit." + "Sed pellentesque tincidunt mi.</p><br><br><font color=\"#CCCCCC\" size=\"8\"><p>The Flash Comunity is a tightly knit, very intricate part of the web</font><p>";

var fmt:TextFormat = new TextFormat();
fmt.font = "Arial";
fmt.font = "Arial Bold";
fmt.font = "Arial Italic";
fmt.color = 0x000000;


this.createTextField("textContent", 0, 0, 20, 240, 320);
textContent.multiline = true;
textContent.wordWrap = true;
textContent.autoSize = true
textContent.selectable = false;
textContent.html = true;
textContent.setTextFormat(fmt);
textContent.htmlText = curText;


I have three font instances in my lib. "Arial", "Arial Bold" and "Arial Italic"

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On May 14, 2009, at 11:49 AM, natalia Vikhtinskaya wrote:
I am trying without css now because css works well. Here is the last
variant where I try as they recommend in the article.  I need use
alpha for this html text http://www.natavi.co.uk/test/text_test.fla

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to