AS创作-实时时钟 |
| 作者:佚名 来源:不详 更新:2007-1-13 20:46:03 错误报告 我要投稿 |
这两天做了一个实时的时钟~ 发上来和大家分享一下!
点击浏览该文件
点击浏览该文件
newDate = new Date(); newDate.month = newDate.getMonth()+1; DateTextField = newDate.getFullYear()+"-"+ newDate.month +"-"+ newDate.getDate(); now_hours = newDate.getHours(); if(length(now_hours)<2){ now_hours = "0" + now_hours; } now_minutes = newDate.getMinutes(); if(length(now_minutes)<2){ now_minutes = "0" + now_minutes; } now_seconds = newDate.getSeconds(); if(length(now_seconds)<2){ now_seconds = "0" + now_seconds; } TimeTextField = now_hours +":"+ now_minutes +":"+ now_seconds; _root.second._rotation = newDate.getSeconds()*6; _root.minute._rotation = newDate.getMinutes()*6 + newDate.getSeconds()*(1/10);; _root.hour._rotation = newDate.getHours()*30 + newDate.getMinutes()*(1/2);
原文件传上来,想要学的朋友可以下栽去看看
点击浏览该文件
|
|
| 文章录入:skyuu 责任编辑:skyuu |
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |