var xq:Array = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
function nowtime()
{
var now:Date = new Date();
year = now.getFullYear();
mon = now.getMonth();
day = now.getDate();
week=now.getDay();
hour = now.getHours();
if(hour>12)
{
hour= hour-12;
}
minu = now.getMinutes();
second = now.getSeconds();
_root.y_txt.text = year+"年"+(mon+1)+"月"+day+"日 "+xq[week]+" "+ hour+":"+ minu+":"+second;
_root.y_txt.width = y_txt.textWidth + 12;
_root.y_txt.height = 20;
}
var nowtimeid = setInterval(nowtime,1000);