3 Replies Latest reply on May 15, 2006 4:37 AM by aniebel


      I am creating dynamically the following text filed (see script). I want flash to embed the font but it is not doing it. When I set the "embedFonts" command to TRUE the text doesn't come up when I rollover the buttons that send dynamically the text variable to the text field.

      Right now it works but the font that comes up it is arial and it is too big and doen't brake toa third line, in other words: the user can't see the total label of some products.

      What can I do to make flash embed the fonts I want?

      Thanks a lot.

      background = false;
      html = true;
      multiline = false;
      selectable = false;
      type = "dynamic";
      wordWrap = true;
      restrict = null;
      embedFonts = false;
      var labelStyle:TextFormat = new TextFormat();
      font = "Univers LightUltraCondensed";
      size = 15;
      color = 0x989289;
        • 1. embedFonts
          I see that you want to do this dynamically. I too am trying to write a dynamic script. (see: Just a litte syntax help)
          I'm struggling to learn actionscript, but I have embed fonts via the interface.

          Select your Dynamic text field(s).
          On the title bar of your Library panel, click the right side graphic (the options menu).
          Select "New Font"
          Then fill in the blanks of the dialog box
          • 2. Re: embedFonts
            Level 7
            > I'm no good at actionscript, but there is a way to embed fonts via the
            > interface.

            No - the OP states they are creating the text field *dynamically*.

            Gleik - this line of code:

            embedFonts = false;

            Should be:

            embedFonts = true;

            You will also need to assign the font to the textfield. To do this you need
            to insert a font in your library ('New font' from the drop down list top
            right of library panel), and set the 'font' property of your TextFormat
            object to the name you give the font.



            Remove '_spamkiller_' to mail

            • 3. Re: embedFonts
              aniebel Level 2
              gleik, if what Peter recommended does not work still, try saving the text file encoding as UTF-8. I ran into the same problem awhile back and I don't know if it's a glitch or not but it only started working properly once I saved the file that way. I had done everything else correctly except that.

              Another way I've "cheated" in the past to ensure that my problem has not been with embedding a dynamic text field was to type out all the characters of the alphabet in a static text field, position it off stage and embed that. This way you can try to figure out the problem may be occurring. It's kind of a clumsy way of doing it but it's a temporary and sure way to know that your characters will be there.