I recently upgraded to Adobe CC from Adobe CS6, and none of my text is showing in my Flash Professional project anymore. It contains a lot of dynamic text and htmlText. I'm not quite sure if I was doing it properly before, as I read several guides that explained different methods, but at least it was working.
I've had some success in trying to fix everything, but I would appreciate it if anyone could tell me the proper way to do it with Adobe CC. Here's how I'm trying to do it now.
- Add the font to the library, check the "Export for Actionscript" box, and assign a class name.
Create an instance of the font and the bold and italic versions:
var myFont:Font = new MyFont(); var myFontBold:Font = new MyFontBold(); var myFontItalic:Font = new MyFontItalic();
Set up the textFormat:
var myTextFormat:TextFormat = new TextFormat(); myTextFormat.font = myFont.fontName;
Set up the textField and apply the textFormat:
var myTextField:TextField = new TextField(); myTextField.defaultTextFormat = myTextFormat;
This will get the text to display, but if I try putting bold or italic tags in my htmlText, neither of them work.
myTextField.htmlText = "This is <b>bold</b>. This is <i>italic</i>.";
Also, do I need to do Font.registerFont anymore? I had that in my previous code, but I was never sure why I needed it.