Krammy wrote:What's stopping you from adding this?
Pertex wrote:Oh, you can play more than one audiofile at the same time but only when playing online with an actual browser. You only must use the html5 tag audio.
loadMusic ("sound1","http://www.test.org/forest.wav", "")
<function name="loadMusic" parameters="id, url, url2"><![CDATA[
text="<audio id='"+ id +"'><source src='"+url +"' />"
if (LengthOf(url2)>0){
text = text + "<source src='" + url2 +"' />"
}
text = text + "</audio>"
msg(text)
]]></function>
<function name="playMusic" parameters="id">
JS.playMusic (id)
</function>
<function name="stopMusic" parameters="id">
JS.stopMusic (id)
</function>
function playMusic(id) {
document.getElementById(id).play();
}
function stopMusic(id) {
document.getElementById(id).pause();
}
Pertex wrote:"Krammy"
What's stopping you from adding this?
Money? Time? But you can order this new feature:
"Developing a small feature - every Quest release brings something new, and developing features takes time. You can contribute £150 towards the cost of developing a feature for the next release. "
Pertex wrote:I am working with external servers so first I uploaded soundfiles on an external server. With the start script of game I am loading these files withloadMusic ("sound1","http://www.test.org/forest.wav", "")
<function name="loadMusic" parameters="id, url, url2"><![CDATA[
text="<audio id='"+ id +"'><source src='"+url +"' />"
if (LengthOf(url2)>0){
text = text + "<source src='" + url2 +"' />"
}
text = text + "</audio>"
msg(text)
]]></function>
Then I have two functions to start and stop playing the file: playMusic ("sound1") and stopMusic ("sound1")<function name="playMusic" parameters="id">
JS.playMusic (id)
</function>
<function name="stopMusic" parameters="id">
JS.stopMusic (id)
</function>
And here are the Javascript functions:
function playMusic(id) {
document.getElementById(id).play();
}
function stopMusic(id) {
document.getElementById(id).pause();
}
You can test it here with my test game: http://play.textadventures.co.uk/Play.a ... omchphqmyw
Krammy wrote:I appreciate the reply. Maybe I'll go ahead and suggest it then.