Copyright (c) 2007, Chris Pietschmann (http://pietschsoft.com)
All rights reserved
This was created as part of the Lunch Time Coder initiative.
- LunchTimeCoder.AutoSlideShow Object
- Constructor(parentDivId, timerInterval)
- parentDivId parameter
Required - This is the ID of the DIV that will contain the slide show. This allows you to place the DIV anywhere on the page like a placeholder, and the slideshow will be render inside it.
- timerInterval parameter
Optional - This is the time span (in milliseconds) that each image is displayed. The Default is 500 (0.5 seconds).
This method adds an image to the array of images that are flipped through. The images are flipped through in the order they are added.
- imageUrl parameter
Required - This is the URL of the image to be displayed.
Starts the slide show if it's in the stopped state.
Stops the slide show if it's in a started state.
Advances the slide show to the next image.
Reverts the slide show back to the previous image.
Source Code Available:
(right-click the below links and select "save as")
07/16/2007 - v1.05
- Added Image Caching
- Converted to use DOM to add Image tag instead of innerHTML property
- Added Start, Stop and Previous methods to allow user/programmatic control of slide show
07/03/2007 - v1.0 Created
Possible additions to the component if more time were spent on it.
- Some type of transition animations (like fading and scrolling) would be nice when changing between images
- It would be nice if there were Remove and Reorder capabilities with the array of images so that this could be used more dynamically in Ajax scenario
- The ability to point the component to an XML file that it would read in all settings (including image array and transitions to use).
- It would be kind of neat if the component used custom html tags/attributes for default "page load" configurations