16 numbers generated in a row

Hi there!

See if someone is capable to help me with this…

I want 16 numbers generated in a row, like a credit card

3456 6765 4564 3453

Is there a good way to do that? Am not that familiar with actionscript So a source file would be helpful to understand, the card would generate The numbers when it’s loaded.

This is a tuff nut to crack for me, but for someone out there it may be easy

Thanks Swed
:q:

[EDIT] way better solution below :wink:

this’ll work too:


function makeCreditCardNum(){
	var i,n = '';
	while(i++ < 19){
		n += i%5 ? random(10) : " ";
	}
	return n;
}