Real-time analog clock, problem :(

How can i make the code below update every second, so its real time in seconds, minutes, hours and such. Im new to this actionscript. Im putting everything in the liubrary, not sure if that matters or helps anything :-/ If you need to see what my problem, is just ask my, i will upload the fla :slight_smile:

Heres the code:


 	days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
 	months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
 	clipDate = new Date();
 
 
 	//dayName = days[clipDate.getDay()];
 	//fullDate = months[clipDate.getMonth()]+" "+clipDate.getDate()+", "+clipDate.getFullYear();
 	currentHour = clipDate.getHours();
 	currentMinutes = clipDate.getMinutes();
 	if (length(currentMinutes) == 1) {
 		currentMinutes = "0"+currentMinutes;
 	}
 	clipDate = new Date();
 	currentSeconds = int(clipDate.getSeconds());
 	if (length(currentSeconds) == 1) {
 		currentSeconds = "0"+currentSeconds;
 	}
 	currentTime = currentHour+":"+currentMinutes+"."+currentSeconds;
 	delete clipDate;
 

Thanks,
Cody

http://actionscript-toolbox.com/dateobject.php

thankss problem solved :slight_smile: