What about looping to the same slide to make it re-play?
Let's assume the user has to click a button to hide each (additional) audio layer, like so:
Action: Hide layer
Layer: This layer
When: User clicks
Object: Button 1
Instead, you could change the trigger to be:
Action: Jump to slide
Slide: [select the number for THIS slide from the drop-down]
When: User clicks
Object: Button 1
If the slide is set to Reset to initial state, it will hide all your extra layers when you re-visit it. The slide will play the Base Layer from the beginning, thus playing all the audio.
I'm sorry that didn't work -- I suggested it because I tried it out on a project I have with audio layers and audio on a Base Layer and it did work. If you want to, you can try sharing your .story file here and I can take a look.
I do have another idea, which I have tested, but it's a little more work-intensive. It involves creating a variable to toggle the sound on and off.
Step 1:
-Create a variable. It will be a True/False variable to toggle your Base Layer sound on and off. Call it SoundPlay and default it to False, like so:
Step 2: Create your Base Layer Triggers
--Adjust variable SoundPlay, Equal to True when Timeline starts on Base Layer
(This is so the sound will play the first time you enter the slide.)
--Play media [Base Layer Sound] when variable [SoundPlay] changes IF SoundPlay is Equal to True
--Stop media [Base Layer Sound] when variable [SoundPlay] changes IF SoundPlay is Equal to False
It should look like this:
Step 3: Create additional layers. Create Buttons to open additional layers and to change SoundPlay to False:
This will stop the BaseLayer audio from playing over the additional layers, and it will get it ready to re-play.
Step 4: Create Buttons to close each additional layer and change the SoundPlay variable back yo True so that the Base Layer sound will play:
Make sure the layers are set to reset to initial state, if you want them to start playing their audio from the beginning when they are revisited.
Step 5 (Optional): If you allow users to re-visit this slide after they've navigated away from it, you are going to want to add another trigger to switch SoundPlay back to False when they click to exit this slide. Otherwise, the sound will not replay when they re-visit the slide.
I'm attaching a sample .story file.
If someone else in the community has an easier approach, do chime in!
5 Replies
Hi Rick,
What about looping to the same slide to make it re-play?
Let's assume the user has to click a button to hide each (additional) audio layer, like so:
Action: Hide layer
Layer: This layer
When: User clicks
Object: Button 1
Instead, you could change the trigger to be:
Action: Jump to slide
Slide: [select the number for THIS slide from the drop-down]
When: User clicks
Object: Button 1
If the slide is set to Reset to initial state, it will hide all your extra layers when you re-visit it. The slide will play the Base Layer from the beginning, thus playing all the audio.
Would that work for your project?
Hi Belen,
Thanks for helping out. Great logical suggestion. However, I just tied it and it did not work...:-(
Any other ideas that I might give a try?
Thanks,
Rick
Hi Rick,
I'm sorry that didn't work -- I suggested it because I tried it out on a project I have with audio layers and audio on a Base Layer and it did work. If you want to, you can try sharing your .story file here and I can take a look.
I do have another idea, which I have tested, but it's a little more work-intensive. It involves creating a variable to toggle the sound on and off.
Step 1:
-Create a variable. It will be a True/False variable to toggle your Base Layer sound on and off. Call it SoundPlay and default it to False, like so:
Step 2: Create your Base Layer Triggers
--Adjust variable SoundPlay, Equal to True when Timeline starts on Base Layer
(This is so the sound will play the first time you enter the slide.)
--Play media [Base Layer Sound] when variable [SoundPlay] changes IF SoundPlay is Equal to True
--Stop media [Base Layer Sound] when variable [SoundPlay] changes IF SoundPlay is Equal to False
It should look like this:
Step 3: Create additional layers. Create Buttons to open additional layers and to change SoundPlay to False:
This will stop the BaseLayer audio from playing over the additional layers, and it will get it ready to re-play.
Step 4: Create Buttons to close each additional layer and change the SoundPlay variable back yo True so that the Base Layer sound will play:
Make sure the layers are set to reset to initial state, if you want them to start playing their audio from the beginning when they are revisited.
Step 5 (Optional): If you allow users to re-visit this slide after they've navigated away from it, you are going to want to add another trigger to switch SoundPlay back to False when they click to exit this slide. Otherwise, the sound will not replay when they re-visit the slide.
I'm attaching a sample .story file.
If someone else in the community has an easier approach, do chime in!
It beautifully worked! Thanks! I was struggling with this issue.
Glad to see that this older thread was able to help you out as well Adriano :)
Thanks for popping in to share.
This discussion is closed. You can start a new discussion or contact Articulate Support.