to sort this out, you could roll your own string manipulation functions or there's a neat little static function built into the Number object called toFixed, see the docs: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Number.html#toFixed()
you use it like this...
var num : Number = ( 11995 / 1000000 );
var num2 : Number = num * 1000;
var str2 : String = num2.toFixed( 6 );
var num3 : Number = new Number( str2 );
...easy!
No comments:
Post a Comment
The internet is a crazy place so please help us keep it under control by leaving only relevant messages and comments, thanks a bunch! :m)