Hi folks, need a bit of help with regards to showing the time in Flash, the movie I’m making looks like a news broadcast and I am going to be displaying the time (hours and minutes) in two separate dynamic text boxes named ch and cm. The problem that I am having is that when, for example the time is 5 past 2, the time displays as 14: 5, rather than 14:05 so the zero is missing, any ideas?
My code is this:
var dt, timeint;
dt = new Date();
ch = dt.getHours();
cm = dt.getMinutes();
cs = dt.getSeconds();
timeint=setInterval(timer,1000);
function timer() {
dt = new Date();
ch = dt.getHours();
cm = dt.getMinutes();
cs = dt.getSeconds();
}