Hello,
I’m loading an external .txt file into a .swf. Everything is working well but the text is not formatting the way I want it to. I want to use the font “Futura” and I want to resize the text.
Thanks for any help you can give me!
var company_txt:TextField = new TextField()
//var companyReq:URLRequest = new URLRequest(“loadMovie/txtFiles/company.txt”);
var companyReq:URLRequest = new URLRequest(“txtFiles/company.txt”);
var companyLoad:URLLoader = new URLLoader();
var companyFormat:TextFormat = new TextFormat();
companyLoad.load(companyReq);
companyLoad.addEventListener(Event.COMPLETE, textReady);
company_txt.x = 100;
company_txt.y = 200;
company_txt.border = true;
company_txt.width = 600;
company_txt.height = 300;
company_txt.wordWrap = true;
addChild(company_txt);
function textReady(event:Event):void
{
company_txt.text = event.target.data;
}
companyFormat.font = “Futura”;
companyFormat.color = 0x000000;
companyFormat.size = 24;
company_txt.setTextFormat(companyFormat);