Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding particular characters in a text loaded from a .txt file 1

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hi all of you guys! ... it's been a while.

I came across this problem...I have a simple flash movie that only loads some text from a .txt file.

The code used on the first frame of the movie (instance name of the dynamic textfield: <i>title</i>; name of the .txt file: <i>test.txt</i>; variable name from the .txt file: <i>var1</i>):

-----------------------------------------------
loadVarsText = new LoadVars();
loadVarsText.load("test.txt");
loadVarsText.onLoad = function (success){
if (success){
title.text = this.var1
}
}
-----------------------------------------------

The content of the .txt file:
var1=Conosamentul completeaz? c?r?u? vânz?torul

The problems appear with these characters: ?, ?, â

Thanks a lot!

Regards,
Dragos.


 
Seems like even this forum engine doesn't supports these characters :-(

Eventhough you can realize what is the problem...

Regards,
Dragos.


 
Thanks for your reply oldnewbie!

I read all the support from Macromedia regarding multilanguage text reading and get across that document too.....but I have found a solution that I think is more easier ... I have made another dynamic text box outside the stage and I have filled it up with all the characters that didn't appear. After that I have clicked the Autofill button under Character tab (Window> Propreties > Character) for embedding these characters...and everything works fine.

If somebody can find another solution that isn't so improvised like mine pls share it.


Regards,
Dragos.


 
Usually URL encoding will be all you need but I've had problems like this before trying to display Greek and Russian characters while don't have URL encoded equivalents.

There are a couple of things to consider:

1) The font itself might not include the characters you need so there's no way to display them.

2) If it does you need to either save the text file as Unicode or set your Flash movie to read the system's language setting and pick up the right character sets.

If the font contains the characters you need then this link should help with the second part:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top