繁體中文
当前位置:首页 > 信息世界 > 程序源码 > 详细内容
【flash】时间的显示
发布时间:2009/7/5  阅读次数:868  字体大小: 【】 【】【

http://chwl.zw78.com/user/chwl/flash/时间.swf

1、时间轴代码:
this.onEnterFrame = function() {
  this.createTextField("time", 1, 320, 100, 200, 20);
  time_array = new Array("日", "一", "二", "三", "四", "五", "六");
  myDate = new Date();
  yy = myDate.getFullYear();
  mm = myDate.getMonth()+1;
  dd = myDate.getDate();
  ww = myDate.getDay();
  hh = myDate.getHours();
  mn = myDate.getMinutes();
  ss = myDate.getSeconds();
  if (mn<10) {
   mn = "0"+mn;
  }
  if (ss<10) {
   ss = "0"+ss;
  }
  time.text = "今天是"+yy+"年"+mm+"月"+dd+"日 星期"+time_array[ww]+" "+hh+":"+mn+":"+ss+"辰桦网络欢迎你的光临!";
};

2、在场景中建立一个名为time的text文本框

我要评论
  • 匿名发表
  • [添加到收藏夹]
  • 发表评论:(匿名发表无需登录,已登录用户可直接发表。) 登录状态:未登录
最新评论
所有评论[0]
    暂无已审核评论!
 
 版权声明     关于本站      在线留言       登陆管理      个人博客   
 『辰桦网络』. All Rights Reserved
Station construction time: on April 4, 2006