ProblemYou want to apply formatting to text as the user enters it into a text field. SolutionApply a TextFormat object by using the defaultTextFormat property of the text field. DiscussionYou should use the defaultTextFormat property of a text field object to apply text formatting to text as it is entered by user input. Create a TextFormat object as in Recipe 9.13, and then assign that object to the text field's defaultTextFormat property: var formatter:TextFormat = new TextFormat( ); formatter.color = 0x0000FF; // Make the text blue field.defaultTextFormat = formatter; When you use defaultTextFormat, the formatting is applied to text that the user types into the field. See AlsoRecipes 9.13 and 9.15 |