PDA

View Full Version : How to make glassMeter able to read Unicode languages?


lc8b105
04-10-2008, 04:38 AM
Hi,again,I have try to change the english text "... loaded" to Chinese character "载入" in the glassMeter.fla,But after make it to swf file,the Chinese character can't display,but the English character have no problem.
How can we do in the glassMeter.fla,then it can read Unicode character languages like Chinese?

Thanks in advance!

Chen Luo

lc8b105
04-12-2008, 08:45 AM
Still don't find a solution...

Panorado
04-13-2008, 07:48 PM
Chen, I do not have the "Real" Adobe Flash and therefore cannot know if this works or not... (I use SwishMax) but I do quite a bit of Japanese website building and instead of text I just create/make a picture of the Japanese Characters and if need be "target" it in SwishMax (so I can do what ever I want with it). I don't even think the "loading" is dynamic? just still text right? if it's just still text just make it a picture (transparent .png).

cheathamlane
04-13-2008, 11:53 PM
Panorado's idea of using images for the 'special' characters is a good one, especially if you have only a limited set to show.

I believe, though, that a user whose operating system/localization is set to Chinese should view the characters just fine.

--
One thing you can do is use the Chinese characters you want directly in your ActionScript as a string
(ie, var myText:String = "载入";).

You can also use the Unicode escaped sequence
(ie, var myText:String = "\u0048\u0049";)

You _should_ be able to load the Unicode escaped sequence from an external text file or source, so the Chinese characters could be available to you when you don't know what they will be.

HTH,

lc8b105
04-14-2008, 01:54 AM
Panorado and cheathamlane,thanks for your reply! :)
Panorado,your method is smart,thank you!
But I want to know more how to real show Chinese characters in flash,then I can do some dynamic text effects.

cheathamlane,I just begin to learn flash,about ActionScript,I nearly know nothing now.
I think Your method is more universal.But I don't know where to add "var myText:String = "载入";" and how to use the String above just defined. Would you like to show us an modified code as an example in the code of Denis's glassMeter.fla ?
thanks!

cheathamlane
04-14-2008, 03:05 AM
Hi Chen:

:)

If you're using the glassMeter "out of the box" then... Denis has played a little joke on you. ;)

If you doubleclick on the "meter" movieclip, and then click once on the "_txt" text field... Choose the "embed" button on the properties pane. Yoou will see that Denis has already prefilled the field for us. This will make it exclude other characters (although, it was the smart thing to do, to keep size down)!

I have added a couple lines to the glassMeter plugin.. hope it helps!

Cheers,

lc8b105
04-14-2008, 06:13 AM
Hi cheathamlane,sooooo many thanks!!! It's perfect!
The picture below is the final result,looks good!