PDA

View Full Version : conveyer belt script that calls images from html body instead of the actual js file?



iblastoff
07-11-2006, 05:24 PM
1) Script Title:
Conveyor Belt slideshow script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm

3) Describe problem:
i was wondering if there was a similar script (moves left to right continuously, stops upon mouseover, etc etc) where the images are NOT set as variables in the actual .js file?

for example there is a script here (http://www.dynamicdrive.com/forums/showthread.php?t=10365) that loads the images from just the body of the html but instead it scrolls up and down and i need it left to right. i am not nearly proficient enough to manually alter this to left and right.

the reason i need this is because i want to use the lightbox effect but they dont seem to be working together. im pretty sure its because the images are called straight from the .js file and lightbox can't seem to find and link to them properly.

the page i am trying to add this to can be found here :
http://www.stevelam.ca

(the script works fine, but i need one where i can list images in the actual body of html rather than declaring each image in the .js file)

jscheuer1
07-12-2006, 06:29 AM
You don't need all that, using the original lightbox script instructions, here's a link to the author's page:

http://www.huddletogether.com/projects/lightbox/

You just need to specify the lightbox code in the array, ex:


//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="dynamicbook1.gif" rel="lightbox" title="my caption"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[1]='<a href="dynamicbook1.gif" rel="lightbox" title="my caption"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[2]='<a href="dynamicbook1.gif" rel="lightbox" title="my caption"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[3]='<a href="dynamicbook1.gif" rel="lightbox" title="my caption"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[4]='<a href="dynamicbook1.gif" rel="lightbox" title="my caption"><img src="dynamicbook1.gif" border=1></a>'

Changes the images and titles to your own. And then, this is the important part, put this:


<script type="text/javascript" src="lightbox.js"></script>

after the closing script tag for conveyor:


. . . er name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
<script type="text/javascript" src="lightbox.js"></script>