-3

How can I have 1000 convert to 1k or 1200 to 1.2k? There's other solution for other programming language but I can't figure out how to make it work with AS3.

Or is there a shorter way to do it rather then if number > 1000 then make it 1k?

Hwang
  • 502
  • 1
  • 12
  • 32

1 Answers1

1

Couldn't you just do something like this

var numInK = bigNumber/1000 + "k";

Maybe you could throw in a Math.round or some other checks to avoid ridiculous numbers like 3.3333333K

Andrew Sellenrick
  • 996
  • 1
  • 6
  • 8