在flash里边显示时间的代码
创建一个动态文本框,变量值为:riqi
_root.onEnterFrame = function() {//需要让影片不停执行下面脚本。
todaydate = new Date();
currentyear = todaydate.getFullYear();
currentmonth = todaydate.getMonth()+1;
currentday = todaydate.getDate();
cday = todaydate.getDay();
if (cday==1) cday="星期一";
if (cday==2) cday="星期二";
if (cday==3) cday="星期三";
if (cday==4) cday="星期四";
if (cday==5) cday="星期五";
if (cday==6) cday="星期六";
if (cday==0) cday="星期日";
mytime=new Date()
t_h=mytime.getHours()
if(t_h<10){
shi="0" + t_h
}else{
shi=t_h
}
t_m=mytime.getMinutes()
if(t_m<10){
fen="0" + t_m
}else{
fen=t_m
}
t_s=mytime.getSeconds()
if(t_s<10){
miao="0" + t_s
}else{
miao=t_s
}
riqi="今天是"+currentyear+"."+currentmonth+"."+currentday+" "+shi+":"+fen+":"+miao;
}