사운드제어

렛츠웹 + 게임/My Tip 2009. 1. 5. 16:54
<!---------------------------------프레임부분----------------------------------->
<frameset rows='0, 1*' framespacing=0 frameborder=0>
	<frame src='music_play.php' name='main_top' target_frame='main' marginwidth=0 marginheight=0 noresize scrolling=no>
	<frame src='content.php?db=index' name='main' target_frame='_self' marginwidth=10 marginheight=10 noresize>
    <body bgcolor='white' text='black' link='blue' vlink='purple' alink='red'>
    <p>이 페이지를 보려면, 프레임을 볼 수 있는 브라우저가 필요합니다.</p>
    </body>
    </noframes>
</frameset>




<!-----------------------------music_play.php시작---------------------------------->
<html>
<head>
<title>juck box</title>
<script language="JavaScript"> 


var music1="music1.mp3";
var m_tm1 =285000; 
var music2="music2.mp3"; 
var m_tm2 =226000;
var music3="music3.mp3"; 
var m_tm3 =254000;

var tot_num = 3;                               // 총갯수
var cur_music=1;                               // 시작음악
var st = 0;                                        //타이머 상태
function music_play(){
   document.player.Stop();                 //플레이어 스탑 
   if(st==1){                                     //타이머 스탑
      clearTimeout(time_id);
	  st=0;
   }
   kkk =  eval("music"+cur_music);        //플레이
   document.player.Open(kkk);
   du = eval("m_tm"+cur_music);
   cur_music++;                                //다음 음악선택
   if(cur_music> tot_num){
      cur_music =1;
   }
   st=1;
   //time_id=setTimeout("music_play()", du);   //타이머 세팅
}

</script> 
</head>

<body>
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="1" height="1" vspace="1" hspace="1" align="middle" id="player" style="left:0px; top:0px;">
<param name="AllowScan" value="true">
<param name="AudioStream" value="-1">
<param name="AutoRewind" value="false">
<param name="AutoStart" value="true">
</object>



</body>
</html> 
<!----------------------------------------music_play.php끝--------------------------------->




<!--------------------------------해당 본페이지 조절 박스부위 시작----------------------------->
<script>
function music_playing(mode)
{
	if(mode=='sound_off'){
		top.main_top.document.player.mute=true;
	}
	else if(mode=='sound_on'){
		top.main_top.document.player.mute=false;
	}
	else if(mode=='music_pause'){
		if(top.main_top.document.player.PlayState==2){
			top.main_top.document.player.Pause();//1
		}
	}
	else if(mode=='music_stop'){
		top.main_top.document.player.Stop();//0
	}
	else if(mode=='music_play'){
		top.main_top.document.player.Play();//2
	}
	
}
</script> 
<!----------------------------------------해당 본페이지 조절 박스부위 끝------------------------------->

posted by 망차니

설정

트랙백

댓글