View Full Version : loading Step Carousel Viewer in middle of carousel

12-31-2008, 07:30 PM
1) Script Title: Step Carousel Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem:
I need to load the script (when a visitor first comes to the page) starting in the middle of the series of images, so there are a certain number of images to the left and the rest still to the right.

Seems like a simple thing to do, but I don't know javascript well and am hoping someone can point out what to change to make this happen. Thanks!:)

12-31-2008, 10:27 PM
Well, you could use the oninit event of the script to go to a specific slide to start when the Carousel loads. For example:

<script type="text/javascript">

galleryid: 'mygallery', //id of carousel DIV
beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause:3000},
panelbehavior: {speed:500, wraparound:false, persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
stepcarousel.stepTo('mygallery', 2) //go to 2nd slide to begin with


The only issue with this is that if you're setting your Carousel to auto slide, by manually calling stepTo(), it stops the Carousel at the same time. If you are using auto step and need a workaround, let me know.

12-31-2008, 11:07 PM
thanks! i'm not using autostepping, so this works just right.