。先看下时钟效果:
var fnum:Number = new Number();
Miao = 0;
Fen = 0;
Shi = 0;
function clock_func() {
with (this.clock_mc.zhen_mc) {
SHand._rotation = Miao*6;
MHand._rotation = Fen*6;
HHand._rotation = Shi*30+30*Fen/60;
}
}
clock_func();
clearInterval(ID);
for (var d:Number = 11; d>=0; d--) {
this["mc"+d].num = d;
this["mc"+d].onRelease = function() {
this.num*5=fnum) {
clearInterval(ID);
}
Fen>=60 ? Fen=0 : Fen++;
}, 10);
};
}
stop();[1b]源文件:
[img]/Files/BeyondPic/2007-5/19/rar.gif[/img]
[/1b]
[url=http://www2.flash8.net/UploadTeach/200705/20070518113417933.rar][1b]时钟.rar[/1b][/url]
本文转自:http://www.5uflash.com/flashjiaocheng/Flashdonghuajiaocheng/1229.html
本文介绍如何使用Flash编程实现一个简易时钟动画,包括时、分、秒的显示更新,以及点击数字调整时间的功能。通过实例代码演示,帮助初学者掌握基本的动画与交互设计技巧。

被折叠的 条评论
为什么被折叠?



