5 Replies Latest reply on Oct 11, 2013 1:45 PM by Ned Murphy

    .autoSize

    Ron Colmen Level 2

      This is my code. I need to add couple of extra spacees at the end of message.text  How?

       

      h = _root.createEmptyMovieClip("h", 5);

      h.attachMovie("tray_mc", "tray_mc", 10);

      h.tray_mc.message.autoSize=true;

      h.tray_mc.message.text = "test";

        • 1. Re: .autoSize
          Ned Murphy Adobe Community Professional & MVP

          If you need extra spaces then add them when you assign the text...

           

          h.tray_mc.message.text = "test  ";

           

          or

           

          h.tray_mc.message.text = "test" + "  ";;

          • 2. Re: .autoSize
            Ron Colmen Level 2

            That doesn't not work. It ignores the spaces at the end

             

            shows clearly whe I add a border to the tf.

            h.tray_mc.message.border=true;

            • 3. Re: .autoSize
              Ned Murphy Adobe Community Professional & MVP

              It does work.  You asked how to add spaces to the end of ther text and that is adding spaces to the end of the text.

               

              If you want to add extra empty textfield space after the text the same holds true.  If it is not working for you I can't explain why but it works for me.

              • 4. Re: .autoSize
                Ron Colmen Level 2

                You're correct.

                 

                Instead of using the textfield form the library (attachMovie), I used .createTextField to create 'message' and it worked. I don't know why the textfield in attachMovie() did not show spaces, but I've got my answer.

                 

                Thanks ned!

                • 5. Re: .autoSize
                  Ned Murphy Adobe Community Professional & MVP

                  You're welcome Ron.  I recreated what I could make of your first posting and that worked for me, using the attachMovie approach... so something is amiss... but if you have a working solution that's all you really need.