Forum Discussion
Articulate Storyline 360- Music across specific slides - how to stop it?
Actually, Jürgen , never mind. I applied your recommended script and it works. Thanks so much! The music indeed stops at the correct trigger (reaching a certain slide and layer).
One other small issue - the music itself is a 3-minute audio which I don't want to play more than once. It is meant to serve as a timer for completion of the tasks.
However, it seems to be automatically looping with whatever programming I have set up in Storyline. How can I stop it from playing more than once?
Here are my two javascript triggers cuirrently set up in Storyline to initiate the music:
TRIGGER 1
function add_line() {
var line = document.createElement("audio");
var head=document.getElementsByTagName('body')[0];
line.type = "audio/mp3";
line.src="story_content/audio_files/Jeopardy 3 Minute music Mixdown JHenry.mp3";
line.id="bgSong";
line.autoplay = true;
line.loop = true;
head.appendChild(line);
}
if(document.getElementById('bgSong')==null){
add_line();
var audio = document.getElementById('bgSong');
audio.volume = 0.05;
}
TRIGGER 2
var audio = document.getElementById('bgSong');
audio.src="Jeopardy 3 Minute music Mixdown JHenry.mp3";
audio.load();
audio.play();
Related Content
- 8 months ago
- 11 months ago