Flash digital clock.
Posted: Sat Sep 12, 2009 9:45 pm
Ok i have made a clock followin a tut in flash.
thing is it is reading the time from the local computer rather than the server. http://www.netrixnetwork.com/test/test.html <<can see it there.
Code:
Does anyone know enough about flash to make it read from the server and display the server time rather than the local time??
fanx xx
thing is it is reading the time from the local computer rather than the server. http://www.netrixnetwork.com/test/test.html <<can see it there.
Code:
Code: Select all
var now:Date = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds();
if (hours >= 12) {
ampm_txt.text = "PM";
} else {
ampm_txt.text = "AM";
}
if (hours > 12){
hours = hours - 12;
}
if (hours == 00){
hours = 12;
}
if (hours < 10){
hours_txt.text = "0" + hours;
} else {
hours_txt.text = hours;
}
if (minutes < 10){
minutes_txt.text = "0" + minutes;
} else {
minutes_txt.text = minutes;
}
if (seconds < 10){
seconds_txt.text = "0" + seconds;
} else {
seconds_txt.text = seconds;
}
fanx xx