View Full Version : Resolved Step Carousel Viewer

06-25-2009, 10:01 AM
1) Script Title: Step Carousel Viewer

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

3) Describe problem: I'm using this script on a website using various images. I want to specify which image is shown when the page loads. This could change weekly as new images are added. I have 2 viewers (with different id's) on the page. Can anyone suggest the code I need to add in order to achieve this. I think in involves an "onload" event along with a "stepto" function, but I can't get the coding right. Any help appreciated.

06-25-2009, 06:39 PM
Yep, you're on the right track. To get the script to go to a particular panel when the page loads, you'd do something like:

<script type="text/javascript">

galleryid: 'galleryC', //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
panelbehavior: {speed:300, wraparound:false, persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['arrowl.gif', -10, 100], rightnav: ['arrowr.gif', -10, 100]},
statusvars: ['imageA', 'imageB', 'imageC'], //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('galleryC', 2)


Where "galleryC" above should be the ID of your gallery, and 2 means go to the 2nd panel.

06-25-2009, 08:48 PM
Thanks - works a treat.:):)