Results 1 to 8 of 8

Thread: Making memory scroller vertical?

  1. #1
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making memory scroller vertical?

    Script: Memory Scroller
    http://www.dynamicdrive.com/dynamici...ryscroller.htm

    How can I make the script scroll something vertically?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's a bizarre idea because text doesn't go up and down.

    totally untested guess that probably won't work without some more tweaking:

    Basically... switch anything "horizontal" to "vertical", x to y, width to height, etc etc. and the reverse.

    then for your content use
    l<br>
    i<br>
    k<br>
    e<br>
    <br>
    t<br>
    h<br>
    i<br>
    s<br>

    ...ew, Heh.


    Do you want do to images? I just saw a thread today with a cool script for that, but I can't seem to find where it is. I'll post if I do see it.
    But... consider, if you're not, using images. that way you don't have to deal with a line break after every letter.

    I don't think this is a great idea... but I can be convinced... why do you need vertical?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    </head>
    <body>
    <script type="text/javascript">
    
    /***********************************************
    * Memory Scroller script-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    var memoryheight="150px" //scroller height
    var memorywidth="200px" //scroller width
    var memorybgcolor="#DEFDD9" //scroller background
    var memorypadding="2px" //padding applied to the scroller. 0 for none.
    var borderCSS="border: 1px solid black;" //Border CSS, applied to scroller to give border.
    
    var memoryspeed=2 //Scroller speed (larger is faster 1-10)
    var pauseit=1 //Pause scroller onMousever (0=no. 1=yes)?
    
    var persistlastviewedmsg=1 //should scroller's position persist after users navigate away (1=yes, 0=no)?
    var persistmsgbehavior="onload" //set to "onload" or "onclick".
    
    //Specify the scroller's content (don't delete <nobr> tag)
    //Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
    
    var memorycontent='<div style="font: bold 13px Verdana">Thank you for visiting <a href="http://www.dynamicdrive.com">Dynamic Drive.</a><br>&nbsp;<br>&nbsp; If you find this script useful, please consider <a href="http://www.dynamicdrive.com/link.htm">linking to</a> or <a href="http://www.dynamicdrive.com/recommendit/">recommending</a> Dynamic Drive.</div>'
    
    
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    var combinedcssTable="height:"+(parseInt(memoryheight)+6)+"px;background-color:"+memorybgcolor+";padding:"+memorypadding+";"+borderCSS+";"
    var combinedcss="height:"+memoryheight+";width:"+memorywidth+";"
    
    var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
    memoryspeed=(document.all)? memoryspeed : Math.max(1, memoryspeed-1) //slow speed down by 1 for NS
    var copyspeed=memoryspeed
    var pausespeed=(pauseit==0)? copyspeed: 0
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<div id="temp" style="visibility:hidden;position:absolute;left:-100px;top:-10000px; width:'+memorywidth+';">'+memorycontent+'</div>')
    var actualheight=''
    var memoryscroller
    
    if (window.addEventListener)
    window.addEventListener("load", populatescroller, false)
    else if (window.attachEvent)
    window.attachEvent("onload", populatescroller)
    else if (document.all || document.getElementById)
    window.onload=populatescroller
    
    function populatescroller(){
    memoryscroller=document.getElementById? document.getElementById("memoryscroller") : document.all.memoryscroller
    memoryscroller.style.top=parseInt(memoryheight)+8+"px"
    if (persistlastviewedmsg && get_cookie("lastscrollerpos")!="")
    revivelastmsg()
    memoryscroller.innerHTML=memorycontent
    actualheight=document.all? temp.offsetHeight : document.getElementById("temp").offsetHeight
    toptime=setInterval("scrollmarquee()",20)
    }
    
    function get_cookie(Name) {
    var search = Name + "="
    var returnvalue = ""
    if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) {
    offset += search.length
    end = document.cookie.indexOf(";", offset)
    if (end == -1)
    end = document.cookie.length;
    returnvalue=unescape(document.cookie.substring(offset, end))
    }
    }
    return returnvalue;
    }
    
    function savelastmsg(){
    document.cookie="lastscrollerpos="+memoryscroller.style.top
    }
    
    function revivelastmsg(){
    lastscrollerpos=parseInt(get_cookie("lastscrollerpos"))
    memoryscroller.style.top=parseInt(lastscrollerpos)+"px"
    }
    
    if (persistlastviewedmsg && persistmsgbehavior=="onload")
    window.onunload=savelastmsg
    
    function scrollmarquee(){
    if (parseInt(memoryscroller.style.top)>(actualheight*(-1)+8))
    memoryscroller.style.top=parseInt(memoryscroller.style.top)-copyspeed+"px"
    else
    memoryscroller.style.top=parseInt(memoryheight)+8+"px"
    }
    
    if (iedom){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0" style="'+combinedcssTable+'"><td>')
    write('<div style="position:relative;overflow:hidden;'+combinedcss+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=memoryspeed">')
    write('<div id="memoryscroller" style="position:absolute;top:0px;left:0px;" '+divonclick+'></div>')
    write('</div>')
    document.write('</td></table>')
    }
    }
    </script>
    </body>
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hmmm. looks like it could only scroll some chunks of HTML.

    is it possible of having an IFRAME version of this?

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by pasawayz
    hmmm. looks like it could only scroll some chunks of HTML.

    is it possible of having an IFRAME version of this?
    Hmmm, was the original script you mentioned somehow iframe enabled that I missed? If so, how?

    If not, you really must tell me more about how you want an iframe involved in this vertical version.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I'm confused now as well.

  7. #7
    Join Date
    Oct 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default pause vertical memory scroller?

    Now that the memory scroller is able to scroll vertically, is it possible to make it pause? after a certain amount of pixels scrolled or maybe after a certain amount of seconds scrolled?

    Hope someone can figure that out, then this script will be the ultimate scroller.

  8. #8
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I was trying to use the modified (vertical) version of the memory scroller to present data from mysql. However, in Netscape (6) it pushes all contents far below, and drags it up along with the scrolling text. In IE that does not happen. Is it possible to solve the problem?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •