关于FLASH制作

来源:百度知道 编辑:UC知道 时间:2024/05/16 12:25:22
制作一个能显示当前时间的钟表,写出脚本语言程序和制作过程

制作过程就不说了
h代表hour
m代表minute
s代表second
自己做好钟面和h,m,s 3个针
下面是代码~~~~~~~~~~~~~~~~~~~~~~~~`
now=new Date() //注意要在舞台的设定中把帧率设为1fps(1秒1帧)
ho._rotation=now.getHours()*30+30*now.getMinutes()/60 //时针
mi._rotation=now.getMinutes()*6+6*now.getSeconds()/60 //分针
se._rotation=now.getSeconds()*6 //秒针
onEnterFrame = function () {
ho._rotation += 1/(120);
mi._rotation += 1/(10);
se._rotation += 6
};