A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Applying embedded characters to a textfield created with actionscript

  1. #1
    Senior Member
    Join Date
    Sep 2005
    Location
    Gothenburg, Sweden
    Posts
    357

    Applying embedded characters to a textfield created with actionscript

    Hello

    Im having troubles embedding my textfield created dynamicly.

    I tired with:

    ldr.createTextField("inf", 3, 0, 20, 350, 14);
    ldr.inf.multiline = false;
    ldr.inf.wordWrap = false;
    ldr.inf.border = false;
    ldr.inf.html = false;
    ldr.inf.type = "input";
    ldr.inf.embedFonts = true;
    ldr.inf.selectable = false;
    ldr.inf.background = false;
    ldr.inf.textColor = 0xFFFFFF;
    ldr.inf.autoSize = "center";
    ldr.inf.text = "0 %";
    myTF = new TextFormat();
    myTF.font = "arial";
    myTF.size = 11;
    myTF.bold = true;
    ldr.inf.setNewTextFormat(myTF);
    /xzerox... Take a look at http://www.vmgcomputers.com/h75

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    The embedFonts property of a dynamic textfield only means that it should be rendered using an embedded font. It doesn't embed the font.

    To embed a font, you need to create a dynamic textbox using the gui and embed the characters you need. The textbox can be placed off stage if you want to use the font in another textbox that is created using actionscript.
    Make sure you are using the same font for the actionscript created textbox as the one you embed in the swf file.

  3. #3
    Senior Member
    Join Date
    Sep 2005
    Location
    Gothenburg, Sweden
    Posts
    357
    thanks... i've get it now
    /xzerox... Take a look at http://www.vmgcomputers.com/h75

  4. #4
    Senior Member
    Join Date
    Sep 2005
    Location
    Gothenburg, Sweden
    Posts
    357
    Quote Originally Posted by w.brants
    The embedFonts property of a dynamic textfield only means that it should be rendered using an embedded font. It doesn't embed the font.

    To embed a font, you need to create a dynamic textbox using the gui and embed the characters you need. The textbox can be placed off stage if you want to use the font in another textbox that is created using actionscript.
    Make sure you are using the same font for the actionscript created textbox as the one you embed in the swf file.
    I didn't get it to work... even if i used the same font... could you perhaps give me a sample file?
    /xzerox... Take a look at http://www.vmgcomputers.com/h75

  5. #5
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    See attachment (created using KM 5.7.5).
    Attached Files Attached Files

  6. #6
    Member
    Join Date
    Dec 2005
    Location
    Utah
    Posts
    98

    [KM7-AS3] Embed fonts revisit

    With AS3 and KM7, is this still the only way to embed fonts in fields created on the fly? I've implemented it and it works, but I'd rather not have extraneous fields.

    Quote Originally Posted by w.brants View Post
    The embedFonts property of a dynamic textfield only means that it should be rendered using an embedded font. It doesn't embed the font.

    To embed a font, you need to create a dynamic textbox using the gui and embed the characters you need. The textbox can be placed off stage if you want to use the font in another textbox that is created using actionscript.
    Make sure you are using the same font for the actionscript created textbox as the one you embed in the swf file.

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