hey
one question...why are you mixing html and TextFormat? i try to use one of both.
where did you get the font for each textField from?
so you could do it on that way
var default_font="arial"
var html_font=""
if(text_html_font==undefined){
html_font=default_font
}
currentPage.my_txt.htmlText ="<font face='"+html_font+"'>"
this.Model.pages[i].text+"</font>";
greets
olee
2007/6/12, Giles Roadnight <[EMAIL PROTECTED]>:
Hi All
I have a loop that creates pages, creates textfields then adds text. Some of
this text has font tags and some doesn't. I want to use a default textFormat
so that an embedded font is used when no <font is specified in the text:
currentPage.createTextField("my_txt", 1, 5, 5,
currentPage._width - 10, currentPage._height - 10);
currentPage.my_txt.autoSize = false;
currentPage.my_txt.multiline = true;
currentPage.my_txt.wordWrap = true;
currentPage.my_txt.selectable = false;
currentPage.my_txt.embedFonts = true;
currentPage.my_txt.html = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Arial";
currentPage.my_txt.setNewTextFormat (my_fmt);
currentPage.my_txt.htmlText = this.Model.pages[i].text;
This works fine for text that has Arial specified in a font tag but for all
the other pages which are just text no text appears (when tracing I see that
Times is used which is not embedded).
Why isn't this working? The setNewTextformat should change the default
textformat for the field from then on? I am still getting Times though.
Many Thanks.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
http://www.renkster.de/#/about/
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com