playing a sound for alerts

I’m need to play a short sound file as an alert for various situations as user feedback in my solution. What is the best approach for this? I see that I can add a sound file to the media section, but not sure how to actually trigger/play the sound.

I’m using Servoy 7.4.1 on Windows 7+ machines and Mac OS 10.8+

application.playSound(“media:///sounds/happyBirthdayFrankSinatra.wav”);

So we created a subfolder ‘sounds’ in the media folder and stored the wav-file there.
On login, we check if the current user has birthday today (or last week) and play the song (in case he wants…), then we set a date on the user record so that this happens again only next year.
What we still need to implement is to play Marilyn’s “Happy Birthday, dear President” for male users.

:lol: :lol: :lol: :lol:

Here’s the code: https://www.servoy.com/forum/viewtopic.php?f=12&t=21211&p=113874#p113874