Hello, txt.embedFonts = true; it doesen’t work, gives me back empty textfield. How to fix this?
package {
import flash.display.*;
import flash.text.*;
import flash.system.*;
import flash.xml.*
import flash.events.*
import flash.utils.*;
//greensock
import com.greensock.*;
import com.greensock.plugins.*;
import com.greensock.easing.*;
public class Main extends MovieClip {
private var txt:TextField = new TextField();
private var txtFormat: TextFormat = new TextFormat( "Verdana", 11, 0x333333);
public function Main() {
//stage
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
System.useCodePage=true;
//textfield
txt.defaultTextFormat = txtFormat;
txt.autoSize = TextFieldAutoSize.LEFT;
txt.antiAliasType = AntiAliasType.ADVANCED;
txt.gridFitType = GridFitType.SUBPIXEL;
txt.multiline = true;
txt.wordWrap = true;
txt.border = true;
txt.selectable = true;
txt.embedFonts = true;
txt.width = 300;
txt.height = 200;
txt.htmlText = "Hello world!";
addChild(txt);
//align
txt.x = stage.stageWidth/2 - txt.width/2;
txt.y = stage.stageHeight/2 - txt.height/2;
}
}
}
Thanks