Results 1 to 6 of 6

Thread: modify crawler.js

  1. #1
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default modify crawler.js

    1) DD Script: crawler.js

    2) Script on DD: http://www.dynamicdrive.com/dynamici...wler/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:

    marqueeInit({
    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
    Last edited by MichaelG; 09-19-2012 at 07:35 AM.

  2. #2
    Join Date
    Mar 2011
    Posts
    2,144
    Thanks
    59
    Thanked 116 Times in 113 Posts
    Blog Entries
    4

    Default

    Please use the forum's bbcode tags to make your post more readable:

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


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

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

    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'):

    crawler-left.js

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

    Code:
    <script type="text/javascript">
    marqueeInit({
    	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
    });
    </script>
    That crawler will only move to the left.
    - John
    ________________________

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

  4. #4
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

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

    http://www.studioivphotography.com/crawler-left.htm

    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/uploa...iy-300x259.jpg

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

    OK, try:

    crawler-leftonly.js

    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.
    - John
    ________________________

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

  6. #6
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Similar Threads

  1. Please a little help to modify a script
    By jomla in forum JavaScript
    Replies: 0
    Last Post: 03-17-2011, 03:22 PM
  2. modify a code
    By masquerade in forum JavaScript
    Replies: 10
    Last Post: 04-27-2007, 10:15 AM
  3. please help to modify cookie
    By eidalina20 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 08-08-2006, 04:32 PM
  4. Need To Modify
    By arimakidd in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 08-19-2005, 04:42 PM

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
  •