웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
[초간단 자바스크립트!] 이미지에 스포트라이트 효과주기...
2003.09.26 23:04
//이건 쪼끔... 수준있는거네요..(퍽...!아니면 죄송해요...;;) 어쨌든 저로서는 좀
수준있는 거였네요...;; 이건 그래도 쓰실 분이 계실지는...;;
1) 이거 <head></head>사이에 너여요...;[아마도..(?)]
<style>
<!--
#spotlight{
filter:light
}
-->
</style>
2) 이거는 <body></body>사이에 넣구요...[아마도...ㅋ 죄송..]
<img id="spotlight" speed="60" src="이미지경로"> <!--속도와 이미지경로-->
<script language="JavaScript1.2">
if (document.all&&window.spotlight){
var x=new Array()
var direction=new Array()
var y=new Array()
if (spotlight.length==null){
spotlight[0]=document.all.spotlight
x[0]=0
direction[0]="right"
y[0]=spotlight[0].height
spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)
}
else
for (i=0;i<spotlight.length;i++){
x[i]=0
direction[i]="right"
y[i]=spotlight[i].height
spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)
}
}
function slidelight(cur){
spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)
if (x[cur]<spotlight[cur].width+200&&direction[cur]=="right")
x[cur]+=10
else if (x[cur]>spotlight[cur].width+200){
direction[cur]="left"
x[cur]-=10
}
else if (x[cur]>-200&&x[cur]<-185){
direction[cur]="right"
x[cur]+=10
}
else{
x[cur]-=10
direction[cur]="left"
}
}
if (document.all&&window.spotlight){
if (spotlight.length==null)
setInterval("slidelight(0)",spotlight[0].speed)
else
for (t=0;t<spotlight.length;t++){
var temp='setInterval("slidelight('+t+')",'+spotlight[t].speed+')'
eval(temp)
}
}
</script>
//이거 넘 어렵지만, 대충 배껴서 쓰시면.. 괜찮을듯...
에러날 가능성이 많으니까.. 리플꼭 다라주세요..;;
수준있는 거였네요...;; 이건 그래도 쓰실 분이 계실지는...;;
1) 이거 <head></head>사이에 너여요...;[아마도..(?)]
<style>
<!--
#spotlight{
filter:light
}
-->
</style>
2) 이거는 <body></body>사이에 넣구요...[아마도...ㅋ 죄송..]
<img id="spotlight" speed="60" src="이미지경로"> <!--속도와 이미지경로-->
<script language="JavaScript1.2">
if (document.all&&window.spotlight){
var x=new Array()
var direction=new Array()
var y=new Array()
if (spotlight.length==null){
spotlight[0]=document.all.spotlight
x[0]=0
direction[0]="right"
y[0]=spotlight[0].height
spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)
}
else
for (i=0;i<spotlight.length;i++){
x[i]=0
direction[i]="right"
y[i]=spotlight[i].height
spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)
}
}
function slidelight(cur){
spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)
if (x[cur]<spotlight[cur].width+200&&direction[cur]=="right")
x[cur]+=10
else if (x[cur]>spotlight[cur].width+200){
direction[cur]="left"
x[cur]-=10
}
else if (x[cur]>-200&&x[cur]<-185){
direction[cur]="right"
x[cur]+=10
}
else{
x[cur]-=10
direction[cur]="left"
}
}
if (document.all&&window.spotlight){
if (spotlight.length==null)
setInterval("slidelight(0)",spotlight[0].speed)
else
for (t=0;t<spotlight.length;t++){
var temp='setInterval("slidelight('+t+')",'+spotlight[t].speed+')'
eval(temp)
}
}
</script>
//이거 넘 어렵지만, 대충 배껴서 쓰시면.. 괜찮을듯...
에러날 가능성이 많으니까.. 리플꼭 다라주세요..;;
댓글 1
제목 | 글쓴이 | 날짜 |
---|---|---|
[초간단 자바스크립트(강의)!] 버튼을 눌러서 배경색 바꾸기 [5] | ∑Ztxy | 2003.09.26 |
[초간단 자바스크립트!] 이미지에 스포트라이트 효과주기... [1] | ∑Ztxy | 2003.09.26 |
[초간단 자바스크립트!] 뒤로,앞으로,중지,홈으로 버튼 만들기... [7] | ∑Ztxy | 2003.09.26 |
[초간단 자바스크립트!] 창 이동시 경고 메세지 띄우기...!;;; [2] | ∑Ztxy | 2003.09.26 |
플레쉬 메뉴를 표방한..=ㅁ= 자바스크립트의 수작 버튼 밑으로 스크롤 되는 아이콘입니다. [47] | beMax | 2003.09.14 |
### MSN/Windows Messenger용 친구 추가스크립트 ### [10] | 웹스 | 2003.09.05 |
변수란? [1] | 타키 | 2003.09.04 |
진수란? [4] | 타키 | 2003.09.04 |
홈에 TT WEB FTP 달기 [12] | PHASE | 2003.09.03 |
frame으로 홈페이지 구성시 한쪽 페이지는 유동성있는 파일 대입법(?) | monozzang | 2003.09.02 |
주어진 값이 한글,영어,숫자인지 체크 [2] | 한승진 | 2003.08.29 |
전화번호 유효성 검사(핸폰,집전화 몽땅) [4] | 한승진 | 2003.08.29 |
변수에서 숫자만 리턴합니다. | 한승진 | 2003.08.29 |
변수의 실제 바이트 수를 리턴하는 팁 [2] | 한승진 | 2003.08.29 |
메인 접속하면 할아버지 나오는... [6] | 공유 | 2003.08.28 |
마우스 움직임에 따라 속도도, 방향도 자유자재 스크롤 소스 [1] | RedEye(kaist) | 2003.08.24 |
경우에 따라 공지가 새창에서도 보여야 하고, 일반 페이지에서도 보여야 할때 | 조은하루 | 2003.08.22 |
[수정]롤오버 메뉴에 하위 부메뉴 레이어..(아웃시 하위메뉴사라짐) [24] | 미니 | 2003.08.18 |
재미있는놀이 [ 숫자맞추기] [3] | NzeoZen | 2003.08.16 |
배경도 이제 선택한다!!? [2] | NzeoZen | 2003.08.16 |