why do you need the textFormat if youre using html? you can do all the
formating with html.
i got curious about that. your textformat will not take effect cause
youre setting the textfields htmlText, not its text. seems like format
and html are no good friends...different things
copy that in the
> 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
That's exactly what I have done:
if(this.Model.pages[i].text.indexOf("';
}
but the setNEwTextFormat funtion is not working the way it should do. That
would be a more elegant solution that the above.
On 6/12/07, o renken <[EMAIL PROTECTED]> wrote:
no danny. setNewTextForm
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..
giles. if i understand you right youll get html-strings from your xml.
some of them have a font
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
> 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
> currentPage.createTextField("my_txt", 1, 5, 5,
> currentPage._
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 p
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
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 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
> 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
Danny Kodicek wrote:
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 w
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 format
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
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 st
> 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
ness
>>-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] setNewTextFo
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 c
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
variable.
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 = ne
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 = "Samp
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 wh
21 matches
Mail list logo