Change audio1.src at runtime


#1

I can play a mp3 with audio1 conrol. But when I change the audio1.src at runtime the control is grey and I can not play the new selected audio.

How to change the audio1.src at runtime properly?


#2

You might try a load:

playme.src="snd/SOUND.WAV"; 
playme.load();

#3

thank you. I found out that .load() is not neccecary. your snd/ folder gave me the idea to check if the problem had anything to do with propper including of the file with the project.
After creating a snd/ folder and adding that folder to the manifest (https://wiki.nsbasic.com/Distributing_your_App helped me understanding that) it works. Before I just dragged the file into the file explorer.

My suggestion is to add a folder to the project explorer that equals the manifest files & folders. Not so important, but helps to not confuse newcomers from VB6/VBA