Sounds and music
Add audio files
Put your files under Project files (Project panel), or pick the file straight in the action. The safest formats are WAV and MP3.
Play a sound effect
Use Play a sound, on the Audio object or under System:
| Conditions | Actions |
|---|---|
Player Collision with Coin |
Coin Delete Play a sound coin.wav, volume 80, repeat: no |
Short sounds are loaded whole and can overlap: great for shots, jumps and coins.
Play music
Play a music file plays a long track on a single channel. Use repeat: yes for background music.
| Conditions | Actions |
|---|---|
| At the beginning of the layout | Play a music file background.mp3, volume 50, repeat: yes |
Note: browsers only play audio after the player clicks or taps the page. Start the music from a menu with a Play button, or after the first interaction.
Stopping music when changing levels
By default a layout has Stop music and sounds on startup switched on. Turn it off in the layout's properties if you want the music to carry on between levels.
Making your own sounds
You can create effects in Jfxr (retro-style sound effects), opened from inside the editor's file tools.