View Full Version : modify crawler.js

09-18-2012, 06:44 PM
1) DD Script: crawler.js

2) Script on DD: http://www.dynamicdrive.com/dynamicindex2/crawler/index.htm

I think I have the proper posting procedure now, mea culpa.

Not a problem but a suggestion/request. Is it possible to modify/change/add to the list of selectable parameters for the marquee so that the "cursor controlled" movement of the marquee is limited to left only.

might look something like this:

uniqueid: 'mycrawler2',
style: {
'padding': '20px',
'width': "100%",
'height': '255px'

inc: 8, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven left only', //mouseover behavior ('pause' 'cursor driven' 'cursor driven left only' or false)
moveatleast: 2,
neutral: 50,

Thanks, Mike

09-19-2012, 02:31 AM
Please use the forum's bbcode tags to make your post more readable:

for php code............
<?php /* code goes here */ ?>
for html...............
<!-- markup goes here -->.....
for js/css/other.......
code goes here................

Interesting suggestion. I'm assuming there's a specific reason for this suggestion?

09-19-2012, 03:23 AM
I'm wondering why you would want that too.

That said it's much easier, rather than add a 'cursor driven left only' value for the mouse property, to just add a true/false leftonly property (right click and 'Save As'):


With the attached modified version you can add a leftonly boolean, ex:

<script type="text/javascript">
uniqueid: 'mycrawler',
style: {
'width': '700px',
'height': '150px'
inc: 10, //speed - pixel increment for each iteration of this marquee's movement or max speed if 'cursor driven'
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
stopped: true,
leftonly: true,
neutral: 150

That crawler will only move to the left.

09-19-2012, 06:27 PM
[QUOTE=jscheuer1;281626]I'm wondering why you would want that too.

John.....et al,

Thanks for working on this with me. The reason I wanted to give this a go is that in this particular situation I wanted to have a little more control over how the viewer
interacted with the page, giving them a little instruction on using the scroller with a minimum of input. I sent out a test page to a couple of people and they did say that it took them a little time to figure out how the mouse hover would impact the scroller.

I did think/hope the scroller would only accelerate when mousing over the right side of the image group. Now it accelerates when hovering over either end. Is it possible to have the hover only accelerate on the right hand side?

Here's a page with a note to the viewer above/right of the scroller that should help them. Not sure it'll be the finished "hint", but you get the idea.


Thanks again for you help.......its a great script, as are most of the ones on DD. You need a smiley "thumbs up" icon that can be dragged here. http://omgdroid.com/wp-content/uploads/2012/07/thumbs_up_bciy-300x259.jpg

09-19-2012, 07:37 PM
OK, try:


The usage is the same.

But I think that the explanation you have there is fine for use with the native motion of a 'cursor driven' crawler. So what if it takes a few moments for them to get used to it? They will, and they will have more control over the images.

09-20-2012, 10:29 AM
John.......after playing around with the different options you have graciously provided, I agree with your last suggestion.

Thanks again for your help, and guidance.

Best, Mike