Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Graphics, Flash and Multimedia _ Managing multiple audios

Posted by: berrymoon Feb 9 2018, 11:56 AM

Hi there I'm struggling many many hours before daring to post.

What I need to do is to manage the audios on a page. Basically (in my simple example) I have a background sound, and a map on which there is an area supposed to launch another audio using onclick. At the end of this audio, the background one should resume.
Attached is my minimalist script and will appreciate if someone outhere can give it a look.

Many thanks in advance.
M




Attached File(s)
Attached File  P_mini.html ( 3.1k ) Number of downloads: 826

Posted by: CharlesEF Feb 9 2018, 03:28 PM

I admit I don't do much with audio files but looking over your code I don't see where 'audio_background' is defined. The script halts at that line of code.

Posted by: berrymoon Feb 9 2018, 03:39 PM

QUOTE(CharlesEF @ Feb 9 2018, 03:28 PM) *

I admit I don't do much with audio files but looking over your code I don't see where 'audio_background' is defined. The script halts at that line of code.

Thanks CharlesEF for your reply.
I've downloaded the file to check and actually it has 103 lines.

The definition of audio_background is set at t line 59
i.e.

<script> let audio_backgroundaudio= document.getElementById("backgroundaudio"); </script>

Hope it helps and thx again.

BTW the background audio works perfectly. However when I click on the area (<area shape="circle" coords="600,425,30" onclick="playMusique(audio_main);" style="cursor: pointer;">) nothing happens the audio_main doesn't look as recognized for some reasons.

Posted by: CharlesEF Feb 9 2018, 04:04 PM

Those are not the same variables. 1 = 'audio_background' while 2 = 'audio_backgroundaudio'.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)