Flash Playback | Show demo address: http://www.kaitian.cc/bbs/music/index.html
Function view () {
Timegesu = 1;
Totalgeci = new Array ();
Total = new Array ();
Text_st = String (_parent.story);
array_t = Text_st.split ("\ n");
Split into arrays.
For (i=0 i<array_t.length; i++) {
KK = "[01:50.93][00:18.55] Test testing test test test";
if (!isnan (Array_t[i].charat (1)) and (Array_t[i].charat (0) = = "[)] {
ARRAY_TXX = Array_t[i].split ("]");
For (y=0 y<array_txx.length; y++) {
if (Array_txx[y].charat (0) = = "[") {
Array_txx[y] = array_txx[y].substr (1);
}
}
The/*ARRAY_TXX records a value other than [] and the time form is left. Note that even the [01:50.93] form is divided into two elements after the split. */
For (y=0 y<array_txx.length-1; y++) {
Timeallff = 0;
Zanshi_arry = Array_txx[y].split (":");
For (j=0 j<zanshi_arry.length; j + +) {
Siwuzi = number (zanshi_arry[j]);
if (j = = 0) {
Timeallff + = siwuzi*60;
else if (j = = 1) {
Timeallff + = Siwuzi;
} else {
Error handling
}
}
Array_txx[y] = Timeallff;
}
For (y=0 y<array_txx.length-1; y++) {
Total[timegesu] = Array_txx[y];
Totalgeci[timegesu] = array_txx[array_txx.length-1];
timegesu++;
}
}
}
Put the lyrics and time into the array: Total and totalgeci;
For (Y=1 y<total.length; y++) {
For (j=y+1 j<total.length; j + +) {
if (Total[j]<total[y]) {
cons = Total[j];
TOTAL[J] = Total[y];
Total[y] = cons;
cons = Totalgeci[j];
TOTALGECI[J] = Totalgeci[y];
Totalgeci[y] = cons;
}
}
}
Sort! Lyrics and time are also sorted!
ix=0;
_root.geci_bar.show_text = "<br><br><br><br><br>";
y = 1;
Total[0] = 0;
Totalgeci[0] = "";
For (m=1 m<totalgeci.length; m++) {
if (Totalgeci[m]) {
_root.geci_bar.show_text + = Totalgeci[m];
}
}
_root.geci_bar.show_text = "<br><br><br><br><br><br>";
Onenterframe = function () {
if (_root.lssssss = = _root.gequming) {
if (_root.zs>=total[y] and _root.zs<total[y+1]) {
Gc_view = Totalgeci[y];
Jiangeshi = Total[y+1]-total[y];
Dangeshijian = jiangeshi/(totalgeci[y].length);
if ((_root.zs>total[y]+dangeshijian*ix) && _root.viewmodem) {
GC_VIEWL = mbsubstring (gc.text, 0, ix++);
_root.geci_bar.loadtext = GC_VIEWL;
}
if (!_root.viewmodem) {
_root.geci_bar.loadtext = Gc_view;
}
if (y>1) {
_root.geci_bar.yi_kuan.scroll = y;
}
if (y<=1) {
_root.geci_bar.yi_kuan.scroll = 1;
}
else if (_root.zs<total[y]) {
y--;
if (y<0) {
y = 0;
}
IX = 0;
else if (_root.zs>=total[y+1]) {
y++;
IX = 0;
} else {
Except the wrong!
Gc_view = "";
}
} else {
GC_VIEWL = "";
Gc_view = "No lyrics!" Sorry!!! ";
_root.geci_bar.show_text= "No lyrics!" \ n \ nplease if you have new music or LRC lyrics, please provide the address, thank!\n\n Email: yi0731@163.com ";
}
};
}