Results 1 to 6 of 6

Thread: memory scroller RTL direction..

  1. #1
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default memory scroller RTL direction..

    Hi all =)

    I'm trying to fit this Scroller to move from the left to the right for RTL text

    The Scroller

    I'm trying to mess around with the style.left.. style.right.. the < and > signs and other info, but i couldn't make it

    please if someone with a little more knowledge of DOM JS could help me it will be great!

    thank you very much!

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

    Default

    Well, I really don't have any idea of what is going on inside most of the script, but by just playing with the numbers in it, I found a way to do it:


    Find this, the second paragraph under the //NO NEED TO EDIT comment:
    Code:
    var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="savelastmsg()" ' : ''
    memoryspeed=(document.all)? memoryspeed : Math.max(-1, memoryspeed-10) //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('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-10000px">'+memorycontent+'</span>')
    var actualwidth=''
    var memoryscroller
    The values in red are what need to be changed.
    The first one was 1, and now is -1... makes sense, right? Negative=backwards...
    The other one... just by trial and error, found that it needed to be bigger. It was 1, but that didn't allow it to go backwards (no idea why), and changing from 1 to 10 made it work.

    WARNING: This is just chopping at the script til it works; I'm not sure what will be different about it now; perhaps someone else can explain the "correct" way or why this is, if it is, wrong.

    Anyway... that should work for you. I'd recommend trying different numbers, and seeing what works for you.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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

    Default thank you for posting, but still having problem look..

    Code:
    Math.max(1, memoryspeed-1) //slow speed down by 1 for NS
    this one says : make the speed lower for Netscape based browser...

    I've been able to find how to cnahge the direction, it was easy make sence like you said but in here...
    Code:
    function scrollmarquee(){
    if (parseInt(memoryscroller.style.left)>(actualwidth*(-1)+8))
    memoryscroller.style.left=parseInt(memoryscroller.style.left)+copyspeed+"px"
    else
    memoryscroller.style.left=parseInt(memorywidth)+8+"px"
    }
    this this function I've changed the - to + (mark in red) to make the style.left grow instead of shrinking, so its moving to the right but....

    the problem is that i can't find the way to set the init position to be at the left side instead of the right side, and how to change the IF (mark is blue) to answer the question "when to go back to the start"

    thanks again, and i hope someone else will post another solution

  4. #4
    Join Date
    Jun 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default did it!



    Code:
    function scrollmarquee(){
    if (parseInt(memoryscroller.style.left)<parseInt(memorywidth))
    memoryscroller.style.left=parseInt(memoryscroller.style.left)+copyspeed+"px"
    else
    memoryscroller.style.left=-actualwidth+"px"
    }
    so ..
    IF the memoryscroller.style.left is < from the memorywidth
    keep pushing it the the right by add +copyspeed to it

    ELSE set the memoryscroller.style.left to the -actualwidth

    )

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

    Default

    Hmm.. alright. What I did worked in Safari and Mozilla.
    Again, never said it was the "right" way
    Glad you figured it out.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Jun 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default It didn't work !!!

    It didn't work with me !! please can you write the whole script here or just email it to me .

    Email : alhakeem2001@hotmail.com

    Thanks,


    Omar

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
  •