View Single Post
  #1 (permalink)  
Old 07-17-2007, 12:37 AM
kbala kbala is offline
D-Web Trainee
 
Join Date: Mar 2007
Posts: 5
kbala is on a distinguished road
Lightbulb Decimal to any number system

hey!...

its very simple to get the binary value of a number in flex. i really wonder of this features in flex.

var n:Number = 8;
Alert.show(n.toString(2));

it returns 1000;

Same way:
To convert octal number, Alert.show(n.toString(8));.

To convert Hex number, Alert.show(n.toString(16));.


its very simple and will be very user full when you are working with maths oriented functionality


Thanks

KBala

Last edited by kbala : 07-17-2007 at 12:39 AM.
Reply With Quote
Sponsored Links