-
text bold & rotation
I am trying to make this imported text bold but it does not work:
I also want to rotate the text but when I do the text could not be seen.
Here the code I am working on:
PHP Code:
/////
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
//////
this.createTextField("my_txt", 10, 10, 10, 80, 100);
my_txt.setNewTextFormat(new TextFormat("Arial",12,0xCC6600));
my_txt.autoSize = "left";
my_txt.border = false;
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt._height = 100;
my_txt._rotation = 0;
my_txt.setTextFormat(my_fmt);
var lorem_lv:LoadVars = new LoadVars();
lorem_lv.onData = function (src:String):Void {
if (src != undefined) {
my_txt.text = src;
} else {
my_txt.text = "Unable to load external file.";
}
}
lorem_lv.load("skylt1.txt");
-
1 Attachment(s)
hi,
In order to have Bold and rotate the font, you need to embed it, therefore it should be in the library.
Here's an example.
-
Thanks, now it works and I have learned this.