Now this works:
// ---- start
var curText:String = "<p class=\"headline\">Different Color Headers</p>"
+ "<p>Mauris posuere iaculis lectus. Maecenas fringilla viverra libero."
+ "Aenean adipiscing massa non orci. Etiam quis lacus sed pede
porttitor dignissim.<br>"
+ "Do you like <strong><a href=
\"mailto:[email protected]\" target=\"_blank\" class=
\"bURL\">Figleaf?</a></strong><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><p class=\"author\">The
Flash Comunity is a tightly knit, very intricate part of the web</p>";
/*
//--- Ooor if you want to import your text via a text file or other
var curText:String;
loadVariables("curText.txt", this);
*/
/*
// inside curText.txt :
curText=<p class="headline">Different Color Headers</p><p>Mauris
posuere iaculis lectus. Maecenas fringilla viverra libero. Aenean
adipiscing massa non orci. Etiam quis lacus sed pede porttitor
dignissim.<br>Do you like <strong><a
href="mailto:[email protected]" target="_blank"
class="bURL">Figleaf?</a></strong><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><p class="author">The
Flash Comunity is a tightly knit, very intricate part of the web</p>
*/
var fmt:TextFormat = new TextFormat();
fmt.font = "Arial";
fmt.color = 0x000000; // for base color without style applied
import TextField.StyleSheet;
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);
var my_styleSheet:StyleSheet = new StyleSheet();
my_styleSheet.onLoad = function(success:Boolean) {
textContent.ignoreWhite = true;
if (success) {
textContent.styleSheet = my_styleSheet;
textContent.htmlText = curText;
} else {
curText = "Text not loading";
textContent.htmlText = curText;
}
};
my_styleSheet.load("flash_css.css");
// -------- end
Best,
Karl DeSaulniers
Design Drumm
http://designdrumm.com
On May 13, 2009, at 10:57 AM, natalia Vikhtinskaya wrote:
I found.
Solved.
here is correct code with font in library id="Arial"
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Arial";
this.createTextField("textContent", 1, 0, 0, textAreaW, textAreaW);
var obj=this.textContent;
obj.multiline = true;
obj.wordWrap = true;
//obj.embedFonts = true; this is wrong
obj.html=true;
obj.autoSize = true;
obj.selectable = false;
obj.setTextFormat(my_fmt);
obj.styleSheet = flash_css;
obj.htmlText=curText;
Now it shows bold, italic, normal
2009/5/13 Ruy Adorno <[email protected]>:
And what about different ids and the same linkage?
natalia Vikhtinskaya wrote:
Not possible to have them with the same id.
2009/5/13 Ruy Adorno <[email protected]>:
You have to embed 2 times the same font in your library, I think
you can
use
just the same id, but you should import one as bold and another
as a
simple
font.
natalia Vikhtinskaya wrote:
I solved problem with hand cursor. Still can not make text
bold. If I
check properties in library font- bold all text becomes bold.
2009/5/13 natalia Vikhtinskaya <[email protected]>:
Thank you for help, but that does not help. I added text area
with
embeded Arial letters- normal and bold on stage.
2009/5/13 Karl DeSaulniers <[email protected]>:
Hi Natalia,
On May 13, 2009, at 4:26 AM, natalia Vikhtinskaya wrote:
font-family: Arial; // I have font Arial in the library
with id
“Arial”.
Try placing a instance of your embeded font off stage where your
loading
your textBox.
Another problem if I have bold tags <b>some text</b> that
text is not
Try <strong>your text here</strong>
HTH
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders