Problem: (1) I’m trying to add the following Timeline actions to an object in the Top Layer, but the timelines are not appearing for me to select them. Am I preventing it from appearing somehow?
On Click > Continue Timeline On Click > Pause Timeline On Click > Start Timeline
Timeline actions like Continue, Pause, and Start are not available for objects that display over multiple slides. These actions only work for objects that exist on a single slide.
2. JavaScript to Continue Timeline
To resume a paused timeline via JavaScript, please use:
Can I just check that applying the following JavaScript code to an object in the Top Layer won’t break my slides somehow? I want to be able to click a top layer object to affect multiple timelines across multiple slides:
On Click > Execute JavaScript (Play Timelines)
// Array of timeline names
const timelineNames = ['Timeline 1', 'Timeline 2', 'Timeline 3’];
// Loop through each timeline name and play it
timelineNames.forEach(timeline => { prez.pauseTimeline(timeline, false); });
On Click > Execute JavaScript (Pause Timelines)
// Array of timeline names
const timelineNames = ['Timeline 1', 'Timeline 2', 'Timeline 3’];
// Loop through each timeline name and pause it
timelineNames.forEach(timeline => { prez.pauseTimeline(timeline); });
On Click > Execute JavaScript (Start Timelines)
// Array of timeline names
const timelineNames = ['Timeline 1', 'Timeline 2', 'Timeline 3’];
// Loop through each timeline name and start it
timelineNames.forEach(timeline => { prez.startTimeline(timeline); });
Unfortunately, it’s not possible to use a Top Layer object to control timelines across multiple slides. JavaScript only works within the current slide’s context.