Answer the question
In order to leave comments, you need to log in
How do I make the text in the game, and include .json (to be used from a file). And also make use of "islineending"."LyricDuration"?
Hello. Help me to do like this
And connect to var lyrics .json
I have a script like this :
if(songg == 1){
var audio = new Audio();
audio.src = "(Это типа аудио, ссылке в игре есть)";
audio.play()
var lirycs = [
{
"time": 31610,
"duration": 230,
"text": "Bié zà ",
"isLineEnding": 1
},
{
"time": 35302,
"duration": 230,
"text": "Yī",
"isLineEnding": 1
},
}];
var next_text = lirycs.shift();
var checker = setInterval(function(){
if(next_text.time<audio.currentTime*900){
document.getElementById('lyrics').innerHTML = next_text.text ;
next_text = lirycs.shift();
}
if(audio.ended)clearInterval(checker);
});
}
}
И еще "LyricDuration":"-1000(1000)"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question