Start slideshow with random slide

Jul 13, 2008 at 12:35 PM
Is there an easy way to start a slideshow with a random slide from the album, instead of the first (or say 5th)?

I know you can do this:

<data startalbumindex="0" startslideindex="4" .... in the Data.xml file,

but without altering the file on the fly, is there an easy way?

Jul 16, 2008 at 9:18 AM

Yes, in SlideShow.js in class SlideShowControl change the function onDataLoad: = Math.floor(Math.random() *; // <- new line



if ( != null && !this.isAlbumIndexValid(



    throw new Error("Invalid configuration: startalbumindex");


Nov 10, 2008 at 7:13 AM
Edited Nov 10, 2008 at 7:14 AM
I tried the solution above but I can't make it work -the code executes wihtout error, but the images are not dispayed randomy.

I run Slide.Show 1.2 in a Sharepoint envioement. Browser is IE 7

I have modified the code like this:

 onDataLoad: function(sender, e)
  /// <summary>Handles the event fired when the configured data is loaded.</summary>
  /// <param name="sender">The event source.</param>
  /// <param name="e">The event arguments.</param> =; = Math.floor(Math.random() *; // <- new line
  if (
   if ( != null && !this.isAlbumIndexValid(
    throw new Error("Invalid configuration: startalbumindex");
   if ( != null && !this.isSlideIndexValid(( ? : 0,
    throw new Error("Invalid configuration: startslideindex");

Any suggestions on how to make it work?