Results 1 to 4 of 4

Thread: Modified Image Ticker Question

  1. #1
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default Modified Image Ticker Question

    I used a dynamic drive script (forget which one, but it's an image ticker) and modified it a bit. I added an image on the right and left to help scrolling (and make it look a bit better). Anyway, I'm wondering how to add a onmouseover and/or onclick function to these two images to make the ticker scroll - or even ANY function to them to do so.

    Here's the page: http://www.unwantedchildren.com/quinn/
    JS: http://www.unwantedchildren.com/quinn/motiongallery.js
    CSS: http://www.unwantedchildren.com/quinn/gallerystyle.css

    I'd also like some way to replace the <nobr> tag, as it does not pass validation:

    http://validator.w3.org/check?uri=ht...Inline&group=0
    Last edited by alexjewell; 08-09-2007 at 11:35 PM.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    EDIT: Nevermind on the <nobr> question; I used the css white-space: nowrap; and it seems to work alright.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  3. #3
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Alright, I've gotten a bit further by adding onmouseover/onclick events to the images, but the issue is that the functions uses in these events don't actually work until you put your mouse over the ticker and move it the original way (meaning, it's like the functions only load after being used there)

    I tried adding an onload function to the body, to "preload" the moveright(), moveleft(), and stopmotion() functions, but it stopped the ticker from working altogether.

    Any ideas?
    (http://www.unwantedchildren.com/quinn/)
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  4. #4
    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

    You need to do more than call moveright() or moveleft(), you also need to set a scrollspeed:

    Code:
    onmouseover="scrollspeed=3;moveleft();"
    - John
    ________________________

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

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
  •