sunny      2002/03/03 22:48:32     641   
   Â¥¾Æ¾Ó´Ô~ bgm_system.js ¼Ò½º¿©...
//////////////////////////////////////////////////////////////////////////////////
//Shinobu BGM Player 1.0a (Full Function Version)                                //
//Copyleft (c) 2000 - 2001 Shinobu (shinobu@empal.com),All Rights Unreversed.        //
//Shinobu's Script Support Page : http://javascript.new21.org                        //
//////////////////////////////////////////////////////////////////////////////////
//¾È³çÇϼ¼¿ä? ¼Ò½º °ø°³ÀÚ ½Ã³ëºÎ¶ó°í ÇÕ´Ï´Ù.                                        //
//ºÎ´ã¾øÀÌ »ç¿ëÇϽðí, Àǹ®Á¡Àº À§ÀÇ ¼­Æ÷Æ® ÆäÀÌÁö¸¦ ¹æ¹®ÇϽʽÿÀ.                //
//////////////////////////////////////////////////////////////////////////////////
//Âü  °í : ÀÌ ½ºÅ©¸³Æ®´Â °ø°³ ½ºÅ©¸³Æ®ÀÔ´Ï´Ù.
//¼öÁ¤ÇÏ½Ç °æ¿ì, ¹ß»ýÇÏ´Â ¸ðµç ¹®Á¦¿¡ ´ëÇÑ Ã¥ÀÓÀº ¼öÁ¤ ¹èÆ÷ÀÚ¿¡°Ô ÀÖÀ¸¸ç,
//¹Ýµå½Ã ¿øÀÛÀÚÀÇ Á¤º¸¸¦ ¹àÇô¾ß ÇÕ´Ï´Ù.
//µû¶ó¼­,À§ÀÇ Ä«ÇÇ·¹ÇÁÆ® ºÎºÐÀº »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù.
//////////////////////////////////////////////////////////////////////////////////

//¸ÞÀÎ ·çƾ ½ÃÀÛ.
//½ÇÁ¦·Î À½¾ÇÀ» Àç»ýÇÏ°í ÄÁÆ®·ÑÇÏ´Â ºÎºÐÀ¸·Î¼­, ¸Å¿ì Áß¿äÇÏ´Ï
//¼öÁ¤À» ÇϽÃÁö ¾Ê´Â °ÍÀÌ ÁÁ½À´Ï´Ù.

//º¯¼öÀÇ ÃʱâÈ­
var songtime1 = null;
var doFirstPlay = null;
var songPlaying = false;
var track = 0;
var songNum = null;
var songName = null;
var songTime = null;
var showTitle = null;
var count = 0;
var loop = false;
var playMode = null;
var restLength = null;

function init_bgm() { //bgm Player ÃʱâÈ­
        //ȯ°æ º¯¼ö¸¦ üũÇÏ¿© Á¤ÀǵÇÁö ¾Ê¾ÒÀ¸¸é ³Ö¾îÁØ´Ù.
        if (showTitle == null) { showTitle = 1; }
        switch (showTitle) {
                case 0 :
                        document.form1.stitle.style.visibility = "hidden";
                        document.form1.stitle.size = 1;
                        break;
                case 1 :
                        document.form1.stitle.style.visibility = "visible";
                        break;
                case 2 :
                        document.form1.stitle.style.visibility = "hidden";
                        document.form1.stitle.size = 1;
                        break;
                default :
                        showTitle = 1;
        }
        if (playMode == null) { playMode = 0; }
        if (restLength == null) { restLength = 5; }
        if (doFirstPlay == null) { doFirstPlay = 1; }
        if (doFirstPlay == 1) { play(); }
}

function addbgm( url, title, time ) { //bgm Ãß°¡
        if (songNum == null) { songNum = new Array(); count = 0;} else { count = songNum.length; }
        if (songName == null) { songName = new Array(); }
        if (songTime == null) { songTime = new Array(); }
        songNum[count] = url;
        if (title == null || title == '' ) { title1 = 'Track ' + (count + 1); } else { title1 = title; }
        songName[count] = title1;
        songTime[count] = time;
}

function chgLoop() { //¹Ýº¹ ¿©ºÎ ¼³Á¤
        if (loop == false) {loop = true;}
        else {loop = false;}
}

//Àç»ý ÇÔ¼ö.
function play() {
        if (songPlaying) { //Àç»ýÁßÀ̶ó¸é...
        alert("ÀÌ¹Ì Àç»ýÁßÀÔ´Ï´Ù!!!");
        return;
        }
        //Àç»ý ¸ðµå¿¡ µû¸¥ Ãʱâ Æ®·¢¹øÈ£ ¼³Á¤.
        switch (playMode) {
                case 0 :
                        track = 0;
                        break;
                case 1 :
                        track = Math.floor(Math.random() * songNum.length);
                        break;
                default :
                        track = 0;
        }
chooseSong(track);
}

