Results 1 to 3 of 3

Thread: Adding delay in Text and Image Crawler

  1. #1
    Join Date
    Aug 2010
    Location
    Dunedin, New Zealand
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Adding delay in Text and Image Crawler

    Is it possible to add a pause every 3 seconds to the image crawler?

    Thank you in advance.

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

    Place this (highlighted) as shown after your init:

    Code:
    <script type="text/javascript">
    marqueeInit({
    	uniqueid: 'mycrawler',
    	style: {
    		'padding': '5px',
    		'width': '450px',
    		'background': 'lightyellow',
    		'border': '1px solid #CC3300'
    	},
    	inc: 8, //speed - pixel increment for each iteration of this marquee's movement
    	mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    	moveatleast: 4,
    	neutral: 150,
    	savedirection: true
    });
    setInterval(function(){marqueeInit.ar[0].stopMarquee = !marqueeInit.ar[0].stopMarquee;}, 3000);
    </script>
    Notice the two marqueeInit.ar[0] references. If you have just one crawler, this is fine. If you have a second one,you would use marqueeInit.ar[1] after its init, use the number [2] for a third one, and so on.

    The number 3000 is the milliseconds (3 seconds in this case) between each pause, and also is the length of each pause.
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2010
    Location
    Dunedin, New Zealand
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much, this is just what I wanted.

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
  •