So I have an annoying issue that I can't solve. I am creating an app in Flash Pro/AS3 for iOS. I have a button whose label font I want to change:
var ButtonTextFormat:TextFormat = new TextFormat("Showcard Gothic", 120);
//ButtonTextFormat.size = 120;
//ButtonTextFormat.font = "Showcard Gothic";
//ButtonTextFormat.embedFonts = true;
ButtonTextFormat.color = 0x00FF00;
//ButtonTextFormat.embedFonts = true;
SMButton.label = "PUSHME!";
SMButton.setStyle("textFormat", ButtonTextFormat);
I just used the standard button found in the Components Toolbox in Flash. It displays correctly during debug, but once loaded into the iPhone, the label is changed to a default font.
I did embed the desired font through Text>Font Embedding...
and it works for a text field that I have, but why not the button label?
I've tried ButtonTextFormat.embedFonts = true;
but I get an error:
1119: Access of possibly undefined property embedFonts through a reference with static type flash.text:TextFormat.
Any help would be appreciated. Thanks.
embedFonts property is for TextField class, not for TextFormat class.
Follow this instructions to embed and use your embeded font properly Embedding Fonts for Components in Flash