Help - Search - Members - Calendar
Full Version: Managing multiple audios
HTMLHelp Forums > Web Authoring > Graphics, Flash and Multimedia
berrymoon
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

CharlesEF
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.
berrymoon
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.
CharlesEF
Those are not the same variables. 1 = 'audio_background' while 2 = 'audio_backgroundaudio'.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.