-
Is there an easy wasy to convert a number to a two-digit decimal place (currency - ie - $7.42). I figured that there is probably a very simple way to do this in Version 5 using the String Object. I just need to convert a number to currency format, or add $.00 at the end if it's a whole number.
Thanks,
mOnkEymAn
-
There have been better methods produced since I built this .. it's not completely extensible, but it provides for 2 outputs ... output1 for a floating point number formatted with commas, and output2 for currency formatting, complete with a dollar sign, commas and rounded to cents, with pad right in place as well:
invoked by:
formatNum(fullNum);
- with your input as 'fullNum' or yourVar referred to 'fullNum' (make sure it becomes a string somehow for input)
- and output as output1 and/or output2 vars
http://members.home.net/stringedinst...nFormatNum.swf
http://members.home.net/stringedinst...nFormatNum.fla
Richard
-
Thanks Richard! That should work perfectly!
Cheers,
mOnkEymAn
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|