...

View Full Version : Scrollable content II Modification Help



ubh
04-25-2008, 11:29 PM
Hi,
I was wondering if anyone could help me make the below script scroll text not up and down but left and right.

http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

I have been trying to accomplish this for sometime now but I am not that good with JavaScript.

I don't want to change any of the internal workings of the script but only need it to be scrolling left to right instead of up and down.

Can anyone please help me with this?

MANY MANY Thanks in advance.
UbH

rangana
04-26-2008, 03:53 AM
Change your script to:


<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
if (iens6&&parseInt(crossobj.style.left)>=(contentheight*(-1)+100))
crossobj.style.left=parseInt(crossobj.style.left)-speed+"px"
else if (ns4&&crossobj.left>=(contentheight*(-1)+100))
crossobj.left-=speed
movedownvar=setTimeout("movedown()",20)
}

function moveup(){
if (iens6&&parseInt(crossobj.style.left)<=0)
crossobj.style.left=parseInt(crossobj.style.left)+speed+"px"
else if (ns4&&crossobj.left<=0)
crossobj.left+=speed
moveupvar=setTimeout("moveup()",20)

}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum