6 Replies Latest reply on May 31, 2006 9:58 AM by kglad

    String to HEX

    Level 7
      Doest anyone how to convert from string "RRGGBB" to hex to use on
      textformat. ".color"???


        • 1. Re: String to HEX
          Level 7

          parseInt("0x"+ RGB_string);


          "JimmySlam" <JimmySlam@hotmail.com> wrote in message
          news:e5he0d$7ke$1@forums.macromedia.com...
          > Doest anyone how to convert from string "RRGGBB" to hex to use on
          > textformat. ".color"???
          >
          >


          • 2. Re: String to HEX
            Level 7
            thanks !! i thought that woull be more difficult!



            "Raymond Basque" <NOSPAMrbasque@jednm.comNOSPAM> wrote in message
            news:e5hi5a$cmq$1@forums.macromedia.com...
            >
            > parseInt("0x"+ RGB_string);
            >
            >
            > "JimmySlam" <JimmySlam@hotmail.com> wrote in message
            > news:e5he0d$7ke$1@forums.macromedia.com...
            >> Doest anyone how to convert from string "RRGGBB" to hex to use on
            >> textformat. ".color"???
            >>
            >>
            >
            >


            • 3. Re: String to HEX
              kglad Adobe Community Professional & MVP
              you don't need to convert from a string to a hex number with flash's color methods. you can use "0x"+"RRGGBB" to assign a color.
              • 4. Re: String to HEX
                Level 7
                I get type mismatch errors is I assign a string on both Color and TextFormat
                objects;



                "kglad" <webforumsuser@macromedia.com> wrote in message
                news:e5hjqq$esm$1@forums.macromedia.com...
                > you don't need to convert from a string to a hex number with flash's color
                methods. you can use "0x"+"RRGGBB" to assign a color.


                • 5. Re: String to HEX
                  Level 7
                  True. or it doesnt work.


                  "Raymond Basque" <NOSPAMrbasque@jednm.comNOSPAM> wrote in message
                  news:e5hkot$fvq$1@forums.macromedia.com...
                  >I get type mismatch errors is I assign a string on both Color and
                  >TextFormat
                  > objects;
                  >
                  >
                  >
                  > "kglad" <webforumsuser@macromedia.com> wrote in message
                  > news:e5hjqq$esm$1@forums.macromedia.com...
                  >> you don't need to convert from a string to a hex number with flash's
                  >> color
                  > methods. you can use "0x"+"RRGGBB" to assign a color.
                  >
                  >


                  • 6. Re: String to HEX
                    kglad Adobe Community Professional & MVP
                    there's no mismatch with the string addition i showed and what doesn't work?