Format Number as Currency

Just had the need to format some numbers into different currencies the other day so I made a simple, generic function to do the trick.
Example:
var dollars:String = "$" + currencyFormat(343769.5);
var euro:String = "€ " + currencyFormat(150, 2, ".", ",")
var nok:String = currencyFormat(10500, 2, ".", ",") + ",-"
 
trace(dollars) // $343,769.50
trace(euro) // €150,00
trace(nok) // 10.500 ,-
source:
function currencyFormat [...]

No Comments »

Anti Sweden Web

I have really had a lot of things going on both at work & at home for the last couple of months, which has resulted in no posts at all since June. Pretty lame stuff! Anyways! One of the projects I have been working on is the Anti Sweden website, which was launched just a [...]

No Comments »