How do I add audio on click?

newbie-question

#1

I’m making a prototype of an mobile applications that needs to play audio files when a element is clicked. I’ve been looking, however, I still can’t figure out how to do this. Any help would be great.


#2

Hi CarlosTheBrave,

Welcome to the forum! You can play audio by dynamically linking to a hosted audio file which can be loaded into an Inline Frame widget via an “Open Link” action. The following thread has a good number of suggestions (which you may have seen), and here’s a good example by Paul to start:

https://www.axure.com/c/forum/advanced-prototyping/4963-answered-adding-sound-audio-music.html#post19290

Could you give that a shot? Let me know if you have questions!


#3

Hi Alex,

It doesn’t work. What am I doing wrong?

Play Audio.rp (47.9 KB)

Thanks.


#4

Actually I managed to get it working.
https://4wkhae.axshare.com/#g=1&p=home

The key is to have the url in the correct format.

From https://webapps.stackexchange.com/questions/65763/how-can-i-hotlink-an-mp3-in-google-drive-with-a-url-ending-in-mp3:

If you share an MP3 by link, you obtain a link like this

https://drive.google.com/file/d/XXXXXXXXXXXXXXXXXX/view?usp=sharing
where XXXXXXXXXXXXXXXXXX is the ID of your MP3 file. Then you can obtain a direct link to this audio by

http://docs.google.com/uc?export=open&id=XXXXXXXXXXXXXXXXXX


#5

this does not work anymore