Change sound on slide

Is it possible to chose which out of two sound to be played on a slide if using varables?

I created a varable SOUND

Then a button saying If clicked SOUND =1

Then:

Play media Sound1 when SOUND changes. Condition: SOUND==1.

But this does not work. Can someone help me out here?

Of course I programmed the same setup for Sound2.

Thx in advance.

Gustaf

4 Replies
Helen Tyson

Hi Gustaf

I managed this by creating a Number variable with an initial value of 3, and then adjust the variable to 1 or 2, depending on which button was clicked.

Add the triggers to play the sounds based on the change in the value of the variable.

File attached

H

Helen Tyson

Ah, that's it!

You can only use the Variable Change part of a trigger when it all happens on one slide.

In your example the variable doesn't change on slide 2 so you can't link the audio to it. If you edit the trigger so you Play Sound When Timeline Starts for the Slide  instead it should work fine.

H