♡······★스위시 강좌

[스크랩] 한줄가사 player (mp3로드) ...test

예쁜나비 2019. 1. 21. 08:37








첨부파일 한줄가사 player (mp3로드).swi






<br><br><br>
<p><embed src="https://t1.daumcdn.net/cfile/cafe/997244355C171C531A?original" width="1024" height="100" scale="exactfit" allowFullScreen="true"></p>
<br><br><br>


// mu > lrClip 에적용

onSelfEvent (load) {
 _p = parameters;
 lrcList = _p.lyrics.split("\n");
 sList=[], tList=[], t=lrcList.length;
 mySong = _parent.mySong;
 for(i=0; i<t; i++) {
  mSec = Number((lrcList[i].slice(1,9)).split(":")[0]*60);
  sSec = Math.round(Number((lrcList[i].slice(1,9)).split(":")[1]))+_p.sink;
  sList.push(mSec + sSec), tList.push(lrcList[i].slice(10));
  
 }
    onEnterFrame = function() {
  pT=mySong.position/1000;
        for (sN in sList) if (sList[sN] < pT) break;
        tN = Number(sN);
        if (Math.round(pT) >= sList[secN+1]) lrcGo(++secN);
//  trace(Math.round(pT) + " : " +sList[secN+1]+"("+tN+")"); // 점검용
 }
 _parent.won.teb.onRelease = function() {
  lrcGo(tN);
 }
 lrcGo(0);
}
function lrcGo(num) {
 lrcTxt.text = tList[secN=num];
}











출처 : 스윗터
글쓴이 : 영수 원글보기
메모 :