You are not logged in.

1

Thursday, March 22nd 2018, 3:52am

How to fade sound in and out with a tween

Hello, I am wondering how to put a fade effect on a background sound with a tween, so that the sound fades in at the start of a panorama and out at the end, can anybody please help me?
Do I add something to this sound interface code at the beginning of the .xml?


<plugin name="soundinterface"
url.flash="plugins/soundinterface.swf"
url.html5="plugins/soundinterface.js"
preload="true"
rootpath=""
volume="1.0"
mute="false"
/>

Or do I put something in each panorama in the tour, here:


<events name="currentpano"
onnewpano="playsound (bgsnd, 'sounds/*.WAV', 0;"
onremovepano="stopsound(bgsnd, 'sounds/*.WAV', 0;"
/>

Any help much appreciated - I have seen a previous thread on this question, but I still don't quite understand.
I am looking to match the visual effect of a fading colourblend blendmode I am using, and to ease the sound in and out of each panorama in the tour.
Cheers!
Dan

Alexey Tkachenko

Professional

Posts: 770

Location: Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Thursday, March 22nd 2018, 7:37am

Hi)

Try to tween the volume parameter of the soundinterface plugin

https://krpano.com/plugins/soundinterface/#volume
Regards,

Alexey