Space between numbers/integer

I’m doing a calculator and need help with making space between every third number, ie make 1000000 look like 1 000 000. It has to work dynamically, so if the result is 10000 it should show 10 000.

I’m doing a flash 5 movie.

I guess it’s classic programming, but I’m not so good at that.

Does anybody have a clue?

  • bobo