블로그 꾸미기

[스크랩] 음악 올리기

살라이마리꼼 2008. 3. 19. 14:36

음악 올리기

 

1. asf파일 인터넷에 올리기


1) 한곡 올리기


<embed src="파일위치.asf" autostart="true" loop="true"

hidden="false" volume="50"></embed>


autostart-> 자동실행 (true/false)

loop-> 무한반복( true/false)

hidden-> windows media 숨기기(true/false)


2) 여러곡 랜덤으로 실행하기


<body> 와 </body> 사이에 넣어 주세요.


<script language="JavaScript">

var sound1="음악 url 1.asf"

var sound2="음악 url 2.asf"

var sound3="음악 url 3.asf"

var sound4="음악 url 4.asf"

var x=Math.round(Math.random()*4)

if (x==0) x=sound1

else if (x==1) x=sound2

else if (x==2) x=sound3

else x=sound4

if (navigator.appName=="Microsoft Internet Explorer")

document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')

else

document.write('<embed src='+'"'+x+'"'+'hidden="true" border="0"

width="20" height="20" autostart="true" loop="true">')

</script>


 

출처 : 인생 &
글쓴이 : 오천억 원글보기
메모 :