function stopTrack() { // À½¾Ç ¸ØÃß±â
        document.Music.Stop() //À©µµ¿ì ¹Ìµð¾î ÄÁÆ®·ÑÀ» À§ÇÑ ¿É¼Ç
        if (songPlaying) { //Àç»ýÁßÀ̶ó¸é...
        clearTimeout(songtime1); //ŸÀӾƿôÀ» ÇØÁ¦ÇÑ´Ù.
        }
        else { alert("ÀÌ¹Ì ¸ØÃ߼̽À´Ï´Ù."); return false;}
        songPlaying = false; //Àç»ýÇÏÁö ¾ÊÀ½À¸·Î ¼³Á¤.
        updateTrack(); //Á¦¸ñ ¾÷µ¥ÀÌÆ®(±âº» Á¦¸ñÀ¸·Î)
}

function checkloop( action ) { //¹Ýº¹ ¿©ºÎ üũ
        if ( loop == true ) { chooseSong(track); }
        else {
                switch (action) {
                        case "next" : //´ÙÀ½ Æ®·¢À¸·Î ¸í·ÉÀ» ÁÖ¸é
                                nextTrack();
                                break;
                        case "pre" : //ÀÌÀü Æ®·¢À¸·Î ¸í·ÉÀ» ÁÖ¸é(¿¹ºñ¿ë)
                                preTrack();
                                break;
                        default :  //¾Ë ¼ö ¾ø´Â ¸í·ÉÀ» ÁÖ¾úÀ» ¶§¿¡´Â ¿¡·¯¸¦ ³»º¸³½´Ù
                                alert("¾Ë ¼ö ¾ø´Â ¸í·ÉÀÔ´Ï´Ù!!\n\n¸ÞÀÎ ½ºÅ©¸³Æ®¸¦ È®ÀÎÇϽÅÈÄ, Àç½ÇÇàÇϽʽÿÀ");
                                stopTrack();
                }
        }
}

function chooseSong(aaa) { // Æ®·¢À¸·Î Á÷Á¢ °Ç³Ê¶Ù±â
        if (songPlaying) { //Àç»ýÁßÀ̶ó¸é..
        clearTimeout(songtime1); //ŸÀӾƿôÀ» ÇØÁ¦ÇÑ´Ù.
        }
        track = aaa;
        //»ç¿ëÀÚ°¡ ¸Ú¸ð¸£°í Æ®·¢ ¹øÈ£¸¦ ÀÔ·ÂÇϸé...
        if(track > songNum.length - 1 || track < 0) { alert("Á¸ÀçÇÏÁö ¾Ê´Â Æ®·¢¹øÈ£ÀÔ´Ï´Ù!!!"); return false;} //¿¡·¯ ¸Þ½ÃÁö¸¦ º¸³½´Ù.
                var nowtrack1 = songNum[track];
                document.Music.Open(nowtrack1); //¹è°æÀ½¾Ç URL º¯°æ <- À©µµ¿ì ¹Ìµð¾î Ç÷¹À̾î ÄÁÆ®·ÑÀ» À§ÇÑ ¿É¼Ç
                //¸¸¾à¿¡ Beta 1.xó·³ <bgsound> ű׸¦ ¾µ¶§¿¡´Â ¾Æ·¡¿Í °°ÀÌ ÇØÁØ´Ù
                //document.all.<bgsound> ű×ÀÇ ID.src = nowtrack1;
                songPlaying = true; //Àç»ýÁß..
                updateTrack(); //Á¦¸ñ ¾÷µ¥ÀÌÆ®
                var t_time1 = songTime[track] + restLength;
                var t_time = t_time1 * 1000;
                songtime1 = setTimeout("checkloop('next')",t_time); //°îÀÌ ³¡³ª¸é ÀÚµ¿À¸·Î ´ÙÀ½ Æ®·¢À¸·Î..(ŸÀӾƿô ÀÌ¿ë)
}

function nextTrack() { //´ÙÀ½ Æ®·¢À¸·Î °Ç³Ê¶Ù±â
        if (playMode == 1) { var num = Math.floor(Math.random() * songNum.length); } //·£´ý Àç»ýÀ϶§ ó¸®
        else {
                if(track == songNum.length - 1) { var num = 0; } //¸Ç ³¡ Æ®·¢À» Àç»ýÇÏ°í ÀÖ´Ù¸é ÀÚµ¿À¸·Î óÀ½À¸·Î ¿Â´Ù.
                else { var num = track + 1; }
        }
        chooseSong(num);
}

