In Winplay, you can use the LRC plug-in to dynamically display the lyrics. In FLASH, you can also [demonstrate] and select a simplified version of the song, which is easy to see.
If you are careful, use NotePad to open an LRC file. The file format is as follows:
[Ti: Dongfeng broken]
[Ar: Jay Chou]
[Al: ye huimei]
[By: ye zesheng]
[Offset: 500]
[. 00] Dongfeng broken
[00:03. 22]
[00:05. 46] Jay Chou
[. 37]
[00:10. 27] LRC: ye zesheng
[. 45]
[. 88] a sorrow stands alone in the window
[. 20] I pretend you're not leaving
[. 52] the old world is more lonely than the Yuanyuan
[. 98] A half-awake candle can't bear to blame me
[. 04] a pot of wandering waves is difficult to break into the throat
[. 47] When you leave, the wine warms your memories and misses thin ones.
[. 93] how to steal water from the east
[. 28] I missed it when the flowers bloom.
[. 31]
[. 68] [. 31] [. 30]
[. 23] [. 88] [. 23] years on the wall peeling saw childhood
[. 55] [. 11] [. 58] I still remember that we were very young.
[. 30] [. 62] [. 87] But now you have never heard of me waiting
[. 07] [. 50] [. 08]
[. 67] [. 95] [. 30] maple leaf shows the ending of the story.
[. 02] [. 35] [. 88] I walk you through the old road outside the fence
[. 69] [. 52] Even breaking up is silent
[05:01. 62] [02: 07. 25] [02: 15. 36]
[. 75] a pot of wandering waves is difficult to break into the throat
[. 15] When you leave, the wine warms your memories and misses thin
[. 54] how to steal water from the east
[. 06] I miss it when the flowers bloom.
[. 43] [. 63] [. 23]
[. 97] Even breaking up
If FLASH reading is troublesome, but the VBS regular expression is more convenient, the result is output as follows:
<? Xml version = "1.0" encoding = "GB2312" standalone = "yes"?>
<! Doctype music [
<! Element music (ARTIST, TITLE, ALBUM, LANGUAGE, EDITER, OFFSET, LYRICS)>
<! Element artist (# PCDATA)>
<! Element title (# PCDATA)>
<! Element album (# PCDATA)>
<! Element language (# PCDATA)>
<! Element editer (# PCDATA)>
<! Element offset (# PCDATA)>
<! Element lyrics (LRC) *>
<! Element lrc (# PCDATA)>
<! ATTLIST LRC
Tag cdata # REQUIRED>
]>
<MUSIC>
<ARTIST> Jay Chou </ARTIST>
<TITLE> fail </TITLE>
<ALBUM> ye huimei </ALBUM>
<LANGUAGE> </LANGUAGE>
<EDITER> ye zesheng </EDITER>
<OFFSET> 500 </OFFSET>
<LYRICS>
<Lrc tag = "0"> Dongfeng </LRC>
<Lrc tag = "3220"> </LRC>
<LRC tag= "5460"> Jay Chou </LRC>
<Lrc tag = "7370"> words: Fang Wenshan: Jay Chou </LRC>
<Lrc tag = "10270"> LRC: ye zesheng </LRC>
<Lrc tag = "12450"> </LRC>
<Lrc tag = "13880"> stand alone in the window </LRC>
<Lrc tag = "20200"> I pretend you haven't left behind the door </LRC>
<Lrc tag = "26520"> old places are more lonely than Yuanyuan. </LRC>
<Lrc tag = "32980"> I can't bear to blame myself for the candle fire in the night. </LRC>
<Lrc tag = "40040"> A pot of wandering traces is difficult to break into the throat. </LRC>
<Lrc tag = "46470"> when you leave, the wine will warm your memories and your thoughts will be thin. </LRC>
<Lrc tag = "52930"> how to steal water from the East </LRC>
<Lrc tag = "59280"> I missed it when the flowers were ripe once. </LRC>
<Lrc tag = "66310"> </LRC>
<Lrc tag = "69300"> who is playing with the pipa? </LRC>
<Lrc tag = "76230"> years of peeling on the wall and seeing childhood </LRC>
<Lrc tag = "82580"> I still remember that we were very young that year. </LRC>
<Lrc tag = "88870"> you have never heard of me waiting for the Sound of Music. </LRC>
<Lrc tag = "96080"> who is playing with the pipa? </LRC>
<Lrc tag = "102300"> I can see through Maple Leaf's story dyeing and ending </LRC>
<Lrc tag = "108880"> I walk you through the ancient road outside the fence </LRC>
<Lrc tag = "115520"> even breaking up in the Age of Smoke, smoke, and grass is quite silent </LRC>
<Lrc tag = "127250"> </LRC>
<Lrc tag = "135360"> </LRC>
<Lrc tag = "147750"> A pot of wandering traces is difficult to break into the throat. </LRC>
<Lrc tag = "155150"> when you leave, the wine will warm your memories and your thoughts will be thin. </LRC>
<Lrc tag = "161540"> how to steal water from the East </LRC>
<Lrc tag = "168060"> I missed it when the flowers were ripe once. </LRC>
<Lrc tag = "177230"> </LRC>
<Lrc tag = "178310"> who is playing with the pipa? </LRC>
<Lrc tag = "184880"> years of peeling on the wall and seeing childhood </LRC>
<Lrc tag = "191110"> I still remember that we were very young that year. </LRC>
<Lrc tag = "197620"> you have never heard of me waiting for the Sound of Music. </LRC>
<Lrc tag = "204500"> who is playing with the pipa? </LRC>
<Lrc tag = "210950"> I can see through Maple Leaf's story dyeing and ending </LRC>
<Lrc tag = "217350"> I walk you through the ancient road outside the fence </LRC>
<Lrc tag = "223970"> even breaking up in the Age of smoke and smoke </LRC>
<Lrc tag = "230680"> who is playing with the pipa? </LRC>
<Lrc tag = "237230"> years of peeling on the wall and seeing childhood </LRC>
<Lrc tag = "243550"> I still remember that we were very young that year. </LRC>
<Lrc tag = "250300"> you have never heard of me waiting for the Sound of Music. </LRC>
<Lrc tag = "257070"> who is playing with the pipa? </LRC>
<Lrc tag = "263670"> I can see through Maple Leaf's story dyeing and ending </LRC>
<Lrc tag = "270020"> I walk you through the ancient road outside the fence </LRC>
<Lrc tag = "276690"> even breaking up in the Age of Smoke, smoke, and grass is quite silent </LRC>
<Lrc tag = "289630"> </LRC>
<Lrc tag = "301620"> </LRC>
<Lrc tag = "309430"> </LRC>
</LYRICS>
</MUSIC>
It is very convenient to use flash xml for reading.
Music_word_arr = new Array ();
// New array to store the lyrics
Music_word_xml = new XML ();
// New XML object, that is, to store the XML mentioned above
Music_word_xml.ignoreWhite = true;
Music_word_xml.onLoad = function (success ){
If (success ){
Var tracks_xml = Music_word_xml.firstChild;
Var LRC = tracks_xml.childNodes [tracks_xml.childNodes.length-1];
For (var I = 0; I <LRC. childNodes. length; I ++ ){
Var time = LRC. childNodes [I]. attributes. TAG;
// Obtain the time
Var geci = LRC. childNodes [I]. childNodes;
// Obtain the lyrics
Music_word_arr.push ({Time: time, Word: geci });
// Save the time information and lyrics to the Music_word_arr array.
}
Show_Word ();
// Output
} Else {
Trace ("Error loading MusicWord .");
// If not loaded, an error is displayed.
}
Delete Music_word_xml;
// Delete an XML Object
};
Music_word_xml.load (URL );
Now let's talk about how to synchronize the lyrics with the songs.
Let's take a look at the Code. The Code shows everything:
Function Show_Word (){
T = 0;
Word. text = "";
Music_word = new Object ();
// Loop object
Music_word.interval = function (){
Var zs = mySound. position/100;
If (int (maid [t]. Time/100) = int (zs )){
If (Music_word_arr [t]. Word = "" | Music_word_arr [t]. Word = null ){
Word. text = "";
} Else {
Word. text = Music_word_arr [t]. Word;
}
T ++;
}
If (int (Music_word_arr [t]. Time/100) <int (zs )){
T ++;
}
};
Music_word_n = setInterval (music_word, "interval", 10 );
}
It should be easy to understand, because it is not long, it is worth noting that there is one:
If (int (Music_word_arr [t]. Time/100) <int (zs )){
T ++;
}
What is the use of this line of code? He is mainly used to solve the problem of playing a song, but the lyrics have not been loaded yet. At this time, he is responsible for keeping the lyrics up with the progress of playing the song, rather than waiting for the song. In fact, he also has a more important feature. Anyone who wants to be a player should know it. Here I will not talk about it. You can think about it yourself, haha ~~~~~ (It seems something wrong ?? ¥ % ¥ # An unknown object lands ...... Ah ~!!!!!)