PDA

View Full Version : 16 numbers generated in a row



swed
February 11th, 2003, 04:51 PM
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:

Guig0
February 11th, 2003, 05:19 PM
[EDIT] way better solution below ;)

sbeener
February 11th, 2003, 05:41 PM
this'll work too:


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