View Full Version : Need help pleaseeee
nikolas1984
April 9th, 2009, 10:59 AM
how to write japanese character using unicode if i read the unicode data ("\u3042") from XML?because i only can write it using :
var str:String="\u3042";
trace(str);
its work, but if i read it from xml and write it, it's not work..
please help me..thank for your attension
Swooter
April 9th, 2009, 11:16 AM
Even if you trace() it from the XML?
Do you use 'html = true' and 'htmlText = ' on the textfield?
nikolas1984
April 9th, 2009, 12:02 PM
i already try it but as i say, the output is.. example: in xml : "\u3042" and if i trace it, the output is "\u3042"..
what is that?
i dont know about 'html = true' and 'htmlText = ' on the textfield..
please help me because i'm new using actionscript 3.. thanks
wt345
April 11th, 2009, 04:04 AM
I would describe briefly the jobs to plug them in. I did that by java codes.
Step 1:Fetch font glyphs shape data
Switch system code page to Japanese. Create a movie to embed "all characters" of a selected Japanese font. This swf contains 11441 characters and is 1.6 MB in size. For some reason, it includes Chinese characters in it.
Switch system code page to French. Create a movie to embed "all characters" of a selected French font (Arial). This swf contains 244 characters.
These SWFs are published without compression.
Step 2: Create main movie. Publish it without compression.
The text file to be include contains:
//!-- UTF8
str="<FONT FACE='jp_font'>映画はなんですか</FONT>\nIt is <FONT FACE='ch_font'>電影</FONT>in Chinese,\n<FONT FACE='french_font'>le cinéma</FONT> in French";
txt.htmlText=str;
I include a source file by #include.
Step 3: I write java codes to do jobs below:
Parse main SWF to get the original size and the file offset after SWF Header.
Parse the Japanese SWF to get CodeTable, OffsetTable of that font.
Compare my characters with CodeTable and fetch out the shape glyphs from OffsetTable
Construct defineFont2 block
Write this defineFont2 block into the main Movie.
May repeat the same procedures for French Font.
I hope it will work for you.
nikolas1984
April 12th, 2009, 02:30 PM
ok.. i will try it first...
thanks for your help..:angel:
DFdou
April 13th, 2009, 12:32 AM
maybe you need use system.useCodepage = true; in your actionscipt,and set your xml encoding="your code"=)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.