2 Replies Latest reply on Oct 22, 2008 1:00 PM by Newsgroup_User

    scale dynamic text

    jameslytle
      I would like to have the dynamic text scale within a given area despite how many characters are passed into it as my value from FlashVars.

      So whether the dynamic name is "Jon" or "Jonathon" for example, the name should not appear any wider than the space I choose.

      Could someone give me some pointers for achieving this?

      Thanks in advance,
      James
        • 1. Re: scale dynamic text
          Level 7
          You could just stick a mask over the field...

          --
          Dave -
          www.offroadfire.com
          Head Developer
          http://www.blurredistinction.com
          Adobe Community Expert
          http://www.adobe.com/communities/experts/


          • 2. Re: scale dynamic text
            Level 7
            >> I would like to have the dynamic text scale within
            >> a given area despite how many characters are
            >> passed into it as my value from FlashVars

            > You could just stick a mask over the field...

            That would do it, and as you experient, you'll find that Flash generally
            provides half a dozen ways to accomplish any given goal (I exaggerate, but
            only sort of ... flexibility is one of the things I like most about Flash).

            Check out the TextField class in the ActionScript 2.0 Language
            Reference, and you'll find an autoSize property, which gives you another
            avenue. You might want to experiment with the border property while you're
            testing, because you can actually see the text field (even without text) if
            it's set to true. The autoSize property lets you specify in which direction
            the text field should expand.


            David Stiller
            Co-author, Foundation Flash CS4 for Designers
            http://tinyurl.com/5j55cv
            "Luck is the residue of good design."