A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: String to HEX number ???

  1. #1
    Junior Member
    Join Date
    Sep 2000
    Posts
    18

    Unhappy

    Hi,

    I have an input text box where the user enters an HEX color value like : 44CCFF

    How do I transform this String to an hex number ? I would like to assign this value to a movie :

    myColor.setRGB(0x44DDFF);

    And what does the "0x" mean ???


    Thanks !!!
    Stan


  2. #2
    Senior Member
    Join Date
    Feb 2001
    Posts
    475
    hi
    the 0x defines that this number is a hexadecimal value.
    to convert a string form Hex to Dec use the function:

    decimal = parseInt (hexString, 16);

    look it up in the AS dictionary for more info
    Yours
    HTD

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