PDA

View Full Version : Adding delay in Text and Image Crawler



johnfb
08-11-2010, 04:34 AM
Is it possible to add a pause every 3 seconds to the image crawler?

Thank you in advance.

jscheuer1
08-11-2010, 05:40 AM
Place this (highlighted) as shown after your init:


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

johnfb
08-11-2010, 09:11 AM
Thank you so much, this is just what I wanted.