Is it possible to load a foreign language in a .txt file??
Whenever I try all the foreign accents and characters are displayed as white
boxes. :(
I've tried embeding fonts which doesn't work either.
I included the actionscript code I tried using to load the txt file.
Thanks a lot
// Create text field.
this.createTextField("my_txt",10,0,0,526,548);
var m_font:TextFormat = new TextFormat();
m_font.font = "Times New Roman";
m_font.size = 12;
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.setTextFormat(m_font);
this.createClassObject(mx.controls.UIScrollBar, "my_sb", 20);
// Set the target text field for the scroll bar.
my_sb.setScrollTarget(my_txt);
// Size it to match the text field.
my_sb.setSize(16, my_txt._height);
// Move it next to the text field.
my_sb.move(my_txt._x+my_txt._width, my_txt._y);
// Load text to display and define onData handler.
var my_lv:LoadVars = new LoadVars();
my_lv.onData = function(src:String) {
if (src != undefined) {
my_txt.text = src;
} else {
my_txt.text = "Error loading text.";
}
};
my_lv.load("Resources/mission-statement.pdc");