Oops! I forgot to embed it in CS5.5.
I also created a class "Kids" (Text -> Font Embedding -> ActionScript), and removed the Embed statement from the code.
I write the following code to set up the messageArea:
private var kidsPlainFont:Font = new Kids();
private var textFormat:TextFormat;
private var messageArea:TextField;
textFormat = new TextFormat();
textFormat.font = kidsPlainFont.fontName;
messageArea.defaultTextFormat = textFormat;
addChild(messageArea);
Again, it works on the desktop but does not work on the Android device. What am I missing?
When you input text in a text field, the runtime positions a native text input control over the Flash TextField object. Since native controls can't use embedded fonts, the closest system font is used. On Android (but not iOS) you can use TLF to create a text input control that is entirely drawn in Flash and thus can use embedded fonts during input. (I'm not sure if the Flex components support this on mobile, though, so you might still have to make your own if using Flex.)