# Using javascript instead of flash to make an image scroller

**URL:** <https://forum.kirupa.com/t/using-javascript-instead-of-flash-to-make-an-image-scroller/210701>\
**Category:** web dev\
**Created:** [December 21, 2006, 5:29am UTC](https://forum.kirupa.com/t/using-javascript-instead-of-flash-to-make-an-image-scroller/210701 "2006-12-21T05:29:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [December 21, 2006, 5:29am UTC](https://forum.kirupa.com/t/using-javascript-instead-of-flash-to-make-an-image-scroller/210701/1 "2006-12-21T05:29:14Z")

</div>

[http://www.beyondtoday.com.au/newtestsite/](http://www.beyondtoday.com.au/newtestsite/)  
(html page)  
[http://www.beyondtoday.com.au/newtestsite/styles.css](http://www.beyondtoday.com.au/newtestsite/styles.css)  
(css)  
[http://www.beyondtoday.com.au/newtestsite/scripts.js](http://www.beyondtoday.com.au/newtestsite/scripts.js)  
(javascript)

This is an attempt to create something in Javascript that would be piss easy to make in flash but its better to make in XHTML+Javascript…Nokrev where are you when i need you :devious:

Anyway, roll over the right half of the images and they will start scrolling right, and once its moved right a bit, if you go over the left half it will scroll back…

all good so far - but the images are actually \<a\> tags with background images, and that CSS rollover trick to reposition the image to bottom left when u hover…

but - the 2 invisible divs that are used with onmouseover and onmouseout to trigger the scrolling intervals in the javascript are \*\*blocking \*\*the rollovers of the \<a\> tags, and not only that i cant even click the \<a\>'s :hurt:

Is there a way to test where the mouse is positioned in relation to the container div so i can trigger my scrolling functions in the javascript? A way that allows the child divs to be rolled over and clicked?

Nokrev - im working this “Avoid Flash if u can do it in Javascript” philosphy as hard as i can give us a hand eh 🍺
