FLASH代码翻译

[复制链接]
查看11 | 回复1 | 2011-2-10 21:57:23 | 显示全部楼层 |阅读模式
onClipEvent (enterFrame) {

_root.tt = _root.timelimite- int(getTimer() / 1000)+int(_root.timestart);

hh = int(_root.tt / 3600);

mm = int((_root.tt-hh*60)/60);

ss = int(_root.tt-hh*3600- mm*60);

if (hh < 10) {

_root.h = "0" + String(hh);

} else {

_root.h = String(hh);

}

if (mm < 10) {

_root.m = "0" + String(mm);

} else {

_root.m = String(mm);

}

if (ss < 10) {

_root.sec = "0" + String(ss);

} else {

_root.sec = String(ss);

}

if (_root.tt == 0) {
_root.gotoAndStop(3);

}
}
这些是什么意思?

回复

使用道具 举报

千问 | 2011-2-10 21:57:23 | 显示全部楼层
onClipEvent (enterFrame) {\\当影片进入帧;
_root.tt = _root.timelimite- int(getTimer() / 1000)+int(_root.timestart); \\主时间轴上的 tt 值赋
hh = int(_root.tt / 3600);\\hh等于上面(tt)除以3600换算的,应该是小时吧
mm = int((_root.tt-hh*60)/60);\\这是分钟 mm的赋值和换算过程
ss = int(_root.tt-hh*3600- mm*60);\\秒,取整
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行