function preTrack() { //ÀÌÀü Æ®·¢À¸·Î °Ç³Ê¶Ù±â
        if (playMode == 1) { var num = Math.floor(Math.random() * songNum.length); } //·£´ý Àç»ýÀ϶§ÀÇ Ã³¸®
        else {
                if(track == 0) { var num = songNum.length - 1; } //óÀ½ Æ®·¢À» Àç»ýÇÏ°í ÀÖ´Ù¸é ÀÚµ¿À¸·Î ¸Ç ³¡À¸·Î ¿Â´Ù.
                else { var num = track - 1; }
        }
        chooseSong(num);
}

function updateTrack() { //³ë·¡ Á¦¸ñ ¾÷µ¥ÀÌÆ®
        if (songPlaying) { //³ë·¡ Àç»ýÁßÀÇ Á¦¸ñÀº..
        track_idx = track + 1; //³ë·¡ ¹øÈ£..
        switch (showTitle) {
                case 0 :
                        window.status = ('Á¦¸ñ Ç¥½Ã ±â´ÉÀ» »ç¿ëÇÏ°í ÀÖÁö ¾Ê½À´Ï´Ù!!'); return true;
                        break;
                case 1 :
                        document.form1.stitle.value = "¢Ý " + track_idx + ". " + songName[track];
                        break;
                case 2 :
                        window.status = ('¢Ý ' + track_idx + '. ' + songName[track]); return true;
                        break;
                default :
                        window.status = ('Á¦¸ñ Ç¥½Ã ±â´ÉÀ» »ç¿ëÇÏ°í ÀÖÁö ¾Ê½À´Ï´Ù!!'); return true;
                }
        }
        else { //³ë·¡¸¦ Àç»ýÇÏ°í ÀÖÁö ¾Ê´Ù¸é...
                switch (showTitle) {
                case 0 :
                        window.status = ('Shinobu BGM Player 1.5 [stopped]'); return true;
                        break;
                case 1 :
                        document.form1.stitle.value = "Shinobu BGM Player 1.5 [stopped]";
                        break;
                case 2 :
                        window.status = ('Shinobu BGM Player 1.5 [stopped]'); return true;
                        break;
                default :
                        window.status = ('Shinobu BGM Player 1.5 [stopped]'); return true;
                }
        }
}

function m_list() { //»õâÀ¸·Î BGM ¼±ÅÃâ ¶ç¿ì±â
        window.open('bgm_sele.html','LinksRemote','width=450,height=500,scrollbars=1,resizable=1');
}
writer ip : 61.254.125.68    
      

       

11837 ¿î¿µÀÚ´Ô..ºÎŹÀÌ... [2] ÃÖÀÍÇÊ 10/27 499
11836 [re] telnetÀ¸·Î gcc»ç¿ë.. 10/27 439
11834 ·Î±×ÀÎÀÌ¿ä [3] jap 10/27 5
11833 HDD 100MBÂ¥¸®·Î ¹Ù²Ù°í ½ÍÀºµ¥¿ä.. [1] ±èÁöÇö 10/27 2
11832 ¾Ñ....... ȨÇÇ Á¢¼Ó ¾Ó´í´Ú. ¤Ñ_¤Ñ;;; [7] 10/27 439
11831 ¿À·£¸¸ÀÔ´Ï´ç^^ Áú¹®ÀÌ À־¿ä.. [1] ³ë´ã¹è 10/27 439
11830 Á¦·Îº¸µå ÃֽŹöÁ¯À¸·Î.. [1] ±èÁ¤Èñ 10/26 439
11829 ÀÏÀÏÆ®·¡ÇȾçÀÌ ¾ó¸¶Á¤µµµÇ´ÂÁö, [2] ÀÌ¿¹¼Ö 10/26 393
11828 Á¦·Îº¸µå¸¦ ³¯·Á¹ö·È¾î¿ä [1] ¹Ú°æ¹Ì 10/26 11
11827 °¨»çÇÕ´Ï´Ù..±×·±µ¥.. [2] ¾ÈÇý¿µ 10/26 393
11826 ÀÌ·± Áú¹®µµ ±¦ÀÝÀºÁö..... [1] ÀÌÂùÀÌ 10/26 3
11825 [re] Á¦·Îº¸µå ¼³Ä¡Á»... 10/26 439
11824 Á¦·Îº¸µå ¼³Ä¡Á»... ¾ÈÇý¿µ 10/26 439
11823 MySQL ÃʱâÈ­ ºÎŹµå·Á¿ä.... [1] ÀÌÂùÀÌ 10/26 3
11822 È¥µ¿ÀÌ µÇ¼­ -_-; [1] º°»çÅÁ 10/26 4
FIRST823830831832833834835836843LAST