Search code examples
actionscript-3apache-flexflex3flexbuilder

Convert Binary String to Unsigned int in Flex3?


I am using Flex builder with sdk 3.5. I want to convert binary string to unsigned int. How can I do this? Thanks


Solution

  • The second parameter of parseInt is the radix.

    var n:int = parseInt("1010", 2);
    trace(n);