打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
四、FLASH课件工具面板积件制作(2)----获取系统日期
1、新建一个“riqi”影片剪辑
2、在“riqi”影片剪辑第一帧创建一个动态文本框,变量为“myriqi”
3、在“riqi”影片剪辑新建一帧,打开动作面板写入下面代码:
newDate = new Date();
myriqi = newDate.getFullYear() + "年" + (newDate.getMonth() + 1) + "月" + newDate.getDate() + "日";
onEnterFrame = function ()
{
    newDate = new Date();
    if (newDate.getHours() < 10)
    {
        xs = "0" + newDate.getHours();
    }
    else
    {
        xs = newDate.getHours();
    } // end if
    if (newDate.getMinutes() < 10)
    {
        fz = "0" + newDate.getMinutes();
    }
    else
    {
        fz = newDate.getMinutes();
    } // end if
    if (newDate.getSeconds() < 10)
    {
        ms = "0" + newDate.getSeconds();
    }
    else
    {
        ms = newDate.getSeconds();
    } // end if
    DateTextField = xs + ":" + fz + ":" + ms;
};
4、把“riqi”影片剪辑放到主场景中,ctrl+enter测试。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
在你的flash作品中添加年月日时的简单方法
FLASH时钟的制作教程
Flash8日历、星期、时间的制作
Flash编程-Date(日期)函数
js日期时间格式验证,时间比较 - flyfish的个人空间 - 天堂硅谷社区 - powered by X-Space
js格式化时间
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服