Search...
changeSlide( )
Change the slideshow's current slide to a specific slide or index.
Description
The changeSlide()
function returns a Promise that is resolved when
the slideshow finishes moving from the current slide to the slide
referred to by slideReference
.
You can retrieve Slide
objects to pass to the
slideReference
parameter from your slideshow using the
currentSlide
or slides
properties.
If passing a number, note that slide indices in a slideshow are zero-based, even though they are numbered starting from 1 in the Editor.
Syntax
function changeSlide(slideReference: number | Slide): Promise<Slide>
changeSlide Parameters
NAME
TYPE
DESCRIPTION
Was this helpful?
Move to a new slide using an index
This example moves to the third slide in the slideshow.
Copy Code
1$w("#mySlideshow").changeSlide(2);2
Move to a new slide using a
Slide
objectThis example moves to the slide that is stored in the slide
variable.
Copy Code
1$w("#mySlideshow").changeSlide(slide);2
Moves to a new slide and logs a message when the move is finished
Copy Code
1$w("#mySlideshow").changeSlide(2)2 .then( (newSlide) => {3 console.log(`Done moving to ${newSlide.name}`);4 } );