Page 1 of 1

timeToCurrentFormat = less digits?

Posted: February 3rd, 2011, 3:39 pm
by Simma
I use the timeToCurrentFormat to get the frame numer at the current time. Later on I use that information when naming layers and so on. At the moment when I rename layers with that information they get named something like "FreezeFrame_000021", but I would like to have it named "FreezeFrame_21" instead. Anyone have any suggestions to this?

Re: timeToCurrentFormat = less digits?

Posted: February 3rd, 2011, 5:13 pm
by lloydalvarez
Parse the number before appending it to the name. You can either use parseInt() or parseFloat(). There's lot of info online about both functions.

-Lloyd

Re: timeToCurrentFormat = less digits?

Posted: February 4th, 2011, 2:44 am
by Simma
Thank you Lloyd, worked perfectly :).