PDA

View Full Version : Resolved Start button on Image Crawler Script



akp
01-16-2010, 12:19 PM
1) Script Title: Text and/or image Crawler Script

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

3) Describe problem:
Thank u for a very nice script which we use throughout our site: Qugii (http://www.qugii.com)

Now i am trying to make a start button which will also work when the script is started out in "stopped" mode. I have read the "advanced" instructions, but cannot seem to make it work. Is it possible?

jscheuer1
01-16-2010, 12:37 PM
Here's an example:


<div class="marquee" id="art">
<img src="../files/photo1.jpg" alt=""> <img src="../files/photo2.jpg" alt=""> <img src="../files/photo3.jpg" alt=""> <img src="../files/photo4.jpg" alt=""> <img src="../files/photo5.jpg" alt=""> <img src="../files/photo6.jpg" alt=""> <img src="../files/photo7.jpg" alt=""> <img src="../files/photo8.jpg" alt=""> <img src="../files/photo9.jpg" alt="">
</div>

<script type="text/javascript">
marqueeInit({
uniqueid: 'art',
direction: 'right',
style: { //style object for this marquee container (use quotes on both sides of the : as shown)
'width': '60%',
'height': '235px',
'background-color': '#ddd',
'border': '1px solid #111',
'margin': '2ex auto 0 auto'},
inc: 6, //speed - pixel increment for each iteration of this marquee's movement
moveatleast: 4,
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
stopped: true
});
</script>
<div>
<input type="button" onclick="marqueeInit.ar[2].stopped = false;" value="Go!">
</div>

Notice the red 2, it refers to the crawler instance. If you have only one crawler on the page, this would be 0. The next one would be 1, the third would be 2, etc.

If you want more help, let me know.

akp
01-17-2010, 01:09 PM
Hi John.

Thanks for answering!
I have been trying to make a pair of left/right arrows this way:

"<input type="button" onclick="marqueeInit.ar[0].direction = 'right'; marqueeInit.ar[0].stopped = false;" value="Right!">"
("moveatleast" is set to: 0)

and that works as long as you have not previously done a mouseover on the marquee. After doing a mouseover, the button stops working. Is it possible to solve this? i guess it has something to do with "moveatleast"?

Allan

jscheuer1
01-17-2010, 03:44 PM
It could be that, at least partly. I'd really have to see the whole thing.

Truth be told though, I believe I made some of the properties of these crawlers a bit more private than necessary, so a little more coding is required to get at all of the values you will likely need for that. Fortunately the script doesn't need to be edited, just the on page code. Try out this demo:

http://home.comcast.net/~jscheuer1/side/thecrawl/index_arrows.htm

Use your browser's 'view source' to get the coding. If you have any questions, let me know.

akp
01-19-2010, 01:06 PM
Solved!

Just what i needed :)


Allan