same here, never found a solution other than reapplying the textformat to the 
field after any change. if you use a css style sheet instead i don't think you 
have to reapply it, although i think there are some limitations with them that 
i can't remember. not sure how you use embedded fonts with a css sheet either 
although i'm sure its possible.
best,
david

> Date: Mon, 4 Jan 2010 15:33:44 -0500
> Subject: Re: [Flashcoders] Settiing the default format of TextFields in CS3
> From: z...@zehfernando.com
> To: flashcoders@chattyfig.figleaf.com
> 
> Not saying much, but: no normal workaround that I know. This is behavior
> that has been in Flash since the AS2 days - certain properties (like
> letterSpacing) are always lost with defaultTextFormat so you always need to
> set it again. I always used something similar to your code.
> 
> Zeh
> 
> On Mon, Jan 4, 2010 at 3:21 PM, Todd Kerpelman <t...@kerp.net> wrote:
> 
> > Hey, Flash Coders! Happy New Year!
> >
> > Quick question for you guys: I work a lot with dynamic TextFields that I
> > design, format and lay out in the Flash CS3 authoring environment. The
> > problem I frequently run into is that when I go ahead and change the text
> > of
> > these things in the code, most of the text formatting information is lost.
> >
> > As a work-around, I've gotten into the habit of calling a function like
> > this
> > in my constructors...
> >
> > private function initTextFields():void
> > {
> >    for each (var formatMe:TextField in [titleTxt, headerTxt, legalTxt,
> > storyTxt]) {
> >        var tf:TextFormat = formatMe.getTextFormat();
> >        formatMe.defaultTextFormat = tf;
> >    }
> > }
> >
> > This works, but I keep wondering if I'm doing unnecessary work. Is there
> > any
> > kind of "Keep the current formatting of any textfield I've created in the
> > authoring environment" checkbox that I'm just missing somewhere?
> >
> > Thanks!
> >
> > --Todd
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
                                          
_________________________________________________________________
View your other email accounts from your Hotmail inbox. Add them now.
http://clk.atdmt.com/UKM/go/186394592/direct/01/_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to