all groups > flash actionscript > march 2005 >
You're in the

flash actionscript

group:

Clock Component


Re: Clock Component David Stiller
3/3/2005 5:04:14 PM
flash actionscript:
[quoted text, click to view]

Whose extension did you download? Until we know, we have no idea how it
works either! ;)

[quoted text, click to view]

Depending on how it was written, it may not allow you to do that, but
let us see this extension.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Clock Component KG444
3/3/2005 10:02:09 PM
I just downloaded the clock component extension, and can't figure out how to
have it display the time for one of our plants in KY when I'm in WA. It
defaults to my computer's clock time.
I'm new to ActionScript, so please bear with me ;-)
Re: Clock Component KG444
3/3/2005 10:17:29 PM
Oops! Sorry, I didn't realize there was more than one out there.
I downloaded this one http://www.flashextension.net/Components/clock_details.htm

Re: Clock Component KG444
3/3/2005 10:37:09 PM
Re: Clock Component KG444
3/3/2005 11:14:52 PM
Give your clock component on the stage an instance name, such as 'myClock'.
Then, select a keyframe in the timeline on the same frame as your clock, open
the Actions panel and type the following code:

var eastern_date:Date = new Date(); // get a date object holding the date
and time on this machine (for now)
var timezone_offset = eastern_date.getTimezoneOffset(); // this is the # of
minutes from this machine to Universal time (England)
timezone_offset -= 300; // subtract 300 (5 hours * 60)
from this the # of minutes to get back to EST- in your case this should be 180
eastern_date.setTime(eastern_date.getTime() + timezone_offset*60*1000); //
resets the time to EST

myClock.userDate = eastern_date; // now your clock should be correct-
should work regardless of where it is run

Re: Clock Component David Stiller
3/4/2005 8:26:02 AM
KG444,

There you go! ;) Glad to hear you found a solution.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

AddThis Social Bookmark Button