3 Replies Latest reply on May 25, 2010 5:42 PM by GordonSmith

    how to use unicode in flex?

    r.saran

      hi all,


      i am using flash builder 4,

      now i am designing virtual keyboard in hindi..

      i dont know how to use unicode in program..

      if anyone aware of this please reply me.


      thanks in advance............



      regards,

      saran r

        • 1. Re: how to use unicode in flex?
          Karl_Sigiscar_1971 Level 3

          You don't have to do anything special to use Unicode in Flex. It's handled by the Flash Player.

           

          If you use an embedded font however, you can reduce the Unicode character range embedded in order to save some kilobytes.

          • 2. Re: how to use unicode in flex?
            r.saran Level 1

            hi sir,

            thanks,

            is there any sample code for virtual keyboard using unicode?

             

            regards,

            saran r

            • 3. Re: how to use unicode in flex?
              GordonSmith Level 4

              Here's the general idea:

               

              <s:TextArea id="textArea"/>
              <s:Button label="A" click="textArea.insert('A')"/>

              <s:Button label="B" click="textArea.insert('B')"/>

               

              Skin the buttons to look pretty and arrange them in a keyboard shape.

               

              If you write your MXML in, say, UTF-8, using a Unicode-aware editor, such as the one in Flash Builder, you can just type Hindi characters in places of A, B, etc. Or you can use Unicode escape sequences (such as \u0900) inside of ActionScript strings to specify a Hindi character (such as U+0900), as in

               

              <s:Button click="textArea.insert('\u0900')"/>

               

              The Unicode values of each character are given at

               

              http://unicode.org/charts/PDF/U0900.pdf

               

              If Devanagari isn't the same as Hindi, please forgive me... I'm not an expert on Ithe various Indian languages. Google should be able to find a Unicode table for whatever language you need.

               

              Gordon Smith

              Adobe Flex SDK Team

              1 person found this helpful