1 Reply Latest reply on Nov 12, 2011 6:43 PM by Ned Murphy

    Flash and Text formatting

    Bwsab

      Hi,

       

      I have a dynamic TextField with very wide letter spacing in my .fla. However, whenever I change the text in the TextField using actionscript, the letter spacing resets. Is there a way to keep that from happening? And why does it happen in the first place? Thank you so much for all your help,

       

      --Saib

       

      P.S. If it's any help, I'm using Flash CS4.

        • 1. Re: Flash and Text formatting
          Ned Murphy Adobe Community Professional & MVP

          If you are setting this up in the Properties panel, It is not assigning the property to the textfield however (unfortunately), just the text that happens to be in the textfield when you create the instance on stage, if any.  What you should be able to do is assign a TextFormat to the textfield so that it retains what you define for it.

           

          var tFormat:TextFormat = new TextFormat();
          tFormat.letterSpacing = 60;

           

          tField.defaultTextFormat = tFormat;

           

          Having done that, any text you assign to the textfield (tField) afterwards should have the letterSpacing property you defined.