
29.05.2002, 05:04
|
|
Регистрация: Apr 2001
Адрес: Berlin
Сообщений: 1,862
|
Boт валяется у меня этот JS код. Я сам не пробовал. В оригинале этот код лежит отдельным js-файлом и вызывается с кнопок. Попробуй, может разберешься.
cSpeed = origSpeed = 4
tPos = 0
waiter = null
parent.scroll = true
function SCout(){
waiter = clearTimeout(waiter)
cSpeed=origSpeed
}
function speed(){
if (cSpeed<30)cSpeed +=5
}
function scroller(direction,layername){
if (parent.scroll){
if (NS4){
cLayer = document.layers['scrolltxt']
cLayer.h = cLayer.clip.height
if (direction=="down") {
cLayer.clip.top += cSpeed
cLayer.clip.bottom += cSpeed
cLayer.top -= cSpeed
} else if (direction=="up" && cLayer.clip.top>0) {
cLayer.clip.top -= cSpeed
cLayer.clip.bottom -= cSpeed
cLayer.top += cSpeed
}
} else {
if (direction=="down") tPos += cSpeed
else if (direction=="up" && tPos>0) tPos -= cSpeed
scrolltxt.scroll(0,tPos)
}
waiter = setTimeout("scroller('"+direction+"')",1)
}
}
|