Results 1 to 4 of 4

Thread: Left-Right Scrolling Window Script

  1. #1
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Left-Right Scrolling Window Script

    I'd like to modify this script so that when the mouse is over the scrolling frame the scrolling stops, and restarts when the mouse is moved off. Can anyone help? To get an idea of why I'm asking, surf to http://www.popsrun.org/ and click on any of the "Photos from..." links.

  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

    First of all you have some syntax errors. Wherever you have:
    Code:
    onMouseOut="window.status='2001 Pop's Run Photo Album'; return true"
    it should be:
    Code:
    onMouseOut="window.status='2001 Pop\'s Run Photo Album'; return true;"
    this is true of all places you have Pop's in the onMouseOut events, regardless of the year involved. Also the 'return true' in the onMouseOver & onMouseOut events should be 'return true;' but, that (the semicolon) isn't critical. Once that is taken care of you can go about creating your pause like so, replace this line:
    Code:
    setInterval("scrollwindow()",10)
    with:
    Code:
    ralph=setInterval("scrollwindow()",10)
    add this line:
    Code:
    var ralph
    under this line:
    Code:
    var speed=1
    Replace this line:
    Code:
    strength=(which==0)? 1 : 0.7
    with these lines:
    Code:
    if (which==0){
    strength=1;
    clearInterval(ralph);
    }
    if (which==1){
    strength=0.7;
    startit();
    }
    That's it, works here in IE6, NS7.2 & FF1.0.3
    - John
    ________________________

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

  3. #3
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ah, thank you. I corrected the apostrophe in the main page, but missed that in the scripts that generate the photo albums. Once my broadband access is restored I'll make those changes you've suggested. I've forgotten how BAD dial up access can be!!

  4. #4
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you, that did the trick! It's working the way I envisioned. I've also added a link on my pages back to Dynamic Drive so you guys get the credit even if people don't view the page source. Thanks again!

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
  •