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