textfield.text not showing every characters
I have a setup a PageHolder class (based on MovieCLip) that displays a doted area with a (page) number in the middle.
Now attempting to populate my LayoutPane, I create new instances of of PageHolder whose constructor is tasked to set the text value of its only Texfield to the value specified in the new PageHolder parameter.
开发者_C百科The problem here is that only the character present in the Library Object will display at run time.
For example, I have setup my PageHolder object with a text field containing the number "0". Now at run time, every instance of PageHolder is blank except fro the one that I passed a "0" as part of the init parameter (10,20,30,...) and on those pages, only the "0" is showing. If I change the original object to display a "1" instead, then every "1" of the page number that contains a "1" show ups.
Can somebody shed some light on this?
package
{
import flash.display.MovieClip;
public class LayoutPage extends MovieClip
{
public function LayoutPage(page:uint)
{
pageNumber_txt.defaultTextFormat = pageNumber_txt.getTextFormat();
pageNumber_txt.text = String(page);
}
}
}
You may need to embed the font you are using for the text field.
Select the text field you have put in your PageHolder class and click the Embed button underneath the font family drop-down box, then check the item labeled 'Numerals[0..9]' and click OK.
精彩评论