Need button audio cancel out other button audio when clicked

Hello~ I’m trying to create a slide where there are 5 buttons and when a user clicks on each button, it plays different audio. How do I stop them from overlapping? I want them to stop whatever is audio button is currently playing and play the newest one.

I tried advanced actions with clearing user input and then audio but that doesn’t seem to be working. Can anyone help with some direction?

Hi,

You can see this thread for details: Action - Event to Stop Audio - #2 by ToanLS

Regards,
Quynh

ok so I imported the audio files as initially hidden and autoplay. Then I created the buttons with events - actions to
BUTTON 1
on click
Show object (blocking) : the audio A I want to play
Hide object (Blocking): audio B I don’t want to play
Hide object (Blocking): audio C I don’t want to play
Hide object (Blocking): audio D I don’t want to play

BUTTON 2
on click
Show object (blocking) : the audio B I want to play
Hide object (Blocking): audio A I don’t want to play
Hide object (Blocking): audio C I don’t want to play
Hide object (Blocking): audio D I don’t want to play

BUTTON 3
on click
Show object (blocking) : the audio C I want to play
Hide object (Blocking): audio A I don’t want to play
Hide object (Blocking): audio B I don’t want to play
Hide object (Blocking): audio D I don’t want to play

BUTTON 4
on click
Show object (blocking) : the audio D I want to play
Hide object (Blocking): audio A I don’t want to play
Hide object (Blocking): audio B I don’t want to play
Hide object (Blocking): audio C I don’t want to play

Each button plays the audios and hide all others. HOWEVER, when I go to preview the slide, clicking on the other buttons just has them start playing so they are all overlapping, not hiding them to be just one at at time.

what am I doing wrong?

Hi,

When the Blocking option is selected, actions will occur in order.
So, please uncheck this option so that all actions occur at the same time.

Besides, you can consider using Advanced Actions to reduce work when setting Events-Actions.
See the sample below for details:
sample2.approj (3.1 MB)

Regards,
Quynh

This is so helpful! Thank you so much for the example and how to do that. I really appreciate it.

ah one more thing… how do you get the audio to not cut off? there is an intro that autoplays in the background and then tells you to click the buttons to play audio related to the button. however, then only play the first few seconds.

Hi,

Can you send your project and its external data folder (named PROJECT_FILE_files) (if any) via support@atomisystems.com so we can take a look?
If the files are large, please upload them to the cloud site then share the link with us.

Regards,
Quynh

Hello Quynh,
I sent this to the wrong email… my apologies. Please let me know if you got my email or if you have questions.

Hi,

Thanks for sharing your project.

After checking it, we see that the action show is hidden after 2 seconds.
To fix it, please uncheck the Hide After option.

Besides, you can improve your project by fixing these 2 things:

  • Uncheck the Auto Advance option (Properties pane > Slide Properties tab > General section) so that users can interact with the buttons when slide ends.
  • Remove the exit effect of the button 33 - Oxidative… (select the button > Animations tab >Exit Effects > None) to display it until the end of the slide.

Regards,
Quynh