Ali Ahmed
Ali Ahmed

Reputation: 1839

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

Upvotes: 0

Views: 1152

Answers (1)

taskinoor
taskinoor

Reputation: 46027

The second parameter of parseInt is the radix.

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

Upvotes: 8

Related Questions