This should be pretty simple, but I haven't found a simple answer...
I have a directory of images in the format 001.png-999.png.
If I wish to click on a button to load the next file, how do I get the 0's padding into the name?
var locationString = "../Images/" + iCurrent + ".png";
Gives a file named - "1.png" where I need it to be "001.png"
(Basically the equivalent of Format(iCurrent, "000") in VB Script)