A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: embedFont question

  1. #1
    still learnin'
    Join Date
    Oct 2002
    Location
    la la land
    Posts
    71

    embedFont question

    i have a problem with using embedded fonts in a swf. See, what happens now is that when there are both author time created textfields and textfields generated via script, the text in the generated textfields do not appear at all while the manually created textfields display text just fine.

    when i take away the author time textfields, the embedded fonts are used to display text.

    anyone knows how to get around this?

    Rich Media Developer
    Full Time Poser
    Really Complex and Pretentious Acronym for Higher Learnin' (MBA, WTF, OMG, PHD)
    www.unconsciouscollektiv.com

  2. #2
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    What is the code you are using to create your textfields? Are you embedding the font when creating the fields or when setting the format?.....

    code:

    _root.createTextField("mytext",1,100,100,300,100);
    mytext.multiline = true;
    mytext.wordWrap = true;
    mytext.border = false;
    myformat = new TextFormat();
    myformat.embedFonts = true;
    myformat.color = 0xff0000;
    myformat.bullet = false;
    myformat.underline = true;
    myformat.font = "Balloon";
    mytext.text = "Test text for a dynamically created textfield";
    mytext.setTextFormat(myformat);




    NTD
    Last edited by NTD; 06-27-2004 at 05:37 AM.

  3. #3
    still learnin'
    Join Date
    Oct 2002
    Location
    la la land
    Posts
    71
    hi NTD,

    the embedFonts property is set during the textfield creation. I've created a font symbol and set it to export in the first frame and for actionscript.

    in the textformat object that's to be applied to the textfield, i used the font symbol's identifier (eg, verdana) like so =>

    code:

    //code excerpt
    newFormat = newTextFormat();
    newFormat.font = "verdana";


    Rich Media Developer
    Full Time Poser
    Really Complex and Pretentious Acronym for Higher Learnin' (MBA, WTF, OMG, PHD)
    www.unconsciouscollektiv.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center