自带歌曲播放器

来源:百度文库 编辑:神马文学网 时间:2024/05/16 20:16:59
',1)">










',2)">',3)">






音乐进度显示代码:
第1帧用的代码: ­
 
s1 = int(_root.gqj.m._totalframes/12); ­
fen1 = String(int(s1/60)); ­
miao1 = String(int(s1%60)); ­
if (length(fen1) == 1) { ­
fen1 = "0"+fen1+"分"; ­
} else { ­
fen1 = fen1+"分"; ­
} ­
// end else if ­
if (length(miao1) == 1) { ­
miao1 = "0"+miao1+"秒"; ­
} else { ­
miao1 = miao1+"秒"; ­
} ­
// end else if ­
_root.wenben.changdu.cd = fen1+miao1; ­
s2 = int(_root.gqj.m._currentframe/12); ­
fen2 = String(int(s2/60)); ­
miao2 = String(int(s2%60)); ­
if (length(fen2) == 1) { ­
fen2 = "0"+fen2+"分"; ­
} else { ­
fen2 = fen2+"分"; ­
} ­
// end else if ­
if (length(miao2) == 1) { ­
miao2 = "0"+miao2+"秒"; ­
} else { ­
miao2 = miao2+"秒"; ­
} ­
// end else if ­
_root.wenben.jindu.jd = fen2+miao2; ­
第2帧用的代码: ­
gotoAndPlay(1); ­
日期时间代码: ­
第1帧用的代码: ­
function getLastStr(str, n) { ­
var _loc1 = str; ­
_loc1 = "0000"+_loc1; ­
return (_loc1.substr(_loc1.length-n)); ­
} ­
// End of the function ­
nowDate = new Date(); ­
dayName = new Array("日", "一", "二", "三", "四", "五", "六"); ­
year = nowDate.getFullYear(); ­
month = getLastStr(nowDate.getMonth()+1, 2); ­
today = getLastStr(nowDate.getDate(), 2); ­
day = dayName[nowDate.getDay()]; ­
txtNowDate = year+"年"+month+"月"+today+"日"+"星期"+day; ­
hours = getLastStr(nowDate.getHours(), 2); ­
minutes = getLastStr(nowDate.getMinutes(), 2); ­
seconds = getLastStr(nowDate.getSeconds(), 2); ­
txtNowTime = hours+":"+minutes+":"+seconds; ­
第2帧用的代码: ­
gotoAndPlay(1); ­