Play random audio

Problem: I have several audio for correct and incorrect answers. For example in one audio, the speaker says “Correct!”, in the other one “That’s correct!”, in another one “That’s right.” etc. Now I want to name them like this:
correct1.mp3
correct2.mp3
and play a random one. I can generate a random number with javascript, the problem is how can I play that random file generated with math.random() ?

ActivePresenter version: 9

I did this by the way. In case someone else needs to do it:

I created a random number with javascript on a previous slide and kept it as a variable. Then on the next question slide I created an advanced action saying if the number is 1 play this, if it is 2 play this, and so on. Like so:

2 Likes