0
votes

How to enable special characters in var txt:TextField = new TextField(); in action script 3.0.

var tf:TextFormat = new TextFormat();
tf.font = "Verdana";
            tf.size = 12;
            tf.bold = true;
            tf.align = "left";
var txt:TextField = new TextField();
            txt.text = _label;
            txt.embedFonts = true;// this is necessary but one more step is required

            txt.autoSize = TextFieldAutoSize.LEFT;
            txt.antiAliasType=AntiAliasType.ADVANCED;
            txt.multiline = true;
            txt.selectable = false;

            txt.setTextFormat( tf );

I embedded the "Verdana" font in ma fla named "Verdana". But my issue is the text filed is not showing the

äÄéöÖüÜß

How can i embed in codes, i dont use the text filed from the component library. everything was created only through action script 3.0 code.

1

1 Answers

1
votes

If using flex (ie. flashdevelop), http://developer.yahoo.com/flash/articles/runtime-fonts-as3.html

If using Flash, just copy and paste the symbols into an embed dialogue on a textfield stage and all of the textfields with embedFonts = true created through code will be able to use those.