View Full Version : Modified Image Ticker Question

08-09-2007, 10:32 PM
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:


08-09-2007, 11:43 PM
EDIT: Nevermind on the <nobr> question; I used the css white-space: nowrap; and it seems to work alright.

08-09-2007, 11:57 PM
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?

08-10-2007, 03:55 AM
You need to do more than call moveright() or moveleft(), you also need to set a scrollspeed: