[Flashcoders] setNewTextFormat

2007-06-12 Thread Giles Roadnight
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,

Re: [Flashcoders] setNewTextFormat

2007-06-12 Thread o renken
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

Re: [Flashcoders] setNewTextFormat

2007-06-12 Thread Giles Roadnight
Some of the text that is being pulled in from xml will have font tags attached and some won't so I want to se thte default format. I have got round it for now with an if statement so the default format is only set if there is no font tag in the string. However in the case of a string with only

RE: [Flashcoders] setNewTextFormat

2007-06-12 Thread Danny Kodicek
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,

Re: [Flashcoders] setNewTextFormat

2007-06-12 Thread Giles Roadnight
Yes, it does seem to be broken. I think I'll just add font tags around text if there are none present. Thansk for the help. On 6/12/07, Danny Kodicek [EMAIL PROTECTED] wrote: Hi All I have a loop that creates pages, creates textfields then adds text. Some of this text has font tags and

RE: [Flashcoders] setNewTextFormat

2007-06-12 Thread Danny Kodicek
no danny. setNewTextFormat means that all NEW text in the textfield will be formed. setTextFormat is only once and not for new text. and if you do some new text via AS setNexTextFormat will work fine.. Not for me, no. I always have to run setTextFormat after setting with AS, whatever I

[Flashcoders] setNewTextFormat

2007-04-17 Thread Danny Kodicek
Hopefully a quickie: Am I the only person that can never get setNewTextFormat to work? When I change the text of a field, I always seem to have to run setTextFormat, even if I've setNewTextFormat to the format I want. Is there some foolproof system for getting this working without having to keep

Re: [Flashcoders] setNewTextFormat

2007-04-17 Thread Matthias Dittgen
What do you want to achieve, Danny? AFAIK setNewTextFormat is meant for user entered text, like mentioned in the LiveDocs, which works well for me. public setNewTextFormat(tf:TextFormat) : Void Sets the default new text format of a text field. The default new text format is the new text

RE: [Flashcoders] setNewTextFormat

2007-04-17 Thread Danny Kodicek
What do you want to achieve, Danny? AFAIK setNewTextFormat is meant for user entered text, like mentioned in the LiveDocs, which works well for me. public setNewTextFormat(tf:TextFormat) : Void Sets the default new text format of a text field. The default new text format is the

[Flashcoders] setNewTextFormat and textField.variable

2006-11-03 Thread Danny Kodicek
Does setNewTextFormat not work for text that's set by means of the textField.variable property? I've got a bunch of fields here and no matter what combination of setTextFormat / setNewTextFormat I use, they seem to be reverting back to their original format when I change the value of the

Re: [Flashcoders] setNewTextFormat and textField.variable

2006-11-03 Thread Joseph Balderson
I wrote a few tutorials on Community MX a while back that cover this very issue, if you're interested. Disclaimer: the articles cost $5. http://www.communitymx.com/content/article.cfm?cid=3519C http://www.communitymx.com/content/article.cfm?cid=0D80B At the end of it all you get a nice-n-easy

RE: [Flashcoders] setNewTextFormat and textField.variable

2006-11-03 Thread Merrill, Jason
-Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Danny Kodicek Sent: Friday, November 03, 2006 4:55 AM To: Flashcoders mailing list (Flashcoders mailing list) Subject: [Flashcoders] setNewTextFormat and textField.variable Does setNewTextFormat not work

RE: [Flashcoders] setNewTextFormat and textField.variable

2006-11-03 Thread Danny Kodicek
Curious, why are you using the Textfield.variable property? I would recommend making the switch over to textfield.text or textField.htmlText so as to avoid any complications and do it the Actionscript way. Various reasons. Most obviously, I've got a fair number of fields referencing the

RE: [Flashcoders] setNewTextFormat and textField.variable

2006-11-03 Thread Steven Sacks | BLITZ
IMO, there's nothing wrong with using TextField.variable. It has its time and place and can be used properly. Just because it's overused by novices doesn't make it a bad thing, just like bevels and dropshadows in Photoshop aren't always a bad thing either. Of course, Lens Flare is a different

Re: [Flashcoders] setNewTextFormat() woes

2006-04-21 Thread MBDI ICSC Rodrigo E. Curiel Salazar
Andreas, if i understood you correct, what you want is this: var format1_fmt:TextFormat = new TextFormat(); format1_fmt.font = Arial; var format2_fmt:TextFormat = new TextFormat(); format2_fmt.font = Courier; var string1:String = Sample string number one.+newline; var string2:String = Sample

Re: [Flashcoders] setNewTextFormat() woes

2006-04-21 Thread Andreas Rønning
I was hoping i wouldn't have to do that.. But thanks Rodrigo, it'll do fine :) - A MBDI ICSC Rodrigo E. Curiel Salazar wrote: Andreas, if i understood you correct, what you want is this: var format1_fmt:TextFormat = new TextFormat(); format1_fmt.font = Arial; var format2_fmt:TextFormat = new

[Flashcoders] setNewTextFormat() woes

2006-04-20 Thread Andreas Rønning
Ok i'm confused. fmtOne = new TextFormat(Arial,20); fmtTwo = new TextFormat(Arial,40); blah = _root.createTextField(myField,10,0,0,100,100); blah.autoSize = true; blah.setNewTextFormat(fmtOne); blah.text+=First ; blah.setNewTextFormat(fmtTwo); blah.text+=Second; In my mind, based on what the