How do you prevent overlapping audio for layers when layer text must remain on screen?

Jul 19, 2023

Hi! I'm stuck with how to get layer audio to stop playing if another layer is opened via a button on the base layer. The layer text needs to remain on screen so you can't use the "hide layer" option in this case. And you can't select layer audio when adding a trigger to the base layer. The buttons to show the layer text are on the base layer so the trigger has to be added there. You can't select the base layer buttons in a layer tigger. I tried using a state trigger on each layer based on the base layer buttons but that only works if the buttons are clicked in order. I'm thinking variables are the only way to go, but really do not want a separate variable for each layer's audio file since I have multiple sides like this. Any other solutions?

5 Replies
Eric Schaffer

I would really like to help you on this but I'm a little confused what you are trying to do. When you click on a button for the layer to open the audio should start. You can add a button to pause audio on the layer to pause the audio. Are you saying you are letting the learner open two layers at the same time? 

Luciana Piazza

Hi Natalie! 👋 

Thanks for reaching out and sharing what you're looking to achieve in Storyline 360. 

Would it be possible for you to share your file with us in this thread or privately in a support case? It would be helpful to take a closer look at your setup so far. 

Looking forward to hearing from you! 

Judy Nollet

You could add a trigger to the base buttons that toggles a T/F variable. Whether it's True or False doesn't matter. But you could use "pause audio when variable changes" in triggers on the layers.

Or here are a couple of methods that ensure someone listens to all the audio:

  • On each layer, add an object that covers the buttons on the base. For example, use a semi-transparent shape, or anything that makes it visually obvious that the user can't click those buttons. Give those shapes exit animations, so they'll disappear when the timeline ends. This trick will allow users to click another button only after the audio plays. 

or

  • Add triggers to each base button that disable the other buttons. Then add triggers to each layer that enable all the base buttons when the timeline ends.