VERTICAL SCROLLING

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alain

    VERTICAL SCROLLING

    Hello, I would like this script to work from up to down (reverse direction)
    : http://www.sites-web.com/temp/vscroll_down_up.html

    Many thanks :)

    Alan



    <html>
    <head>
    </head>

    <body>

    <script language="JavaS cript1.2">

    /*
    Pausing updown message scroller-
    © Dynamic Drive (www.dynamicdrive.com)
    For full source code, installation instructions,
    Terms Of Use, visit http://www.dynamicdrive.com
    */

    //configure the below five variables to change the style of the scroller
    var scrollerwidth=' 180px'
    var scrollerheight= '65px'
    var scrollerbgcolor ='#000000'
    //set below to '' if you don't wish to use a background image
    var scrollerbackgro und=''

    //configure the below variable to change the contents of the scroller
    var messages=new Array()
    messages[0]=""
    messages[1]="<br><p align=center><f ont face=Terminal size=6
    color=#009D00>T EST</font></p>"


    ///////Do not edit pass this line///////////////////////

    var ie=document.all
    var dom=document.ge tElementById

    if (messages.lengt h>2)
    i=2
    else
    i=0

    function move1(whichlaye r){
    tlayer=eval(whi chlayer)
    if (tlayer.top>0&& tlayer.top<=5){
    tlayer.top=0
    setTimeout("mov e1(tlayer)",500 0)
    setTimeout("mov e2(document.mai n.document.seco nd)",1000)
    return
    }
    if (tlayer.top>=tl ayer.document.h eight*-1){
    tlayer.top-=5
    setTimeout("mov e1(tlayer)",50)
    }
    else{
    tlayer.top=pars eInt(scrollerhe ight)
    tlayer.document .write(messages[i])
    tlayer.document .close()
    if (i==messages.le ngth-1)
    i=0
    else
    i++
    }
    }

    function move2(whichlaye r){
    tlayer2=eval(wh ichlayer)
    if (tlayer2.top>0& &tlayer2.top<=5 ){
    tlayer2.top=0
    setTimeout("mov e2(tlayer2)",50 00)
    setTimeout("mov e1(document.mai n.document.firs t)",1000)
    return
    }
    if (tlayer2.top>=t layer2.document .height*-1){
    tlayer2.top-=5
    setTimeout("mov e2(tlayer2)",50 )
    }
    else{
    tlayer2.top=par seInt(scrollerh eight)
    tlayer2.documen t.write(message s[i])
    tlayer2.documen t.close()
    if (i==messages.le ngth-1)
    i=0
    else
    i++
    }
    }

    function move3(whichdiv) {
    tdiv=eval(which div)
    if (parseInt(tdiv. style.top)>0&&p arseInt(tdiv.st yle.top)<=5){
    tdiv.style.top= 0+"px"
    setTimeout("mov e3(tdiv)",5000)
    setTimeout("mov e4(second2_obj) ",1000)
    return
    }
    if (parseInt(tdiv. style.top)>=tdi v.offsetHeight*-1){
    tdiv.style.top= parseInt(tdiv.s tyle.top)-5+"px"
    setTimeout("mov e3(tdiv)",50)
    }
    else{
    tdiv.style.top= parseInt(scroll erheight)
    tdiv.innerHTML= messages[i]
    if (i==messages.le ngth-1)
    i=0
    else
    i++
    }
    }

    function move4(whichdiv) {
    tdiv2=eval(whic hdiv)
    if (parseInt(tdiv2 .style.top)>0&& parseInt(tdiv2. style.top)<=5){
    tdiv2.style.top =0+"px"
    setTimeout("mov e4(tdiv2)",5000 )
    setTimeout("mov e3(first2_obj)" ,1000)
    return
    }
    if (parseInt(tdiv2 .style.top)>=td iv2.offsetHeigh t*-1){
    tdiv2.style.top =parseInt(tdiv2 .style.top)-5+"px"
    setTimeout("mov e4(second2_obj) ",50)
    }
    else{
    tdiv2.style.top =parseInt(scrol lerheight)
    tdiv2.innerHTML =messages[i]
    if (i==messages.le ngth-1)
    i=0
    else
    i++
    }
    }

    function startscroll(){
    if (ie||dom){
    first2_obj=ie? first2 : document.getEle mentById("first 2")
    second2_obj=ie? second2 : document.getEle mentById("secon d2")
    move3(first2_ob j)
    second2_obj.sty le.top=scroller height
    second2_obj.sty le.visibility=' visible'
    }
    else if (document.layer s){
    document.main.v isibility='show '
    move1(document. main.document.f irst)
    document.main.d ocument.second. top=parseInt(sc rollerheight)+5
    document.main.d ocument.second. visibility='sho w'
    }
    }

    window.onload=s tartscroll

    </script>


    <ilayer id="main" width=&{scrolle rwidth}; height=&{scroll erheight};
    bgColor=&{scrol lerbgcolor}; background=&{sc rollerbackgroun d};
    visibility=hide >
    <layer id="first" left=0 top=1 width=&{scrolle rwidth};>
    <script language="JavaS cript1.2">
    if (document.layer s)
    document.write( messages[0])
    </script>
    </layer>
    <layer id="second" left=0 top=0 width=&{scrolle rwidth}; visibility=hide >
    <script language="JavaS cript1.2">
    if (document.layer s)
    document.write( messages[dyndetermine=(m essages.length= =1)? 0 : 1])
    </script>
    </layer>
    </ilayer>

    <script language="JavaS cript1.2">
    if (ie||dom){
    document.writel n('<div id="main2"
    style="position :relative;width :'+scrollerwidt h+';height:'+sc rollerheight+'; o
    verflow:hidden; background-color:'+scrolle rbgcolor+'
    ;background-image:url('+scr ollerbackground +')">')
    document.writel n('<div
    style="position :absolute;width :'+scrollerwidt h+';height:'+sc rollerheight+'; c
    lip:rect(0 '+scrollerwidth +' '+scrollerheigh t+' 0);left:0px;top :0px">')
    document.writel n('<div id="first2"
    style="position :absolute;width :'+scrollerwidt h+';left:0px;to p:1px;">')
    document.write( messages[0])
    document.writel n('</div>')
    document.writel n('<div id="second2"
    style="position :absolute;width :'+scrollerwidt h+';left:0px;to p:0px;visibilit y
    :hidden">')
    document.write( messages[dyndetermine=(m essages.length= =1)? 0 : 1])
    document.writel n('</div>')
    document.writel n('</div>')
    document.writel n('</div>')
    }
    </script>

    </body>
    </html>





  • Hywel Jenkins

    #2
    Re: VERTICAL SCROLLING

    In article <bds2kt$3nn$1@n ews-reader4.wanadoo .fr>,
    alain@sitesweb. comNOSPAM says...[color=blue]
    > Hello, I would like this script to work from up to down (reverse direction)
    > : http://www.sites-web.com/temp/vscroll_down_up.html[/color]

    I'd like a Lamborghini Diablo.

    --
    Hywel Never knowingly understood


    Comment

    Working...