Text-to-audio/Layer Issues

Jun 02, 2022

Hi, there, Heroes!

Hoping you can help. Just built my first module with text-to-audio and for the slides where there are layers, the issue is that if a user clicks on the button to jump to another layer before the base layer audio has finished, they hear a cacophony as the audio for the base layer and the new layer play TOGETHER.

How can I keep them from jumping layers until the base layer audio runs out (tried to add an "if" condition in Trigger Wizard but didn't see an object called Text-to-Speech 1 - was thinking I could say something like "If Text-to-Speech 1 = complete" but no go).

Or, is there a way to make that base layer audio stop when they do jump to another layer before it finishes?

Thank you!


7 Replies
Yogesh Dhingra

Dear Kim,

There are multiple ways you can stop the audio of base layer when you jump to new layer.

  1. Pause the timeline of base layer from layer setting wizard(if you want to resume the audio of base layer once you close the layer).
  2. You can disable the button till the the audio plays and after that change the state of button to normal to jump from the base layer.
  3. Show the button on the timeline only after the audio ends, then it will not create a mess with other audio.
  4. Attached one solution, add the same trigger on the layer to stop audio of base layer.

I hope this will help!


Kim McQuillen

Wow, Yogesh and Tom! Thank you so much! I can't tell you how great this
forum is. Feels like I can pop next door to my work colleague to ask them
how to do something and boom! I get an answer.

You helped me solve the problem and taught me some new skills - thank you,
again, and enjoy the weekend!

Best regards,

*Kim *

Jeff Swab

Along these same lines, how does one keep the base layer paused (timeline and/or audio) after returning from a slide layer? (See my two solutions below.)

Is there an obvious setting/trigger or would the best way involve variables (variable triggers)? I figured out two methods that could work for a current project, but which one you use depends what's happening on the slide when it starts.

What I want to happen:

  1. user action opens a slide layer
  2. base layer timeline and audio pause while slide layer timeline and audio proceeds
  3. user closes the slide layer
  4. base layer timeline and audio stay paused until the user presses the PLAY button in the player controls — i.e., I don't want the base layer timeline to automatically resume; the user prompts it to resume

Method 1:

By default, the slide base layer timeline is set to automatically start when the user opens the slide. To get the timeline effect/control outlined above, one could set a trigger to pause the base layer timeline when it starts. Jumping ahead a little—When a user closes a slide layer, by default the base layer timeline should resume. However, if you set the trigger to pause the base layer timeline when a user enters the slide, the base layer timeline will also stay paused when the user closes a slide layer. Pretty neat.

Method 2:

A few slides in the current project have animations and incomplete object layouts at the start of their base layer timelines. Method 1 won't work here because the slides would start as incomplete designs. So, I want the base layer timeline and audio to start right away when a user enters the slide, but I want the timeline to pause later when the user opens a slide layer. The solution here was to create a variable which "controls" the timeline and changes value (for a play/pause effect) based on user interactions with objects/layers. The default value of the variable is "false" (i.e., we're not pausing the base layer timeline yet). As the base layer timeline and audio start and continue to play, the user selects an object that:

  1. Opens a new slide layer
    • The Slide Layer Properties dialog box has the "Pause timeline of base layer" item checked, which of course causes the base layer timeline—and audio—to pause when the layer is open.
  2. Changes the value of the variable to "true" (i.e., pause the base layer timeline!)
    • As that is happing, you need to already have a variable trigger that will pause the base layer timeline when the variable changes to "true."

To complete the cycle for it to work again, there needs to be a slide trigger that sets the variable to "false" when the base layer timeline starts. That means the value is "false" when a user enters the slide for the first time and after closing a slide layer, which will allow the user to open that slide layer again and pause the base layer timeline again.

By default:

By default, closing a slide layer automatically causes the base layer timeline/audio to resume, even though the checkbox in the Slide Layer Properties paused the base layer timeline/audio while the slide layer was open.  One could try setting a pause timeline trigger on the base layer when the user selects a box to open a slide layer, but that still results in the base layer timeline/audio resuming when the slide layer was closed.

It seems a little odd that when I tell the base layer timeline to pause so I can do something on another slide layer, that it resumes after I do that something else even though I didn't tell the base layer timeline to resume — perhaps that's just how it works with layers. This seems to be the case with dialogs, too.

It's confusing to set a trigger to pause the timeline (either in the base layer or in a slide layer), but then nothing "triggers" the timeline to start again other than closing a slide layer, which don't seem related.


Even so, the two methods described above worked for me in a current project. Though this wasn't the same situation as the original post, it was close (needing to pause the base layer timeline and audio while opening another layer), and I needed a little more (keep base layer paused after closing a slide layer rather than automatically resuming the base layer). I hope this info helps someone else, too.