I am working on a course with 4 lessons and a Main Menu. On the main menu, I have a sound clip that I want to play when the user first accesses the course. At the end of each lesson, the user is asked to return to the main menu. How can I set up a trigger so that a new sound clip will play when the user returns to the main menu? Also, the user does not have to complete the lesson to return to the main menu...they can return at any time.
This should be pretty straightforward using variables and different sound tracks on different layers. I would create the 2 audio tracks, one for the first time visitedand put it on layerX. Then put the second audio track on layer Y for any subsequent visits to the menu,Then create a true/falsevariable called "MenuVisited" and set the default to "false." Put a trigger on the Menu slide that says to change the variable to "True" when the timeline begins.Then set another trigger on the Menu slide that says "Show LayerY" when the timeline begins if the variable "MenuVisited" = True.
So what happens is the first time you visit the Menu slide SL checks the variable and sees that it's false so it plays the audio on layer X and also changes the variable to True. Now any time the user comes back to the Menu SL will read the variable and it'll be True so it will play the audio on Layer Y.
There are other ways you could do it but this should work.
Argh, doe snot quite work the way it should. it plays both tracks if I set thetrue/falsevariable called "MenuVisited" to "false." Then I put a trigger on the Menu slide that says to change the variable to "True" when the timeline begins. I double-checked that I have set another trigger on the Menu slide that says "Show LayerY" when the timeline begins if the variable "MenuVisited" = True. It seems as soon as the timeline starts the variable changes to true--which then triggers the hidden layer to play as well. I also tried settingthe variable to "True" when the timeline ends, but it just plays after the first track ends--**sigh** help please!!!!
Actually I should verify when the user comes back to the slide it works as expected. It's just the initial time the slide is shown that it plays twice...
OK, what I think the issue is is the order or your triggers. You need to move the Set Variable trigger to the bottom of the list so that the show layer triggers happen before the Set MenuVisited trigger. Then it should work.
It feels like I somehow have to hide the second layer...first time around--as soon as the timeline starts the variable is changed and that triggers the hidden layer to play (right?!)
Whoa! You guys have been busy here! Thanks for the update Sunday, and glad you got it working (the second time at least). If you need anything else, let us know!
19 Replies
This should be pretty straightforward using variables and different sound tracks on different layers. I would create the 2 audio tracks, one for the first time visitedand put it on layerX. Then put the second audio track on layer Y for any subsequent visits to the menu,Then create a true/falsevariable called "MenuVisited" and set the default to "false." Put a trigger on the Menu slide that says to change the variable to "True" when the timeline begins.Then set another trigger on the Menu slide that says "Show LayerY" when the timeline begins if the variable "MenuVisited" = True.
So what happens is the first time you visit the Menu slide SL checks the variable and sees that it's false so it plays the audio on layer X and also changes the variable to True. Now any time the user comes back to the Menu SL will read the variable and it'll be True so it will play the audio on Layer Y.
There are other ways you could do it but this should work.
As above - exactly how I (think) I would do it.
OK I am going to give it a whirl! I am new to Storyline and variables, so let's see how it goes... Thanks for your timely response!
Hi Sunday, it looks like Bruce and Brett have you covered here, but please let us know if you need anything else!
Worked great thanks all!
Thanks Sunday for the update and just let us know if you need anything else!
Argh, doe snot quite work the way it should. it plays both tracks if I set thetrue/falsevariable called "MenuVisited" to "false." Then I put a trigger on the Menu slide that says to change the variable to "True" when the timeline begins. I double-checked that I have set another trigger on the Menu slide that says "Show LayerY" when the timeline begins if the variable "MenuVisited" = True. It seems as soon as the timeline starts the variable changes to true--which then triggers the hidden layer to play as well. I also tried settingthe variable to "True" when the timeline ends, but it just plays after the first track ends--**sigh** help please!!!!
Actually I should verify when the user comes back to the slide it works as expected. It's just the initial time the slide is shown that it plays twice...
OK, what I think the issue is is the order or your triggers. You need to move the Set Variable trigger to the bottom of the list so that the show layer triggers happen before the Set MenuVisited trigger. Then it should work.
Still playing both sounds on the first round UGH!
It feels like I somehow have to hide the second layer...first time around--as soon as the timeline starts the variable is changed and that triggers the hidden layer to play (right?!)
You probably don't want to set menuvisited to true until the end of the timeline.
I got it to work! woohoo--realized I had to move the sound files both to another level (away from the base layer)
awesome!
Awesome! Thanks for the update Sunday.
lies all lies--still not working! UGH
WOOHOO! Got it! THANK YOU ALL AWESOME!!!!!!!!!!!!!
Yes, the sounds should not be on the base layer but on two other layers that are triggered by the vairable being either true or false.
Whoa! You guys have been busy here! Thanks for the update Sunday, and glad you got it working (the second time at least). If you need anything else, let us know!
This discussion is closed. You can start a new discussion or contact Articulate Support.