[DEMO] Dynamic Fade In & Out using SM2 background audio
Ok, this one was a must do for me during the design stage of what never became my Articulate Guru 15 entry. I had long ago been able to use Soundmanager in projects where background audio was required, but never really felt like I had complete control.
This little demo works around some of the well-reported limitations using dynamic fades controlled by a single variable (well, more like...two). So everytime you want to lower the volume or completely turn it off you'll be able to do it by changing the value of just one variable.
Story file - See attachment below.
INSTRUCTIONS (i.e. How to edit the example file for own use)
1) Publish the story once and copy the folder generated by the webobject (should be named 6ot4STUqXpR) somewhere on your computer.
2) In your new folder, replace 6ot4STUqXpR/audio/main.mp3 with the audio file of your choosing.
3) Then go back to the source story and remove the webobject from slide 2.1 and add it again pointing to the index.html of the folder you copied (and edited in step 2).
4) Republish the story - a new webobject folder will be created (with a different 11 character ID). Note that down.
5) Replace all instances of '6ot4STUqXpR' with the new ID in :
a) the 1st slide trigger in Slide 1.1
b) layer trigger inside Layer 'Audio Play' on the Master slide
6) Remove unnecessary clutter (play/pause buttons etc.) - they are only used as an example. Or you can keep them if you require user intervention.
Finally, you can control play by incrementing variables audioPlay, audioPause, audioResume, audioStop and...
audioVolume: this last one can be set to 0 for complete fade out, 100 for fade in, or any other number in between - the script automatically decides whether it should fade in or out depending on the previous audioVolume value.
Hope you like it.