Re: [Flashcoders] Settiing the default format of TextFields in CS3
Ahhh... You know, I hadn't considered the Style Sheet option. Maybe I'll give that a try. Thanks, guys! --T On Mon, Jan 4, 2010 at 1:43 PM, David Hunter wrote: > > 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 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 > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Settiing the default format of TextFields in CS3
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 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
Re: [Flashcoders] Settiing the default format of TextFields in CS3
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 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
RE: [Flashcoders] Settiing the default format of TextFields in CS3
Why don't you use a CSS sheet?? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Todd Kerpelman Sent: maandag 4 januari 2010 21:22 To: Flash Coders List Subject: [Flashcoders] Settiing the default format of TextFields in CS3 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 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.124/2599 - Release Date: 01/04/10 09:24:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Settiing the default format of TextFields in CS3
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