快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

Flash AS创作:实时时钟

  这两天做了一个实时的时钟~ 发上来和大家分享一下!

« Full Screen »

点击这里下载源文件

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);

原文件传上来,想要学的朋友可以下栽去看看


返回类别: Flash教程
上一教程: FlashMX 视频教程(40)-色彩动画
下一教程: 基础教程:给按钮加动作的方式

您可以阅读与"Flash AS创作:实时时钟"相关的教程:
· 使用Flash mx制作旋转的时钟效果
· Flash AS创作:计算器
· Flash MX 2004实例制作视频教程:时钟屏保(下)
· Flash MX 2004实例制作视频教程:时钟屏保(上)
· Flash:打造你自己的专业时钟
    微笑服务 优质保证 索取样品