5 Replies Latest reply on Feb 4, 2008 4:06 PM by robdillon

    Adding Text

    KevinGDog
      Hello,

      I'm trying to add a function to a file that would allow you to add, edit and change font style in an SWF. The function would be basically a text editor like in any image editing software but it needs to be used by a user in an swf. I have seen it done in different swf before. Does anybody have an idea or link to some help?

      Thanks!
        • 1. Re: Adding Text
          robdillon Most Valuable Participant
          If you want your user to add text to text that exists, then the existing text needs to be a dynamic textfield, and the user text needs to be, of course, an input textfield.

          You make multiple fonts available by importing fonts into your movie's Library and then setting them to be exported.

          To change any property of a textfield, you can set up a series of TextFormat objects that you can apply to the textfield.
          • 2. Re: Adding Text
            KevinGDog Level 1
            Thank you for the response, but I am not trying to edit already existing type. I need to add type to the swf, be able to do basic edits to it. Much like adding new type in Photoshop.

            Also, how do you add a font to the library and set it to export?
            • 3. Re: Adding Text
              ChrisElmes
              Checkout:

              createTextField

              in the language Reference, it will let you programatically add text fields to a movieClip.
              • 4. Re: Adding Text
                KevinGDog Level 1
                Thank you, But this is not editable.

                This is what I am looking to do.

                www.scrapblog.com
                • 5. Re: Adding Text
                  robdillon Most Valuable Participant
                  Open the Library window. Select the contextual menu in the upper right corner of the window. Select New Font... From this new window, you can select any available font on your computer to embed in the Flash movie. Once you have the font in your Library. Right click on it. Select the Linkage... option. Set the font to be exported for actionscript. That font will now appear in your fonts list. You can also specify it to be used for any textfield in the movie.