A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: Using Japanese Characters in a string

  1. #1
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784

    Using Japanese Characters in a string

    I am currently struggling with this problem. I want to add Japanese characters to a variable and then display them in a text-box dynamically. At first I when I pasted the characters into the actions panel as a string variable they just showed up as little boxes. I changed the actions panel default font to one of the japanese fonts and then I was able to see the characters in the actions panel. When I run the movie however, the characters do not show up in the text field. Does anyone know how to work with this?
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  2. #2
    Style Through Simplicity alillm's Avatar
    Join Date
    Mar 2004
    Location
    Wales
    Posts
    1,988
    hmm, I can't see why it wouldnt work. Each key on the keyboard has a corosponding hiragana symbol right? so providing you typed the correct sequence of letters for the string, they should be shown correctly when using a japanese font in a dynamic text box.

    So if the string was "lg", then the japanese dynamic text box would show the japanese for 'cat'

    I'm not sure if this is what you are trying to do though, but I don't get why you would want the actual variable to be in japanese?

    Ali

    [EDIT]
    Actually the example I gave might not be right, I just took a look at a pic of a Japanese keyboard, and the Japanese font I have doesn't match up with it, but if you have one that does, then it should work.
    Last edited by alillm; 03-03-2007 at 12:11 PM.

  3. #3
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Well, when I use Japanese, I just type in romaji and it gets converted to kana as I type. Definitely doesn't map a kana chart to my keyboard, like alillm seems to be saying.

    LostGuru, perhaps embedding fonts in that text box might help (make sure the text box is a Japanese font, too). Embed all characters just to be safe.
    http://www.birchlabs.co.uk/
    You know you want to.

  4. #4
    Style Through Simplicity alillm's Avatar
    Join Date
    Mar 2004
    Location
    Wales
    Posts
    1,988
    Sorry yea, that’s what I get for skim reading. I thought we were talking about using Japanese fonts (as in a Japanese font that just works like any normal font).

    Yes you’re right, you don’t have symbols mapped to keys for normal typing in Japanese. What you are doing should work though, I don't think embedding would make any difference (unless if you are testing in the browser), but yes, make sure you are using a Japanese font, that’s the only problem I can think of. This might have nothing to do with it being Japanese though, on my last project, embedding fonts stopped all text from showing and I never found the solution.

    Ali

  5. #5
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    and of course saving xml, txt,... files as unicode format but I guess that goes without saying esspecially for the ones who´s country language isn´t easy english

  6. #6
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    Thanks for the help. I accidently stumbled upon a solution. If I put the characters I am using, in a static text file on the first frame, then they will show up in the dynamic text box. I am now struggling with something else. Is there a quality setting in flash? How do I set it to high? When you import something is there a way to import it in top quality? When you export a swf, is there a way to do it in top quality?
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  7. #7
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    _quality="BEST" (4x anti alias steps + bitmap smoothing)
    or
    _quality="HIGH" (4x anti alias steps)

    the quality is set as a global value so you cant set it independent. But maybe you mean by quality the textfield wich is set to selectable or hasn´t embedded any font or simply is set to bitmap- font rendering

  8. #8
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    There should be some anti-aliasing settings for the text box, just select it and look in the Properties panel.
    http://www.birchlabs.co.uk/
    You know you want to.

  9. #9
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    isn´t that the font rendering method?- it´s not a perse a quality thing it depends on what you need (LCD optimized, motion, bitmap,...)

  10. #10
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    The _quality = "Best" is what I was looking for. Thanks
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  11. #11
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    I just type in romaji and it gets converted to kana as I type
    Wow, youngsters these days are getting so multicultural..

  12. #12
    Style Through Simplicity alillm's Avatar
    Join Date
    Mar 2004
    Location
    Wales
    Posts
    1,988
    I blame the food industry...

    Seriously though, its surprising how many people here actually know, or are learning Japanese!

    Ali

  13. #13
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Quote Originally Posted by EvilKris
    Wow, youngsters these days are getting so multicultural..
    Just in case that was sarcasm, I'd like to point out that the only way for me to actually type directly as kana is to click buttons on a kana chart. Very slow!
    http://www.birchlabs.co.uk/
    You know you want to.

  14. #14
    Zombie Coder EvilKris's Avatar
    Join Date
    Jun 2006
    Location
    Fukuoka, Japan.
    Posts
    796
    Seriously though, its surprising how many people here actually know, or are learning Japanese!
    Well in my case it wasn't a hobby, I studied it in University and sort of drifted around the world and ended up here and then the lingo started to become second nature after a number of years. But yeah, like you I'm amazed when 'normal' folk know all these words like 'otaku', 'hentai', 'sugoi', 'ai****eru' and all that. I'm not saying I'm an old fart or anything, but when I was that age it went about as far as 'konnichiwa'.

    So, no sarcasm here Vengeance, just astonishment.

    p.s.if you want to write in Japanese, use Microsofts Japanese Global IME.

  15. #15
    Style Through Simplicity alillm's Avatar
    Join Date
    Mar 2004
    Location
    Wales
    Posts
    1,988
    Quote Originally Posted by EvilKris
    p.s.if you want to write in Japanese, use Microsofts Japanese Global IME.
    Yea, that’s what I use, but for some reason, I can't get it to work in word which isn’t too helpful!

    Ali

  16. #16
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Quote Originally Posted by EvilKris
    p.s.if you want to write in Japanese, use Microsofts Japanese Global IME.
    Using a Mac here, I think that's Windows software? Besides, the 'International' settings give me a system-wide as-you-type romaji to kana converter which I can toggle on/off with a quick keystroke. Also got a system-wide kana palette, but that's button-based.

    We learn those words from Naruto and Megatokyo.
    http://www.birchlabs.co.uk/
    You know you want to.

  17. #17
    Heli Attack! iopred's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Posts
    923
    Quote Originally Posted by TheLostGuru
    Thanks for the help. I accidently stumbled upon a solution. If I put the characters I am using, in a static text file on the first frame, then they will show up in the dynamic text box. I am now struggling with something else. Is there a quality setting in flash? How do I set it to high? When you import something is there a way to import it in top quality? When you export a swf, is there a way to do it in top quality?
    You can do without this by clicking the little 'add' button in the library, and say "New Font", and add the font you're using, name its linkage whatever you use as the font name for the textfield.
    Christopher Rhodes
    squarecircleco.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center