I have a dynamic text field that indicates the degree of rotation of a knob. I
need the display to have three digits showing at all times. This means I need
leading zeros from 0 to 99. ie, 000, 001, 002, etc.
Is there a way to do this numerically or do I have to change the numbers to
strings and concatenate??
Thanks,
Rothrock - 07 Oct 2008 04:22 GMT
Yes, for the most part only strings can start with leading zeros.
You might run into some troubles because Flash treats a leading zero as a sign
that a number is octal, base-8.
So if you were planning on using Number() to cast your values into numbers,
don't! Instead use parseInt(someString,10).
logeye - 07 Oct 2008 13:30 GMT