Topic: How to display Chinese character in Flash using XML?? (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=27609" title="Pages that link to Topic: How to display Chinese character in Flash using XML?? (Page 1 of 1)" rel="nofollow" >Topic: How to display Chinese character in Flash using XML?? <span class="small">(Page 1 of 1)</span>\

 
Ksabriel
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Mar 2006

IP logged posted posted 03-07-2006 15:01 Edit Quote

I'm currently developing a site that has a flash front-end that's being populated with XML. All of the text content, links, and images are being defined by the XML. The site is going to be in English, French and Chinese. All these other languages can be read in flash using ISO8859-1, except for chinese. I read the technote on macromedia about flash not supporting UNICODE which I need to be able to display chinese characters.

I've tried to change the encoding on the XML file, embedding the font into the fla. File. But it still display incorrectly.
It only shows the Chinese character once I click the menu, otherwise it shows nothing, and the font seems to have changed.

I use this encoding on my XML
<?xml version="1.0" encoding="GB2312"?> for simplified chinese.

embedding the font and change the font that i use to Hei (chinese font), and i made some progress here.
the chinese character can be displayed BUT only when you click on it... otherwise it shows nothing...

so please help... any good samaritans out there?

thank you
kalyan sabriel

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

IP logged posted posted 03-07-2006 18:06 Edit Quote

i can only confirm that flash does not support unicode.

what exactly do you mean by the font shows up when you click on it? can you show us an example of your work in progress?

what version of flash do you use? in some older versions you had to embed the font for every textfield in your flash movie.

Ksabriel
Obsessive-Compulsive (I) Inmate

From: paris - shanghai
Insane since: Mar 2006

IP logged posted posted 03-10-2006 16:42 Edit Quote

oh i solved the problem.... i succesfully managed to show chinese character in flash using XML. here's what i did:


- I changed the encoding in the XML file from UTF-8 to GB2312 for Chinese character

- I changed the fonts to Chinese specific fonts and embed the character to the FLA file. The only drawback is that it increases the number of glyphs from 127 to nearly 14,000 hence it yileds to a bigger file size (from 230Kb to nearly 2.5MB --> because there are two text fields where I need to change the fonts and embed them).

Apparently I cannot just embed the font only once (I thought this would apply for the rest of the FLA but it's not). -->So for each section where you want to display and use Chinese character you have to change the font to Chinese typeface and embed it again... this apply for each text field. So go figure, how big the file is gonna be!

- and then, in the movie clip where the text field is showing, I insert a Boolean value in the first line before the loadVariables section...
And here's what I used:
System.useCodepage = false;

At first I set the value to TRUE and it displayed the character incorrectly so I change it to FALSE because when the property is set to FALSE, Flash player will interprets external text file as Unicode. --> this why you should embed the fonts...

et voila...!!
now i can easily update the content just from the XML file...

bon...
ce soir je peux dormir mieux... ! !

merci beaucoup et tres bientot...
kalyan.sabriel

i love mankind, it is people that i cannot stand.

Ksabriel
Obsessive-Compulsive (I) Inmate

From: paris - shanghai
Insane since: Mar 2006

IP logged posted posted 03-10-2006 16:48 Edit Quote

oh BTW... I use Flash 8 professional.

i love mankind, it is people that i cannot stand.

asborkar
Neurotic (0) Inmate
Newly admitted

From:
Insane since: May 2009

IP logged posted posted 05-19-2009 03:23 Edit Quote

Finally, did any one find a solution to resolving the size of the swf file that uses Chinese Embedded characters?
I'm having a file that I changed to show Chinese characters, it has grown from 500KB to 12MB....
SOS... I need help!!!

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

IP logged posted posted 05-19-2009 11:37 Edit Quote

Use a sane API and this wouldn't be a problem.

nancy0725
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2009

IP logged posted posted 08-12-2009 05:21 Edit Quote

edit tp: spam deleted

(Edited by Tyberius Prime on 08-12-2009 09:49)



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu