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 docs say about setNewTextFormat and on what i'm 99% sure i've done before in some circumstance, the text field in this case should contain a small "First" and a larger "Second". Instead setNewTextFormat() is acting like setTextFormat, setting all the text to fmtTwo. Is there a reason for this? If i try setting SPECIFIC letters to a textformat with setTextFormat(from,to,format) it works fine.
I thought setNewTextFormat() only affects text added to the textField AFTER it has been called, not the complete field at any time, anywhere.
As a better example of the kind of use i have for it; the actual problem AS: function sum() { var count = 17; var langCount = 4; var searchString = "A name"; var norm_fmt:TextFormat = new TextFormat(); norm_fmt.color = 0xFFFFFF; norm_fmt.size = 16; norm_fmt.font = "ConduitNorm"; var bold_fmt:TextFormat = new TextFormat(); bold_fmt.color = 0xEFB21E; bold_fmt.size = 18; bold_fmt.font = "ConduitBold"; sumField.text = ""; sumField.embedFonts = true; sumField.setNewTextFormat(bold_fmt); sumField.text += count; sumField.setNewTextFormat(norm_fmt); sumField.text += " NameTones in "; sumField.setNewTextFormat(bold_fmt); sumField.text += langCount; sumField.setNewTextFormat(norm_fmt); sumField.text += " different languages, was found on: "; sumField.setNewTextFormat(bold_fmt); sumField.text += searchString; } As above, all the text is set to bold_fmt, which is not cool - Andreas _______________________________________________ Flashcoders@chattyfig.figleaf.com 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