How to play sounds on buttons?

This is a tutorial on how to play sounds on buttons.

You should first know how to make/create a button before doing this tutorial.

If you know how to make buttons, follow the following steps in order for your buttons to play sounds.

  1. Create an event with a condition that the cursor/touch is on an object where the object being referred is the button.
  2. Add the condition “if(and)” below the cursor/touch and trigger once on the if condition.

  1. Add action next to that condition which plays a particular sound.

Take note: The sounds must be an .ogg or .wav file and the repeat is not active.
  1. Create a new event with cursor/touch on an object condition to the button with the animation of the button as the action of the event.
  2. Create a sub-event that contains the touch of Left Button of Mouse condition, and the animation action of the button and the action that contains the sound being played when the button is being clicked.

In a nutshell, the entire process of event must be organized like this in order to achieve desired effects.


Reminders:

  • The Number 1 and Number 3 in the screenshot above can be interchanged in their position but it's best if you leave things that way.
  • Group the events with the same condition/actions like the ones shown on the screenshot below.


  • The actions on click may depend on your own desire but the ones shown on the screenshot above is just an example.