PDA

View Full Version : Modified Image Ticker Question



alexjewell
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:

http://validator.w3.org/check?uri=http&#37;3A%2F%2Fwww.unwantedchildren.com%2Fquinn%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

alexjewell
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.

alexjewell
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?
(http://www.unwantedchildren.com/quinn/)

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


onmouseover="scrollspeed=3;moveleft();"