User Guide
712 Chapter 6: Components Dictionary
Usage
mySlide.gotoSlide(newSlide)
Parameters
newSlide
The slide to navigate to.
Returns
A Boolean value indicating if the navigation succeeded (true) or not (false).
Description
Method; navigates to the slide specified by newSlide. For the navigation to succeed, the
following must be true:
• The current slide must be a child slide of mySlide.
• The slide specified by newSlide and the current slide must share a common ancestor slide—
that is, the current slide and
newSlide must reside in the same slide subtree.
If either of these conditions isn’t met, the navigation fails and the method returns
false;
otherwise, the method navigates to the specified slide and returns
true.
For example, consider the following slide hierarchy:
Presentation
Slide1
Slide1_1
Slide1_2
Slide2
Slide2_1
Slide2_2
If the current slide is Slide1_2, the following gotoSlide() call will fail, since the current slide is
not a descendant of
Slide2:
Slide2.gotoSlide(Slide2_1);
Also consider the following screen hierarchy, where a form object is the parent screen of two
separate slide trees:
Form_1
Slide1
Slide1_1
Slide1_2
Slide2
Slide2_1
Slide2_2
If the current slide is Slide1_2, the following method call will also fail, because Slide1 and
Slide2 are in different slide subtrees:
Slide1_2.gotoSlide(Slide2_2);
Example
The following code, attached to a Button component, uses the Slide.currentSlide property
and the
gotoSlide() method to display the next slide in the presentation.