【发布时间】:2013-05-22 09:37:22
【问题描述】:
我想展示一个 ActionScript 3.0 Timer,与从 MySQL 获得的时间戳有关。
所以假设 MySQL (PHP) 返回一个类似 $my_birthday="2013-05-22 12:30:45" 的字符串
我是通过 URLLoader 从 ActionScript 获得的,我想像这样显示计时器:
My age:
01 hours 01 minutes 42 seconds
我应该使用什么函数:
public function timerHandler(e:TimerEvent)
{
log_textfield.text = String((new Date()).time) - my_birthday; // I need to convert the Date().Time to unix timestamp I guess, and a function for time difference.
}
【问题讨论】:
标签: php mysql actionscript-3 timestamp