Results 1 to 3 of 3

Thread: marquee speed control

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

    Default marquee speed control

    i have a marquee script that makes a button, to make marquee text speedup

    here is that script
    <a href="javascript:scroller.scrollAmount=scroller.scrollAmount+1;">fast</a>

    i tried this one to make it slow down but didnt work

    <a href="javascript:scroller.scrollAmount=scroller.scrollAmount/1;">slow</a>

    i tried other ways but couldnt get it to work
    can anyone help

  2. #2
    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:
    <a href="javascript:scroller.scrollAmount=scroller.scrollAmount/1;">slow</a>
    That's dividing it by one. Any number divided by one equals itself. Try:

    Code:
    <a href="javascript:scroller.scrollAmount=(scroller.scrollAmount-1);">slow</a>
    Or even:

    <a href="javascript:scroller.scrollAmount=parseInt(scroller.scrollAmount)-1;">slow</a>

    If neither of these work, I'd need to see the full script in action to determine the problem(s).

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    - John
    ________________________

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

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

    Default found better way

    thanks for your reply but found way that works better for what i want
    here is script just incase your interested

    <table width="60%" height="200" border="2" align="center" cellpadding="2" cellspacing="2">
    <tr>
    <td height="300" align="right"><div align="left">
    <marquee behavior=scroll id="scroller" width=100% scrollamount=5>
    i used images here not text
    </marquee>
    </div></td>
    </tr>
    </table>

    <div align="center">
    <h2><font size="+2">| <a href="javascript:scroller.direction='left'">Forward</a>
    | <a href="javascript:scroller.start()">Start</a> | <a href="javascript:scroller.stop()">Stop</a>
    | <a href="javascript:scroller.direction='right'">Backward</a> | </font></h2>
    <h2><font size="+2">| <a href="javascript:scroller.scrollAmount=scroller.scrollAmount*3-scroller.scrollAmount;">Faster</a>
    | <a href="javascript:scroller.scrollAmount=scroller.scrollAmount*10/7-scroller.scrollAmount;">Slower</a>
    | </font></h2>



    any other way i did the faster and slower button made the images go in reverse after slowing down enough.
    this way it doesnt go past scrollamount of 0 in both direction

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
  •