묻고답하기
이미지 슬라이딩
2009.06.06 12:40
메인화면에 이미지 슬라이딩 같이 쓰려고 아래 소스를 구해서 넣었더니 메인 홈페이지 접속 시도만 계속되는 군요.
꼭 좀 이 소스를 쓰고 싶은데 문제없이 쓸 수 있는 방법은 없나요. 현재 버전은 1.2.3 입니다.
홈페이지는 이곳이고요. http://newthing.kr
소스는 아래
<table style="line-height:150%;" align="center" cellpadding="0" cellspacing="0" width="500">
<tr>
<td width="500" height="200">
<SCRIPT>
function checkifloaded() {
if (imgpreload.complete) {
nowtime=new Date()
nowtime=nowtime.getTime()
nowtime=nowtime-starttime
var interval=standstill-nowtime
if (interval<=0 ) {
interval=1
}
if (firstslide) {
interval=1
firstslide=false
}
if (i_preloadloop==i_loop) {
interval=1
}
timerrotate=setTimeout("rotateimages()", interval)
}
else {
timercheck=setTimeout("checkifloaded()", 100)
}
}
function preloadimage() {
imgpreload=new Image()
imgpreload.src="./imgurl[i_preloadloop]
}
function rotateimages() {
i_loop=i_preloadloop
i_preloadloop=randommaker()
checkpreloadtime()
preloadimage()
getcontent()
if (document.all) {
imgs.filters[i_transition].apply()
imgs.innerHTML=contentimg
imgs.filters[i_transition].play()
i_transition++
if (i_transition>21) {i_transition=0}
mes.innerHTML=contentmes
}
if (ns6) {
document.getElementById("imgs').innerHTML=contentimg
document.getElementById('mes').innerHTML=contentmes
}
if (document.layers) {
document.topdiv.document.imgs.document.write(contentimg)
document.topdiv.document.imgs.document.close()
document.topdiv.document.mes.document.write(contentmes)
document.topdiv.document.mes.document.close()
}
i_loop++
checkifloaded()
}
function randommaker() {
rand=Math.floor(slideshowlength*Math.random())
return rand
}
function getcontent() {
contentimg="<img src="./+imgurl[i_loop]+">"
contentmes="<table cellpadding=2 cellspacing=0 border=0 bgcolor="+bgrndcolor+" width="+imagewidth+"><tr><td><font size="+fntsize+" color="+fntcolor+" face="+fntfamily+">"+message[i_loop]+"</font></td></tr></table>"
}
if (document.all) {
document.write('<div id="topdiv" style="position:relative;width:'+imagewidth+'px;height:'+topdivheight+'px">')
document.write('<div id="mes" style="position:absolute;"> </div>')
document.write('<div id="imgs" style="position:absolute;filter: revealTrans(Transition=1, Duration=2) revealTrans(Transition=2, Duration=2) revealTrans(Transition=3, Duration=2) revealTrans(Transition=4, Duration=2) revealTrans(Transition=5, Duration=1) revealTrans(Transition=6, Duration=2) revealTrans(Transition=7, Duration=2) revealTrans(Transition=8, Duration=1) revealTrans(Transition=9, Duration=2) revealTrans(Transition=10, Duration=1) revealTrans(Transition=11, Duration=2) revealTrans(Transition=12, Duration=2) revealTrans(Transition=13, Duration=1) revealTrans(Transition=14, Duration=2) revealTrans(Transition=15, Duration=2) revealTrans(Transition=16 Duration=1) revealTrans(Transition=17, Duration=2) revealTrans(Transition=18, Duration=2) revealTrans(Transition=19, Duration=1) revealTrans(Transition=20, Duration=2) revealTrans(Transition=21, Duration=2) revealTrans(Transition=22, Duration=2)"> </div>')
document.write('</div>')
}
if (ns6) {
document.write('<div id="topdiv" style="position:relative;width:'+imagewidth+'px;height:'+topdivheight+'px">')
document.write('<div id="mes" style="position:absolute;"> </div>')
document.write('<div id="imgs" style="position:absolute;"> </div>')
document.write('</div>')
}
if (document.layers) {
document.write('<ilayer name="topdiv" width='+imagewidth+' height='+topdivheight+'>')
document.write('<layer name="mes"> </layer>'+
'+
')
document.write('<layer name="imgs"> </layer>')
document.write('</ilayer>')
}
function checkpreloadtime() {
starttime= new Date()
starttime=starttime.getTime()
}
function checktime() {
}
window.onresize=new Function("window.location.reload()");
window.onload=init
</SCRIPT>
</td>
</tr>
</table>
답변이 안올라와 스스로 해결했네요. 잘 돌아 갑니다. 모든 분들 감사합니다.