Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / July 2005



Tip: Looking for answers? Try searching our database.

Clock using Flash MX 2004

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jai1968 - 26 Jul 2005 05:25 GMT
Hi Friends,

I created a clock using Flash MX 2004. I hereby, include the action script
code used. Problem I have is the time shown in the clock is that of local
computer even after uploading to my hosting server. Can anybody tell how to
resolve this?

ACTION SCRIPT CODE USED:

mydate = new Date();
seconds = mydate.getSeconds();
minutes = mydate.getMinutes();
hours = mydate.getHours();
day = mydate.getDay();
date = mydate.getDate();
month = mydate.getMonth();
year = mydate.getFullYear();
if (day==0){
        day = "Sunday"
} else if (day==1){
        day = "Monday"
} else if (day==2){
        day = "Tuesday"
} else if (day==3){
        day = "Wednesday"
} else if (day==4){
        day = "Thursday"
} else if (day==5){
        day = "Friday"
} else if (day==6){
        day = "Saturday"
}

month = month + 1;

if (minutes<10) {
        minutes = "0"+minutes;
}
if (seconds<10) {
        seconds = "0"+seconds;
}

if (hours>12) {
        hours = hours-12;
        ampm = "PM";
} else {
        ampm = "AM";
}
if (hours == 0) {
        hours = 12;
}

time = ((hours) + ":" + (minutes) + ":" + (seconds) + " " + (ampm));

datefinal = ((date) + "/" + (month) + "/" + (year));
jai1968 - 26 Jul 2005 05:37 GMT
Hi again,

I wanna display one country time all over the world...how it can be done?

Thanks
Jai
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.