when I use the "play audio by name" action, the audio does not play when it is inside a subfolder
Try replacing (1) with _1 maybe? I'm not sure, but special symbols like ( and spaces can cause issues in some systems so I always recommend only letters numbers and underscores.
The way subfolders works changed a while back. Check the 'Export file structure' property under 'Compatibility settings' in project properties. The new default is 'Folders', which means you must specify subfolder paths as well. For example if you have a sound in the path click/click1.webm, you must now use the string "click/click1.webm" when playing from a string. The old way ("flat" mode) allowed you to play from a string "click1.webm" even if it was in a subfolder.
Ashley thank u! by specifying the path in the string, the audio played correctly! :D
Develop games in your browser. Powerful, performant & highly capable.
Well now I'm curious, do the filenames need to be url-friendly?
I'm not sure what you mean. Any filename you choose should load, within reason. If it works in preview mode, then the browser can load it.
lunaticedit
I get your point! Special characters in URLs, directories or variables can/could cause problems, for safety I removed them.