最新更新 sitemap 网站制作设计本站搜索
网页设计
国外网站 韩国网站 个人主页 手提袋设计 CSS 网页特效 平面设计 网站设计 Flash CMS技巧 服装网站 php教程 photoshop 画册 服务器选用 数据库 Office
虚拟主机 域名注册 云主机 网页设计 客服QQ:8208442
当前位置:首页 > 网络设计学院 > Flash教程

如何在Flash播放器显示LRC歌词

日期:08-01    来源:网页设计秀    作者:cnwebshow.com

 QCu中国设计秀

function view() { QCu中国设计秀
timegesu = 1; QCu中国设计秀
totalgeci = new Array(); QCu中国设计秀
total = new Array(); QCu中国设计秀
text_st = String(_parent.story); QCu中国设计秀
array_t = text_st.split("n"); QCu中国设计秀
//拆分为数组。 QCu中国设计秀
for (i=0; i//kk = "[01:50.93][00:18.55]测试测试测试测试测试"; QCu中国设计秀
if (!isNaN(Number(array_t[i].charAt(1))) and (array_t[i].charAt(0) == "[")) { QCu中国设计秀
array_txx = array_t[i].split("]"); QCu中国设计秀
for (y=0; yif (array_txx[y].charAt(0) == "[") { QCu中国设计秀
array_txx[y] = array_txx[y].substr(1); QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
/*array_txx记录了除[]之外的值,剩下了时间形式.说明一点,即使是[01:50.93]形式经split之后也会分成二个元素。*/ QCu中国设计秀
for (y=0; ytimeallff = 0; QCu中国设计秀
zanshi_arry = array_txx[y].split(":"); QCu中国设计秀
for (j=0; jsiwuzi = Number(zanshi_arry[j]); QCu中国设计秀
if (j == 0) { QCu中国设计秀
timeallff += siwuzi*60; QCu中国设计秀
} else if (j == 1) { QCu中国设计秀
timeallff += siwuzi; QCu中国设计秀
} else { QCu中国设计秀
//出错处理! QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
array_txx[y] = timeallff; QCu中国设计秀
} QCu中国设计秀
for (y=0; ytotal[timegesu] = array_txx[y]; QCu中国设计秀
totalgeci[timegesu] = array_txx[array_txx.length-1]; QCu中国设计秀
timegesu++; QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
//将歌词与时间放入数组:total与totalgeci中; QCu中国设计秀
for (y=1; yfor (j=y+1; jif (total[j]cons = total[j]; QCu中国设计秀
total[j] = total[y]; QCu中国设计秀
total[y] = cons; QCu中国设计秀
cons = totalgeci[j]; QCu中国设计秀
totalgeci[j] = totalgeci[y]; QCu中国设计秀
totalgeci[y] = cons; QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
//排序!歌词与时间同时都排序! QCu中国设计秀
ix=0; QCu中国设计秀
_root.geci_bar.show_text = "QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
"; QCu中国设计秀
y = 1; QCu中国设计秀
total[0] = 0; QCu中国设计秀
totalgeci[0] = ""; QCu中国设计秀
for (m=1; mif (totalgeci[m]) { QCu中国设计秀
_root.geci_bar.show_text += totalgeci[m]; QCu中国设计秀
} QCu中国设计秀
} QCu中国设计秀
_root.geci_bar.show_text += "QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
QCu中国设计秀
"; QCu中国设计秀
onEnterFrame = function () { QCu中国设计秀
if (_root.lssssss == _root.gequming) { QCu中国设计秀
if (_root.zs>=total[y] and _root.zsgc_view = totalgeci[y]; QCu中国设计秀
jiangeshi = total[y+1]-total[y]; QCu中国设计秀
dangeshijian = jiangeshi/(totalgeci[y].length); QCu中国设计秀
if ((_root.zs>total[y]+dangeshijian*ix) && _root.viewmodem) { QCu中国设计秀
gc_viewl = mbsubstring(gc.text, 0, ix++); QCu中国设计秀
_root.geci_bar.loadtext = gc_viewl; QCu中国设计秀
} QCu中国设计秀
if (!_root.viewmodem) { QCu中国设计秀
_root.geci_bar.loadtext = gc_view; QCu中国设计秀
} QCu中国设计秀
if (y>1) { QCu中国设计秀
_root.geci_bar.yi_kuan.scroll = y; QCu中国设计秀
} QCu中国设计秀
if (y<=1) { QCu中国设计秀
_root.geci_bar.yi_kuan.scroll = 1; QCu中国设计秀
} QCu中国设计秀
} else if (_root.zsy--; QCu中国设计秀
if (y<0) { QCu中国设计秀
y = 0; QCu中国设计秀
} QCu中国设计秀
ix = 0; QCu中国设计秀
} else if (_root.zs>=total[y+1]) { QCu中国设计秀
y++; QCu中国设计秀
ix = 0; QCu中国设计秀
} else { QCu中国设计秀
// 除错! QCu中国设计秀
gc_view = ""; QCu中国设计秀
} QCu中国设计秀
} else { QCu中国设计秀
gc_viewl = ""; QCu中国设计秀
gc_view = "暂无歌词! Sorry!!!"; QCu中国设计秀
_root.geci_bar.show_text="暂无歌词! nn如果你有新的音乐或LRC歌词,请提供地址,谢谢!nn邮箱:vivishow@163.com"; QCu中国设计秀
} QCu中国设计秀
}; QCu中国设计秀
}QCu中国设计秀