Groups | Blog | Home
all groups > flash data integration > september 2005 >

flash data integration : Foreign Language Dynamic Text


pluviosilla
9/17/2005 6:52:58 PM
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");
PK
9/25/2005 7:32:15 AM
Hi:

I use:

System.useCodepage=true;

On the first line of the first frame.

Philipp Knetemann
Developer/Webmaster
http://www.SpanishOnPatrol.com
Spanish For Police, Fire, Emergency Personnel, and Law Enforcement


[quoted text, click to view]

AddThis Social Bookmark Button