웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
[re] 링크 클릭시 사운드 효과 [헤헤~ 더 간단하게]
2003.04.13 03:24
설라므네~
<head>
<bgsound id=music loop="1"><!-- // 몇번 들려줄지 숫자를 정해주세요.-->
<script>
function bgsoundcall(str)
{
eval(str);
}
</script>
</head>
<body>
<a OnClick="bgsoundcall('music.src='사운드.wav'');">건들면 소리지를꼬얌~ ㅜ,ㅡ</a>
P.S : onmouseover , onmouseout 우리도 할쭐안다이~ 울도 낑겨줘~~~~~~ OnClick만 싸고돌아 앙~~ ㅠ,ㅜ
>링크 클릭시 사운드 효과입니다.
>온클릭과 온마우스오버 다 가능합니다.
>
>
>
>
>
>
><style type="text/css">
><!--
>A:link {color:444444;text-decoration:none;}
>A:visited {color:444444;text-decoration:none;}
>A:active {color:444444;text-decoration:none;}
>A:hover {color:444444;text-decoration:none;}
>-->
></style>
><script LANGUAGE="JavaScript">
><!--
>var ButtonSound = new Array();
>ButtonSound[0] = "1.wav"; //사운드 파일의 경로
>ButtonSound[1] = "2.wav"; //사운드 파일의 경로
>ButtonSound[2] = "3.wav"; //사운드 파일의 경로
>document.write('<BGSOUND ID="alertsound">')
>IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
>NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
>ver4 = IE||NS? 1:0;
>onload=auPreload;
>
>function auPreload() {
>if (!ver4) return;
>if (NS) auEmb = new Layer(0,window);
>else {
>Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
>document.body.insertAdjacentHTML("BeforeEnd",Str);
>}
>var Str = '';
>for (i=0;i<ButtonSound.length;i++)
>Str += "<EMBED SRC='"+ButtonSound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
>if (IE) auEmb.innerHTML = Str;
>else {
>auEmb.document.open();
>auEmb.document.write(Str);
>auEmb.document.close();
>}
>auCon = IE? document.all.alertsound:auEmb;
>auCon.control = auCtrl;
>}
>function auCtrl(whSound,play) {
>if (IE) this.src = play? ButtonSound[whSound]:'';
>else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
>}
>function musicplay(whSound) { if (window.auCon) auCon.control(whSound,true); }
>function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }
>//-->
></script>
>
>
>
>
>
><a href="#" onmouseover="musicplay(0)">아햏햏</a>,
>
><a href="#" onClick="musicplay(1)">스타쉬피스</a>,
>
><a href="#" onClick="musicplay(2)">뚫흙뚫흙</a>,
>
>
>
>
>
>
>
<head>
<bgsound id=music loop="1"><!-- // 몇번 들려줄지 숫자를 정해주세요.-->
<script>
function bgsoundcall(str)
{
eval(str);
}
</script>
</head>
<body>
<a OnClick="bgsoundcall('music.src='사운드.wav'');">건들면 소리지를꼬얌~ ㅜ,ㅡ</a>
P.S : onmouseover , onmouseout 우리도 할쭐안다이~ 울도 낑겨줘~~~~~~ OnClick만 싸고돌아 앙~~ ㅠ,ㅜ
>링크 클릭시 사운드 효과입니다.
>온클릭과 온마우스오버 다 가능합니다.
>
>
>
>
>
>
><style type="text/css">
><!--
>A:link {color:444444;text-decoration:none;}
>A:visited {color:444444;text-decoration:none;}
>A:active {color:444444;text-decoration:none;}
>A:hover {color:444444;text-decoration:none;}
>-->
></style>
><script LANGUAGE="JavaScript">
><!--
>var ButtonSound = new Array();
>ButtonSound[0] = "1.wav"; //사운드 파일의 경로
>ButtonSound[1] = "2.wav"; //사운드 파일의 경로
>ButtonSound[2] = "3.wav"; //사운드 파일의 경로
>document.write('<BGSOUND ID="alertsound">')
>IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
>NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
>ver4 = IE||NS? 1:0;
>onload=auPreload;
>
>function auPreload() {
>if (!ver4) return;
>if (NS) auEmb = new Layer(0,window);
>else {
>Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
>document.body.insertAdjacentHTML("BeforeEnd",Str);
>}
>var Str = '';
>for (i=0;i<ButtonSound.length;i++)
>Str += "<EMBED SRC='"+ButtonSound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
>if (IE) auEmb.innerHTML = Str;
>else {
>auEmb.document.open();
>auEmb.document.write(Str);
>auEmb.document.close();
>}
>auCon = IE? document.all.alertsound:auEmb;
>auCon.control = auCtrl;
>}
>function auCtrl(whSound,play) {
>if (IE) this.src = play? ButtonSound[whSound]:'';
>else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
>}
>function musicplay(whSound) { if (window.auCon) auCon.control(whSound,true); }
>function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }
>//-->
></script>
>
>
>
>
>
><a href="#" onmouseover="musicplay(0)">아햏햏</a>,
>
><a href="#" onClick="musicplay(1)">스타쉬피스</a>,
>
><a href="#" onClick="musicplay(2)">뚫흙뚫흙</a>,
>
>
>
>
>
>
>
댓글 5
-
수현♡
2003.05.05 17:52
-
covingtoN
2003.05.08 09:05
훌륭한 팁 감사합니다.
수현님, 주소는 사운드출력부의 앞에 들어가믄 옳을 듯 싶네요. -
RedEye
2003.05.12 13:36
수현// <a OnClick="bgsoundcall('music.src='click2.wav'');">건들면 소리지를꼬얌~ ㅜ,ㅡ</a>
일반적으로 텍스트에서는 ← 으로 표시되지만 아스키로는 역슬레시( / 의 반대) 로 표시된답니다. (" " 쌍따옴표가 있을시에 웹 컴파일에서는 필히 넣어줘야 하는 안그러면 오류발생 함)
음,, 그건 좀 설명하기가 그렇고 아무튼 음악파일은 '사운드.wav' 에서 사운드.wav를 사용코자 하는 음악파일로 바꾸어주심 됩니다. -
kadarica
2003.06.06 13:46
잼있네요...
우리도 할쭐안다이~ 울도 낑겨줘~~~~~~ OnClick만 싸고돌아 앙~~ ㅠ,ㅜ
이 말이 압권 -
miho
2007.12.02 22:35
안되네요..
제목 | 글쓴이 | 날짜 |
---|---|---|
[나모] 책갈피 만들기 [5] | 쭘's | 2003.03.12 |
[나모] CSS 만들기 I | 쭘's | 2003.03.12 |
[나모] CSS 만들기 II | 쭘's | 2003.03.12 |
[나모] CSS 만들기 III | 쭘's | 2003.03.12 |
[HTML 초보자] 열거목록에 대한 스타일정의 네번째 마지막 | ZipShin | 2003.03.17 |
캐시 사용하지 않기 [5] | FriZeX*-_-* | 2003.03.17 |
쭘's 식 쉽게 홈페이지 만들기 [15] | 쭘's | 2003.03.17 |
HTML의 정의 [8] | 이태운 | 2003.03.23 |
노프레임홈페이지 디비기 1 - 계층 [16] | 리디 | 2003.03.25 |
펼침 목록 메뉴 만들기! (나모) - 쭘's [8] | 쭘's | 2003.03.25 |
노프레임홈페이지 디비기 2 - 헤더와 풋터 [57] | 리디 | 2003.03.26 |
쭘's식 홈페이지 만들기 No.2 - 예제 미리보기 포함 [14] | 쭘's | 2003.03.30 |
노프레임홈페이지 디비기 3 - 경로 [42] | 리디 | 2003.03.31 |
홈페이지의 위아래를 바꾸어 보자! [10] | 세죠위그이 | 2003.04.01 |
HTML 기본 구성 ( HTML 왕초보만 보세혀.. ) [7] | kkaza™ | 2003.04.05 |
노프레임홈페이지 디비기 4 - 쌍벽 [36] | 리디 | 2003.04.08 |
스스로 사라지는 웹페이지 만들기 [3] | 최재철 | 2003.04.08 |
테이블에 dot 효과를 주자~~~~~~~~~~~~~~~~~~~~ [5] | 조일현 | 2003.04.08 |
self.close 묻지 않고 닫기 [6] | REAL | 2003.04.09 |
[re] 링크 클릭시 사운드 효과 [헤헤~ 더 간단하게] [5] | RedEye | 2003.04.13 |
<a OnClick="bgsoundcall('music.src='사운드.wav''+ ');">건들면 소리지를꼬얌~ ㅜ,ㅡ</a>
이 구문에서.. 사운드 주소를 넣을때.. 사운드 어쩌구 이렇게 되어있잖아요
까지 포함해서 없앤후에 주소를 넣나요.. 아니면 '사운드.wav'+ ' 만
없애구 주소를 집어넣나요 ? 주소를 정확히 어느 부분에 넣어야 할지.. -_-;;; 난감