Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Font problem?

New Here ,
Nov 30, 2009 Nov 30, 2009

I can't figure out why some fonts work and some don't. I need to have three different font choices for the dynamic text. I've tried many, many, many fonts and have only found two (Brady Bunch Remastered and Helvetica Neue) that will work. Does anyone have any advice? As a designer, I'm getting frustrated that I can't just use the fonts I want.

I've made sure to have the fonts in my Library. I tried using the Brady Bunch Remastered font for all three styles, just changing the font size and color and it worked.

Here is the code I have for my style buttons:

styleOne_btn.addEventListener(MouseEvent.CLICK, changeOne);
function changeOne(myevent:MouseEvent):void {
    certOutput_txt.embedFonts=true;
    var myTF:TextFormat=new TextFormat();
    myTF.color=0x4E4F25;
    myTF.font="Brady Bunch Remastered";
    myTF.size=40;
    certOutput_txt.setTextFormat(myTF);
}


styleTwo_btn.addEventListener(MouseEvent.CLICK, changeTwo);
function changeTwo(myevent:MouseEvent):void {
    certOutput_txt.embedFonts=true;
    var myTF:TextFormat=new TextFormat();
    myTF.color=0x000000;
    myTF.font="Agatha";
    myTF.size=36;
    certOutput_txt.setTextFormat(myTF);
}

styleThree_btn.addEventListener(MouseEvent.CLICK, changeThree);
function changeThree(myevent:MouseEvent):void {
    certOutput_txt.embedFonts=true;
    var myTF:TextFormat=new TextFormat();
    myTF.color=0x336699;
    myTF.font="Helvetica Neue";
    myTF.size=36;
    certOutput_txt.setTextFormat(myTF);
}

Thanks,

Laurie

TOPICS
ActionScript
657
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 30, 2009 Nov 30, 2009

your textformat looks ok, but how does your textfield look like, I mean how is it setup?

have you tried this variation?

http://marumushi.com/news/embedding-fonts-in-as3

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 30, 2009 Nov 30, 2009
LATEST

I have a dynamic text box with the instance name: certOutput_txt

The text box is definitely big enough for the size and amount of text to be put in it. I'm taking a class and part of what we are learning is how to bring fonts into the library to be used dynamically, so I have to do it this way.

I don't think it should matter, but I'm working on a Mac.

Thanks for the link. I will check it out for possible personal use later.

Laurie

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines