SetAdvanceOnTime
Sets whether the slide advances after a specified time.
Syntax
expression.SetAdvanceOnTime(advanceOnTime);
expression - A variable that represents a ApiSlideShowTransition class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| advanceOnTime | Required | boolean | True to advance the slide after a specified time; otherwise false. |
Returns
boolean
Example
This example enables automatic slide advance after time.
- Code
- Result
const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const transition = Api.CreateSlideShowTransition();
transition.SetEntryEffect('effectFadeSmoothly');
transition.SetSpeed('medium');
transition.SetAdvanceOnTime(true);
transition.SetAdvanceTime(5000);
slide.SetSlideShowTransition(transition);
const shape = Api.CreateShape(
'rect',
250 * 36000, 50 * 36000,
Api.CreateSolidFill(Api.HexColor('#aba4e8')),
Api.CreateStroke(0, Api.CreateNoFill())
);
const content = shape.GetContent();
const paragraph = content.GetElement(0);
paragraph.AddText('Slide will advance on click or automatically after 5 seconds.');
slide.AddObject(shape);