play sounds in HTML5
hh
hh at hyperhh.de
Thu May 16 12:11:27 EDT 2019
> Thanks Sean.
> I will have to work hard because I am not familiar with Dynamic HTML.
One simple way to do that:
Write, a little bit more as Sean wrote, in your html file:
<source id='audio1' src='/audio/piano-melody.wav' type='audio/wav'>
Then first set in LC newsound, may be randomly:
put "/audio/guitar-melody.wav" into newsound
Then issue from LC:
do "document.getElementById('audio1').src='" & newsound & "'" in widget "browser"
That's all, nothing complicated.
More information about the use-livecode
mailing list