CODE:下载:Flash_E_2.rar
onEnterFrame = function()
{
//月份数组
var MONTHS = ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"];
var DAYS = ["SUN","MON","TUE","WED","THU","FRI","SAT"];
var now = new Date(); //获取系统时间
year.text = now.getFullYear(); //显示年份数
month.text = MONTHS[now.getMonth()]; //显示月份对应的数组元素
day.text = DAYS[now.getDay()];
date.text = now.getDate()<10?"0"+now.getDate():now.getDate(); //不足两位高位补0
hours.text = now.getHours()<10?"0"+now.getHours():now.getHours();
minutes.text = now.getMinutes()<10?"0"+now.getMinutes():now.getMinutes();
seconds.text = now.getSeconds()<10?"0"+now.getSeconds():now.getSeconds();
milliseconds.text = Math.floor(now.getMilliseconds()/10)<10?"0"+Math.floor(now.getMilliseconds()/10):
Math.floor(now.getMilliseconds()/10); //变3位毫秒数为两位
}
