Am Montag, 18. Dezember 2006 22:00 schrieb Gordon Smith:
> You could do this using the Timer class in the flash.utils package. I'd
> create a Timer that fires once a minute, determines the clock time, and
> checks to see if there are any alarms to display.
Gordon,
I do something similar in my model to set (create) the current time for a
desktop application. The application displays a running clock.
Below are the relevant snippets from my model class:
[...]
private var timer:Timer = new Timer(100, 0);
public var now:Date = new Date();
[...]
timer.addEventListener("timer", timerHandler);
timer.start();
[...]
private function timerHandler(timerEvent:TimerEvent):void {
now = new Date();
}
On Mac OS X the clock is always one second *ahead* (compared to the displayed
time in the system panel under date/time). Is there a better way?
tia,
O.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/